Commit graph

9168 commits

Author SHA1 Message Date
William Martin
234d2effd5
Merge pull request #10593 from cli/dependabot/go_modules/golang.org/x/net-0.36.0
Bump golang.org/x/net from 0.34.0 to 0.36.0
2025-03-13 11:37:06 +01:00
dependabot[bot]
7901f2364c
Bump golang.org/x/net from 0.34.0 to 0.36.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.34.0 to 0.36.0.
- [Commits](https://github.com/golang/net/compare/v0.34.0...v0.36.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-13 01:52:40 +00:00
Tyler McGoffin
66e51c723e
Merge pull request #10574 from wata727/make_missing_workflow_scope_regexp_aware_of_github_app
[gh repo sync] Make missing workflow regexp aware of GitHub App
2025-03-12 11:08:01 -07:00
Tyler McGoffin
5c6a80588b
Merge branch 'trunk' into make_missing_workflow_scope_regexp_aware_of_github_app 2025-03-12 10:55:21 -07:00
Tyler McGoffin
4a8ecee3b8
Merge pull request #10413 from iamazeem/5099-gh-release-create-upload-expand-glob-patterns-on-windows
[gh release create/upload] Expand glob patterns for all platforms
2025-03-12 08:50:00 -07:00
William Martin
7924274ef9
Merge pull request #10586 from kevincatty/trunk
chore: remove redundant word in comment
2025-03-12 11:35:03 +01:00
kevincatty
e09b9a5fae chore: remove redundant word in comment
Signed-off-by: kevincatty <zhanshanmao@outlook.com>
2025-03-12 16:13:46 +08:00
Kazuma Watanabe
b01288617a Make missing workflow regexp aware of GitHub App
Follow up of https://github.com/cli/cli/pull/7612

The `missingWorkflowScopeRE` is defined to capture
the error message when the `GH_TOKEN` does not have
`workflow` scope in `gh repo sync <remote>`,
but this is only intended for error messages for
OAuth Apps and does not work with GitHub Apps.

In GitHub App, you will get the following error:

```
{
  "message": "refusing to allow a GitHub App to create or update workflow `.github/workflows/teamcity-pr-checks.yml` without `workflows` permission",
  "documentation_url": "https://docs.github.com/rest/branches/branches#sync-a-fork-branch-with-the-upstream-repository",
  "status": "422"
}
```

As you can see above, the existing regexp does not
match the "`workflows` permission".

This change modifies the regexp to return
the user-friendly error message when the `workflow`
permission is missing, even in the case of a GitHub App.
2025-03-11 02:38:51 +00:00
William Martin
af4acb3801
Merge pull request #10552 from cli/jtmcg/update-triage-workflow
Add cli-discuss-automation environment to triage.md
2025-03-10 14:03:25 +01:00
Tyler McGoffin
e0533f9f73 Change issueauto and prauto actions to use the cli-automation env 2025-03-07 12:04:59 -08:00
Tyler McGoffin
824acc86dd Add environment to prauto and issueauto workflows 2025-03-06 11:20:39 -08:00
Tyler McGoffin
09b233746c Add cli-discuss-automation environment to triage.md
Previously, we were getting the token from repository secrets. We have
moved the token to its own environment secret in the
cli-discuss-automation environment. It is in its own environment so that
we don't inject our other secrets into this workflow as we don't need
them here.
2025-03-06 11:13:01 -08:00
William Martin
fc19ff321a
Merge pull request #10549 from cli/10548-v2680-failed-to-run-secret-commands
Fix secret command panic when base repo from cwd
2025-03-06 12:01:40 +01:00
William Martin
db8b38a185 Fix secret command panic when base repo from cwd 2025-03-06 11:45:22 +01:00
Kynan Ware
a92528a158
Merge pull request #10546 from cli/kw-wm-af/base64-decode-gpg-passphrase-in-deployment-workflow
Base64 decode GPG passphrase in deployment workflow
2025-03-05 12:44:33 -07:00
Kynan Ware
601c3e448c Fix(ci): base64 decode GPG passphrase 2025-03-05 12:43:44 -07:00
Meredith Lancaster
4d44e4f20c
Merge pull request #10382 from malancas/refactor-get-attestations-funcs
Refactor `GetLocalAttestations` and clean up custom registry transport
2025-03-05 11:46:36 -07:00
Meredith Lancaster
917a00ddc1
Update pkg/cmd/attestation/verification/attestation.go
Co-authored-by: Fredrik Skogman <kommendorkapten@github.com>
2025-03-05 07:31:35 -07:00
Meredith Lancaster
ddc36c8a8e
Update pkg/cmd/attestation/verification/attestation.go
Co-authored-by: Fredrik Skogman <kommendorkapten@github.com>
2025-03-05 07:31:28 -07:00
Andy Feller
8683656783
Merge pull request #10539 from cli/wm/secret-env-var
Check `GH_REPO` too in addition to `--repo` for disambiguation
2025-03-05 08:39:31 -05:00
Andy Feller
a18a9594be Fix acceptance test descriptions 2025-03-05 08:27:50 -05:00
Andy Feller
50780fc469 Fix gh secret disambiguity test
The previous commit failed to update the 2nd set of tests to rely upon GH_REPO instead of --repo flag.

These have been tested against `trunk` and fail because not being in a git directory when they should pass.
2025-03-04 14:31:12 -05:00
Andy Feller
0da037ca8f Expand gh secret acceptance tests
This commit builds on top of work previously done within acceptance tests around gh secret and remote disambiguation.

The choice of expanding this existing test rather than creating a new test was in order to keep context together within a single acceptance test rather than splitting it over multiple.
2025-03-04 14:16:00 -05:00
Andy Feller
23ea61d325 Expand gh secret base repo tests
Building on top of the work done in commands to account for GH_REPO environment variable, this commit expands existing tests around handling base repo functions to include new test scenarios.

These tests fail in the same way as reported on the issue when run against `trunk` without the other branch's changes, demonstrating they will help avoid regression.
2025-03-04 13:39:38 -05:00
Azeem Sajid
d67d65e304 [gh secret] Check GH_REPO too in addition to --repo for disambiguation 2025-03-04 18:36:53 +01:00
Meredith Lancaster
671c4c23a9 Merge branch 'trunk' into refactor-get-attestations-funcs 2025-03-04 09:33:00 -07:00
William Martin
b8cf16dc2d
Deep Dive Document Release Process (#10503) 2025-03-04 13:30:29 +01: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
Andy Feller
5e21f6ac17
Merge pull request #10521 from cli/jtmcg/fix-workflow-panic
Fix unhandled panic in FindWorkflow and add tests
2025-03-03 13:14:49 -05:00
Tyler McGoffin
a18c54e824 Fix unhandled panic in FindWorkflow and add tests
FindWorkflow had a code path that could error without handling that error
that was introduced in #10328. I previously called out the lack of tests
in this part of the code in my review, and punting them then bit us here:
https://github.com/cli/cli/pull/10328#pullrequestreview-2597266783.

As such, this fixes the panic, but also adds tests to cover the relevant
code paths through FindWorkflow, including some tests for getWorkflowByID,
getWorkflowsByName, and GetWorkflows.

This does NOT seek to refactor the existing code, just cover the existing
behavior and validate that we are resolving this panic (covered by
TestFindWorkflow_nonHTTPError).
2025-02-28 15:11:53 -08:00
Andy Feller
817eeb26e5
Merge pull request #10518 from cli/dependabot/github_actions/actions/attest-build-provenance-2.2.2
Bump actions/attest-build-provenance from 2.2.0 to 2.2.2
2025-02-28 11:17:15 -05:00
dependabot[bot]
b83a1a06ef
Bump actions/attest-build-provenance from 2.2.0 to 2.2.2
Bumps [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance) from 2.2.0 to 2.2.2.
- [Release notes](https://github.com/actions/attest-build-provenance/releases)
- [Changelog](https://github.com/actions/attest-build-provenance/blob/main/RELEASE.md)
- [Commits](520d128f16...bd77c07785)

---
updated-dependencies:
- dependency-name: actions/attest-build-provenance
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-28 14:52:41 +00:00
William Martin
f8d9aac7e5
Merge pull request #10512 from cli/wm-kw/fix-pr-checkout-for-forks
Fix checkout when URL arg is from fork and cwd is upstream
2025-02-28 13:31:59 +01:00
William Martin
11b9496e17 Fix checkout when URL arg is from fork and cwd is upstream 2025-02-27 16:56:11 +01: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
Andy Feller
f9d50d86ac
Merge pull request #10508 from iamazeem/10449-inconsistent-examples-format
Inconsistent format of examples in help text
2025-02-27 09:15:14 -05:00
Azeem Sajid
515bb96b2f Update project help text; fix unlink usage 2025-02-27 17:51:05 +05:00
Azeem Sajid
33c30d5bd1 Inconsistent format of examples in help text 2025-02-27 16:26:25 +05:00
Azeem Sajid
69fff52026
Inconsistent format of description of flags (starting with lowercase letter) (#10507) 2025-02-27 11:40:21 +01:00
Meredith Lancaster
33d863f98d
Merge pull request #10308 from malancas/attestation-verify-ref-commit-policy-opts
Add signer-digest, source-ref, and source-digest options for `gh attestation verify`
2025-02-26 14:27:31 -07:00
William Martin
5622d18bfa
Merge pull request #10504 from cli/wm/update-go-version-in-contributing
Update Go version to 1.23 in CONTRIBUTING.md
2025-02-26 16:00:59 +01:00
Azeem Sajid
f4b65b785e Add exclude callback function 2025-02-26 12:46:56 +05:00
Tyler McGoffin
5d2eadef8c
Merge pull request #10499 from cli/dependabot/go_modules/github.com/go-jose/go-jose/v4-4.0.5
Bump github.com/go-jose/go-jose/v4 from 4.0.2 to 4.0.5
2025-02-25 11:13:21 -08:00
Tyler McGoffin
ed2c322a73
Merge pull request #10384 from iamazeem/9798-gh-api-encode-package-name
[gh api] Escape package name (URL encoding) for packages endpoint
2025-02-25 11:12:48 -08:00
William Martin
c78f6e7618 Update Go version to 1.23 in CONTRIBUTING.md 2025-02-25 17:31:32 +01:00
William Martin
f019cf7cea
Merge pull request #10501 from cli/wm/fix-minor-auth-login-help
Fix minor auth login help typo
2025-02-25 16:47:38 +01:00
Azeem Sajid
3d726c9865 Add tests for - and label args 2025-02-25 17:58:51 +05:00
William Martin
ac6ad78ff9 Fix minor auth login help typo 2025-02-25 12:27:30 +01:00
Azeem Sajid
8ace163608 Remove slicing 2025-02-25 10:49:28 +05:00
Azeem Sajid
9c87069199 Add docs; rename function name 2025-02-25 10:37:14 +05:00