danochoa
dccbc99fdf
fix gist description in tests
2025-01-08 20:47:50 -06:00
danochoa
9c65a32ef8
gist delete prompt with gist description
2025-01-08 17:56:02 -06:00
Tyler McGoffin
15ac566222
Remove shadowed errors from prSelectorForCurrentBranch and cover with tests
2025-01-08 15:21:05 -08:00
Tyler McGoffin
94b2d4ec3b
Added tests to cover prSelectorForCurrentBranch for confidence in refactor
2025-01-08 15:00:38 -08:00
Tyler McGoffin
ec9eaef048
Refactor prSelectorForCurrentBranch and tests
...
Replace the git config argument in prSelectorForCurrentBranch with
the branchConfig it was used to fetch. The tests needed to be refactored
accordingly to support this change to the prSelectorForCurrentBranch API.
In addition, I've moved the test to a table test format so I can expand
the test coverage in the next commit.
2025-01-08 14:34:49 -08:00
Tyler McGoffin
527d1db298
Add missing test for RemoteURL in parseBranchConfig
2025-01-08 14:24:20 -08:00
Meredith Lancaster
c2fdac272c
update table column headers
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2025-01-08 13:27:38 -07:00
Tyler McGoffin
fea46c0011
Change ReadBranchConfig error message in gh pr create
2025-01-08 11:40:42 -08:00
Tyler McGoffin
4575692ebf
Remove private readBranchConfig method and remove parseBranchConfig from Client
...
I think I went too far with my previous refactor and am backing out of it.
Adding a private readBranchConfig method on the client wasn't providing
any real additional value, so I've put it back into ReadBranchConfig.
However, I think there is still value in having parseBranchConfig
(formerly createBranchConfig) as a separate util function, as it both
improves readability of ReadBranchConfig and makes parsing its purpose
easier through the bespoke tests for it.
2025-01-08 10:36:45 -08:00
Meredith Lancaster
b48471bf0d
Merge branch 'update-attestation-verify-table-output' of github.com:malancas/cli into update-attestation-verify-table-output
2025-01-08 11:16:28 -07:00
Meredith Lancaster
1c16e12a66
update test fixtures to include buildConfigURI
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2025-01-08 11:16:23 -07:00
Meredith Lancaster
1aa10cd564
Merge branch 'trunk' into update-attestation-verify-table-output
2025-01-08 11:10:33 -07:00
Meredith Lancaster
8ad877b188
add check for invalid attestation
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2025-01-08 08:38:43 -07:00
Michael Hoffman
770978ad09
Merge branch 'trunk' into create-autolinks
2025-01-08 10:31:52 -05:00
Mateus Marquezini
a3a283ca83
Merge branch 'trunk' into fix/issue_10042
2025-01-08 09:08:41 -03:00
danochoa
7d1d261c82
Merge branch 'trunk' into gh-gist-delete-prompt
2025-01-08 02:30:21 -06:00
danochoa
a8f0aaeb3d
tentative updates for acceptance criteria
...
- pending confirmation re description in prompt
2025-01-08 02:22:21 -06:00
Tyler McGoffin
713346c736
Merge pull request #10196 from cli/jtmcg/update-FR-docs
...
Update triage.md to reflect FR experiment outcome
2025-01-07 16:10:49 -08:00
Tyler McGoffin
47c391b246
PR review edits
2025-01-07 15:42:17 -08:00
Tyler McGoffin
0137150848
Refactor Test_readGitBranchConfig for easier parsing
2025-01-07 14:56:27 -08:00
Meredith Lancaster
33d0002d21
update tests to use new function name
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2025-01-07 15:22:02 -07:00
Meredith Lancaster
8d89dd97fd
Update pkg/cmd/attestation/api/client.go
...
Co-authored-by: Phill MV <phillmv@github.com>
2025-01-07 15:14:53 -07:00
Meredith Lancaster
51a74aed1d
Update pkg/cmd/attestation/api/client.go
...
Co-authored-by: Phill MV <phillmv@github.com>
2025-01-07 15:14:23 -07:00
Tyler McGoffin
c83cf32cff
Remove named return values from prSelectorForCurrentBranch
2025-01-07 13:54:43 -08:00
Tyler McGoffin
f43da8ea9a
Refactor ReadBranchConfig for test coverage of newly returned erros
2025-01-07 13:54:43 -08:00
Tyler McGoffin
bf6fdbdfd2
Remove named returns from ReadBranchConfig and surface errors
2025-01-07 13:54:43 -08:00
Meredith Lancaster
42cb2547cd
remove old comment
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2025-01-07 14:13:50 -07:00
Meredith Lancaster
1e91828cdf
remove commented out code
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2025-01-07 13:36:50 -07:00
Meredith Lancaster
eb9eb261f0
Merge branch 'trunk' into update-attestation-verify-table-output
2025-01-07 12:14:01 -07:00
Meredith Lancaster
d4f3fbce9b
Merge branch 'trunk' into fetch-artifact-attestation-bundles-with-sas-url
2025-01-07 12:04:12 -07:00
Meredith Lancaster
f46cccbab4
comment
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2025-01-07 12:03:49 -07:00
Meredith Lancaster
258c69cd26
undo more name chanages
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2025-01-07 11:56:05 -07:00
Meredith Lancaster
0a602fae07
undo other name change
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2025-01-07 11:54:02 -07:00
Meredith Lancaster
37e0969f20
remove spaces
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2025-01-07 11:51:51 -07:00
Meredith Lancaster
3c0280c4d7
undo name change for now
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2025-01-07 11:51:23 -07:00
Meredith Lancaster
7838e912b6
more mock http client cleanup
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2025-01-07 11:37:02 -07:00
Tyler McGoffin
58ca3c69bb
Update triage.md to reflect FR experiment outcome
2025-01-07 10:36:15 -08:00
Meredith Lancaster
9d88ca8cf8
simplify mock http client
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2025-01-07 11:32:49 -07:00
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
Andy Feller
be250b3d33
Add renamed acceptance tests
2025-01-07 10:22:49 +11:00
Andy Feller
8bb2879b87
Reflect coverage for view and status subcommands
2025-01-07 10:22:48 +11:00
Andy Feller
eb16a75ab1
Expand with gh pr status
2025-01-07 10:22:46 +11:00
Andy Feller
2d1e4d625b
Add base gh pr view acceptance tests for changes
...
These are acceptance tests based on @williammartin work within various issues associated with #9208 .
These need to be enhanced to account for `gh pr status`, however that should be quicker given these pass based on the updated branch and upstream fix for cross-repo same org changes.
2025-01-07 10:22:44 +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