Meredith Lancaster
ecf55c6c16
use mock to assert number of http calls
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2025-01-07 10:54:17 -07:00
Meredith Lancaster
e34e188ee2
add http client test constructors
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2025-01-07 10:43:24 -07:00
Meredith Lancaster
9ecd90c26c
setup testing struct for test cases
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2025-01-07 10:24:42 -07:00
nobe4
442be87acb
Merge branch 'trunk' into fancier-extention-upgrade
2025-01-07 12:04:35 +01:00
nobe4
3b69ea6fbc
feat: make the extension upgrade fancier
...
This left-pad the extension names during upgrade so they all align
nicely. It makes easier to see what is happening.
2025-01-07 12:01:02 +01:00
Andy Feller
0006091d76
Fix up intra-org fork test setup
...
[1] 96ac8d6a2f
2025-01-07 10:22:51 +11:00
Frederick Zhang
4254818dbd
Find push remote using branch.<name>.pushRemote and remote.pushDefault
...
When using a push.default = current triangular workflow, apart from
using @{push} to determine the remote branch name, we should also follow
the
1. branch.<name>.pushRemote
2. remote.pushDefault
3. branch.<name>.remote
...list to determine which remote Git pushes to.
2025-01-07 10:22:39 +11:00
Frederick Zhang
7fc35fd47d
Only find PRs w/ branch.<name>.merge if push.default = upstream/tracking
...
When push.default is not 'upstream' / 'tracking' (or 'nothing'), we can
expect local and remote branch names to be the same and solely rely on
@{push} or RemoteURL.
This fixes the wrong error message 'no pull requests found for branch
"<target branch>"' when the local branch is not pushed in the
push.default = simple / current and upstream = <target branch> setup.
2025-01-07 10:18:07 +11:00
Frederick Zhang
0179381efd
Find PRs using @{push}
...
When using a push.default = current central workflow [1], we should use
@{push} instead to locate the remote branch.
In fact, @{push} covers most cases in push.default = upstream too. The
branch.<name>.merge is probably only needed when using RemoteURL and
different remote / local branch names.
[1] https://github.com/tpope/vim-fugitive/issues/1172#issuecomment-522301607
2025-01-07 10:18:01 +11:00
Michael Hoffman
b3be3aa16b
Merge branch 'trunk' into create-autolinks
2025-01-06 16:09:40 -05:00
Andy Feller
40984d1eb6
Merge pull request #10186 from cli/wm/clear-up-fine-grained-pats-auth-login
...
Clear up --with-token fine grained PAT usage
2025-01-06 15:24:37 -05:00
Meredith Lancaster
69865117ab
add mutex for test field
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2025-01-06 13:14:02 -07:00
Meredith Lancaster
fb4fc7e7c2
Merge branch 'fetch-artifact-attestation-bundles-with-sas-url' of github.com:malancas/cli into fetch-artifact-attestation-bundles-with-sas-url
2025-01-06 12:58:13 -07:00
Meredith Lancaster
0202ca8df5
add test case for bundle url fetch failure
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2025-01-06 12:58:09 -07:00
Meredith Lancaster
b1af4b0ce3
Merge branch 'trunk' into fetch-artifact-attestation-bundles-with-sas-url
2025-01-06 12:49:27 -07:00
Meredith Lancaster
e03a36ea3c
add tests for bundle url fetch and fallback
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2025-01-06 12:12:26 -07:00
Tyler McGoffin
1f4e005562
Merge pull request #10158 from aryanbhosale/trunk
...
fix(repo fork): add non-TTY output when fork is newly created
2025-01-06 10:11:14 -08:00
Michael Hoffman
db51c36433
Merge branch 'cli:trunk' into create-autolinks
2025-01-06 12:46:04 -05:00
Meredith Lancaster
070b67e5a4
fetch bundles in parallel
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2025-01-06 10:44:55 -07:00
Meredith Lancaster
311f2b2e23
return fetch attestations err directly
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2025-01-06 10:39:40 -07:00
Tyler McGoffin
2358fcee83
Merge pull request #10177 from cli/cmbrose/pr-create-upstream-fix
...
Handle missing upstream configs for `gh pr create`
2025-01-06 09:32:00 -08:00
Meredith Lancaster
fc984c91d0
Merge branch 'fetch-artifact-attestation-bundles-with-sas-url' of github.com:malancas/cli into fetch-artifact-attestation-bundles-with-sas-url
2025-01-06 10:21:37 -07:00
Meredith Lancaster
9051da39fc
provide additional logging and fallback
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2025-01-06 10:19:47 -07:00
Meredith Lancaster
706314b005
Merge branch 'trunk' into fetch-artifact-attestation-bundles-with-sas-url
2025-01-06 09:57:57 -07:00
William Martin
c3b41e87b8
Panic mustParseTrackingRef if format is incorrect
2025-01-06 10:33:28 -06:00
William Martin
8b5073d617
Move trackingRef into pr create package
2025-01-06 10:33:28 -06:00
William Martin
62ecb1c84d
Make tryDetermineTrackingRef tests more respective of reality
...
Though it doesn't really matter, in practice upstream is always going to come before origin.
2025-01-06 10:33:28 -06:00
William Martin
57ba5e5608
Rework tryDetermineTrackingRef tests
2025-01-06 10:33:28 -06:00
William Martin
b8c167970b
Avoid pointer return from determineTrackingBranch
2025-01-06 10:33:28 -06:00
William Martin
27bd4b2aec
Doc determineTrackingBranch
2025-01-06 10:33:28 -06:00
William Martin
05764b8114
Don't use pointer for determineTrackingBranch branchConfig
2025-01-06 10:33:28 -06:00
William Martin
dc077dc09b
Panic if tracking ref can't be reconstructed
2025-01-06 10:33:28 -06:00
William Martin
3ae4e5da20
Document and rework pr create tracking branch lookup
2025-01-06 10:33:28 -06:00
William Martin
e7d49fb78c
Update pkg/cmd/auth/login/login.go
...
Co-authored-by: Andy Feller <andyfeller@github.com>
2025-01-06 17:21:02 +01:00
William Martin
3695bda637
Clear up --with-token fine grained PAT usage
2025-01-06 16:41:48 +01:00
Josh Soref
dd32a9cc94
Upgrade generated workflows
...
Use `cli/gh-extension-precompile@v2`
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-01-05 23:18:28 -05:00
Michael Hoffman
fdf9a6e2f6
Fix typos
2025-01-05 19:41:15 -05:00
Michael Hoffman
afcaa1934c
Merge branch 'trunk' into create-autolinks
2025-01-05 15:57:09 -05:00
Michael Hoffman
6cf2e9ee3e
feat: Add support for creating autolink references
2025-01-05 15:37:17 -05:00
Aryan Bhosale
3fe6ba4e8e
Merge branch 'trunk' into trunk
2025-01-04 10:24:07 +05:30
Tyler McGoffin
2ec473ff2f
Merge pull request #10139 from ChandranshuRao14/feat/repo-edit-security-analysis
...
Feat: Allow setting security_and_analysis settings in gh repo edit
2025-01-03 16:22:10 -08:00
Tyler McGoffin
efec5d9250
Fixed test for stdout in non-tty use case of repo fork
2025-01-03 15:54:07 -08:00
Caleb Brose
67749480d5
Fix test
2025-01-03 20:45:20 +00:00
Caleb Brose
9d490547b8
Alternative: remove LocalBranch from BranchConfig
2025-01-03 20:39:12 +00:00
Daniel A. Ochoa
785cf43428
Merge branch 'trunk' into gh-gist-delete-prompt
2025-01-03 13:54:30 -06:00
danochoa
75ace410a3
cleanup
2025-01-03 13:09:32 -06:00
danochoa
f87d9f98f1
gist delete prompt for confirmation
2025-01-03 12:51:09 -06:00
Tyler McGoffin
576fa8a3bc
Add test for permissions check for security and analysis edits ( #1 )
2025-01-03 01:29:45 -05:00
Aryan Bhosale
8dbbceaaaf
print repo url to stdout
2025-01-03 10:54:30 +05:30
Tyler McGoffin
d6dba93586
Merge pull request #10164 from cli/jtmcg/update-auth-PAT-info
...
Add mention of classic token in gh auth login docs
2025-01-02 15:29:23 -08:00