Commit graph

257 commits

Author SHA1 Message Date
Brian DeHamer
bc93b54137
add Digest to ReleaseAsset struct
Signed-off-by: Brian DeHamer <bdehamer@github.com>
2025-05-27 12:47:16 -07:00
ejahnGithub
ab49b2abbc remove filepath test 2025-05-27 12:02:24 -04:00
ejahnGithub
d0da9b1664 update Sprintf 2025-05-23 16:23:41 -04:00
ejahnGithub
3108d99208 added the unit test 2025-05-23 15:31:33 -04:00
ejahnGithub
ca0f9847db add json format 2025-05-22 12:31:45 -04:00
ejahnGithub
e9fbe9d8b8 change verify-asset logic 2025-05-21 11:23:47 -04:00
ejahnGithub
7a7c7d6605 minor fix 2025-05-20 18:44:04 -04:00
ejahnGithub
0a6ce2bb74 clean up the code 2025-05-20 18:35:40 -04:00
ejahnGithub
3e5456827c update the lng 2025-05-20 18:02:13 -04:00
ejahnGithub
26b46f939d wip 2025-05-20 11:12:46 -04:00
ejahnGithub
74c6a36c20 remove comment 2025-05-16 14:59:04 -04:00
ejahnGithub
510ce73d6e wip 2025-05-16 14:22:45 -04:00
ejahnGithub
3a6e42f73f init 2025-05-15 17:21:13 -04:00
Art Leo
89bed45c55 Release download handles missing archive URLs
Co-authored-by: William Martin <williammartin@github.com>
2025-05-08 12:41:12 +02:00
Art Leo
d78980c668 Fix release download test http stubbing
Co-authored-by: William Martin <williammartin@github.com>
2025-05-08 12:15:28 +02:00
Andy Feller
644dbe6275
Apply suggestions from code review
Co-authored-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2025-04-08 15:56:23 -04:00
Andy Feller
918cafc222 Deprecate ColorScheme.Gray for ColorScheme.Muted
This commit converts all of the places using ColorScheme.Gray and ColorScheme.Grayf to Muted and Mutedf.

There is a little extra tidying up with local variable names or converting code to use Mutedf format.
2025-04-06 10:18:48 -04:00
Andy Feller
d2cd14b4cd Remove out of scope changes, update list commands
After discussing this with the team, the `gh config` changes to display `accessible_colors` have been removed from this branch being outside of acceptance criteria.  This will be moved to a separate issue along with any other work needed to finalize the public preview such as `gh help` entries for `GH_ACCESSIBLE_COLORS` environment variable.

List commands that use ColorScheme.Gray have been updated to use ColorScheme.Muted.
2025-03-31 11:58:30 -04:00
Kynan Ware
aac43870d4 test(release view): fix indentation 2025-03-28 12:11:57 -06:00
Kynan Ware
c1fbc2f05b test(many): fix whitespace in tests expectations
Due to https://github.com/charmbracelet/glamour/pull/334, the margin
used for markdown rendering has changed by a couple spaces. This
corrects the relevant tests to accomodate that change.
2025-03-27 14:21:13 -06:00
Tyler McGoffin
0bb92c5980
Separate partitioning from globbing in cmdutil/args package and consumers (#3)
* Separate partitioning from globbing in cmdutil/args package and consumers

In the previous commit, GlobPaths was overloaded, containing logic
specific to command use-cases. This commit removes that functionality from
GlobPaths and back into the commands that have the special use-cases.

To do this, I've introduced a new Partition util in cmdutil/args.go that
will separate a slice into two slices given a predicate. This functionality
is leveraged by both the special use-cases described above to separate the
command-specific syntax from the globable filepaths.

* Add test to validate that the order of '-' in gh gist create args doesn't matter
2025-03-04 07:05:23 +05:00
Azeem Sajid
db3df04068
Merge branch 'trunk' into 5099-gh-release-create-upload-expand-glob-patterns-on-windows 2025-02-27 19:20:44 +05:00
Azeem Sajid
33c30d5bd1 Inconsistent format of examples in help text 2025-02-27 16:26:25 +05:00
Azeem Sajid
f4b65b785e Add exclude callback function 2025-02-26 12:46:56 +05:00
Azeem Sajid
092eb7e962 Support globbing for all platforms 2025-02-22 12:16:42 +05:00
Tyler McGoffin
8748bb0b1a
Add testing to GlobWindowsPaths (#2) 2025-02-21 22:33:19 +05:00
William Martin
1710f7dace
Merge pull request #10398 from iamazeem/6059-gh-release-create-only-new
[gh release create] Fail when there are no new commits since the last release
2025-02-19 12:13:55 +01:00
Azeem Sajid
8202471910 Wrap error 2025-02-19 16:03:24 +05:00
Azeem Sajid
960017a4f1 Rename flag to --fail-on-no-commits 2025-02-19 15:20:17 +05:00
Azeem Sajid
72364562dd Use API REST Client 2025-02-18 21:49:38 +05:00
Azeem Sajid
8b7fb231ec Remove trailing whitespace 2025-02-13 11:06:27 +05:00
Azeem Sajid
d9bfa606cc Fix gh gist create for multiple filenames and glob patterns 2025-02-11 12:56:32 +05:00
Azeem Sajid
161ad92b20 [gh release create/upload] Expand glob patterns on Windows 2025-02-09 21:58:15 +05:00
Azeem Sajid
49fd7a5756 [gh release create] Fail when there are no new commits since the most recent release 2025-02-08 18:20:43 +05:00
Otto Kekäläinen
b19e682455
Update test to be compatible with latest Glamour v0.8.0
Latest Glamour has slightly changed logic in line length / wrapping,
resulting test failures due to string mismatch. Update tests and bump
dependency to v0.8.0, and others to the bare minimal level as generated
by `go mod tidy`.

This was detected then building the GitHub cli package `gh` in Debian
started to fail with src:golang-github-charmbracelet-glamour 0.8.0-1.

Closes: #10179
2025-01-22 20:13:40 -08:00
bagtoad
deb34d6456 Refactor error handling for missing "workflow" scope in createRelease 2024-11-23 16:59:49 -07:00
Kynan Ware
a4f96d29e3 Refactor workflow scope checking
Refactor the logic for checking `workflow` scope checking in releases to be in the positive - check if the scope is there, not check if it isn't there. Then, when the function is called we invert it.

Also update comments to be more imperative.

This refactor also incorporates @andyfeller's suggestion to use `slices`.

Co-Authored-By: Andy Feller <andyfeller@github.com>
2024-11-23 13:17:09 -07:00
bagtoad
68f3ef79ca Handle missing "workflow" scope in createRelease 2024-11-16 19:32:37 -07:00
Zongle Wang
192f57ef42
Improve the help message for -F (#9525)
Changing to `release-notes.md` from `changelog.md` may help users better contextually understand usage.

Co-authored-by: Tyler McGoffin <jtmcg@github.com>
2024-08-28 11:00:46 -07:00
Babak K. Shandiz
6dc729792d
Merge branch 'trunk' into 9299-improve-annotated-releases
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-08-10 21:55:41 +01:00
Babak K. Shandiz
668dbcefc6
Add test cases for PGP, SSH and X.509 signatures
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-08-10 21:50:31 +01:00
Babak K. Shandiz
b36b39df60
Explain why not looking for signature begin marker
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-08-10 21:29:22 +01:00
Yukai Chou
d7b8ecf33d Unify use of tab indent in non-test source files
Found with
    rg '(^ | \t|\t )' -g '*.go' -g '!*_test.go'

Mixed indent exceptions:
- wrapped long list items with extra 2-space indent
- code snippets using space indent
- commented code lines having "\t*// \t+" prefix
2024-08-03 00:35:30 +08:00
Babak K. Shandiz
8ea1b8973a
Update tests with changes to gitTagInfo function
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-30 00:21:19 +01:00
Babak K. Shandiz
46814b3759
Add example for --notes-from-tag
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-29 23:26:19 +01:00
Babak K. Shandiz
df3b0627fd
Add test for gitTagInfo
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-29 23:26:03 +01:00
Babak K. Shandiz
b9963809c2
Use signature-stripped tag annotation content
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-07-29 23:25:34 +01:00
William Martin
c13d161271 Export databaseId for releases 2024-07-23 13:41:56 +02:00
William Martin
99ff84bdd9 Alphabetise release json fields 2024-07-23 13:41:56 +02:00
William Martin
13dea3e35d Add test for release view json export fields 2024-07-23 13:41:56 +02:00