Skip to content

fix: remove stale --verbose local flag check from TestNewPRTransferSubcommand#18442

Merged
pelikhan merged 2 commits intocopilot/add-action-pin-sha-resolutionfrom
copilot/fix-test-issue
Feb 26, 2026
Merged

fix: remove stale --verbose local flag check from TestNewPRTransferSubcommand#18442
pelikhan merged 2 commits intocopilot/add-action-pin-sha-resolutionfrom
copilot/fix-test-issue

Conversation

Copy link
Contributor

Copilot AI commented Feb 26, 2026

Commit bc5c86454 moved --verbose/-v from a local flag on each subcommand to a global persistent flag on the root command (rootCmd.PersistentFlags().BoolVarP), but forgot to update TestNewPRTransferSubcommand. The test called cmd.Flags().Lookup("verbose") on a standalone subcommand (no parent), which never sees inherited persistent flags, causing CI to fail when merging against main.

Changes

  • pkg/cli/pr_command_test.go: Remove the --verbose local flag assertion from TestNewPRTransferSubcommand. Since --verbose is now a root-level persistent flag, it is not registered on the transfer subcommand's local FlagSet and the check was incorrect.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha runs/20260226-034940-13006/test-3238287890 /tmp/go-build374851768/b144/vet.cfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet l (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha runs/20260226-034940-13006/test-798266428/.github/workflows /tmp/go-build374851768/b155/vet.cfg Name,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle l -nolocalimports -importcfg /opt/hostedtoolcache/go/1.25.0/xstatus -ato�� -bool -buildtags /usr/bin/git -errorsas -ifaceassert -nilfunc git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 credential.username ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 x_amd64/vet 64/pkg/tool/linux_amd64/asm (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 --local ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet pull.rebase (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 x_amd64/vet /usr/bin/git ew@v1.1.1/spew/bgit ew@v1.1.1/spew/ccheckout 64/pkg/tool/linu.github/workflows/test.md 0G/qeV14P9Pi5vOe9KKsTnd/9UW1Ehkq0aF5jKwNeg7P rev-�� --show-toplevel 64/pkg/tool/linux_amd64/compile 6c5e5e449c81ef5b747b4b9e07ba3c4ed7dce7dd46fdf44a-d _.a (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 851768/b135/vet.cfg ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet pull.rebase (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 x_amd64/vet /usr/bin/git fflib@v1.0.0/difgit (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 credential.username ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 x_amd64/vet 64/pkg/tool/linux_amd64/cgo (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 credential.username ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 x_amd64/vet /usr/bin/git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 851768/b153/vet.cfg ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 x_amd64/vet 64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 851768/b151/vet.cfg ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 x_amd64/vet 64/pkg/tool/linux_amd64/link (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 6 (http block)
  • https://api.github.com/repos/nonexistent/repo/actions/runs/12345
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion (http block)
  • https://api.github.com/repos/owner/repo/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo /usr/bin/git (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build452574309/b001/cli.test /tmp/go-build452574309/b001/cli.test -test.paniconexit0 -test.timeout=10m0s -test.v=true -test.count=1 (http block)
    • Triggering command: /tmp/go-build633143880/b001/cli.test /tmp/go-build633143880/b001/cli.test -test.testlogfile=/tmp/go-build633143880/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.short=true -test.run=Test ution 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /tmp/go-build4225123675/b001/cli.test /tmp/go-build4225123675/b001/cli.test -test.paniconexit0 -test.count=1 -test.timeout=2m0s -C /tmp/gh-aw-test-runs/20260226-034940-13006/test-1343527161/.github/workflows config /usr/bin/git remote.origin.urbash (http block)
  • https://api.github.com/repos/test-owner/test-repo/actions/secrets
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name /tmp/compile-all-instructions-test-749147983/.github/workflows rev-parse /usr/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name 411917/b059/vet.cfg x_amd64/vet ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet --show-toplevel x_amd64/vet ndor/bin/bash ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Reference: https://github.com/github/gh-aw/actions/runs/22426205187/job/64934806876

Fix this test.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…global persistent flag

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing test case in action workflow fix: remove stale --verbose local flag check from TestNewPRTransferSubcommand Feb 26, 2026
@pelikhan pelikhan marked this pull request as ready for review February 26, 2026 04:27
Copilot AI review requested due to automatic review settings February 26, 2026 04:27
@pelikhan pelikhan merged commit 066da37 into copilot/add-action-pin-sha-resolution Feb 26, 2026
@pelikhan pelikhan deleted the copilot/fix-test-issue branch February 26, 2026 04:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the stale --verbose flag check from TestNewPRTransferSubcommand after commit bc5c864 moved the --verbose flag from individual subcommand local flags to a global persistent flag on the root command.

Changes:

  • Removed the incorrect --verbose local flag assertion from the PR transfer subcommand test, since --verbose is now inherited as a persistent flag from the root command and is not registered in the subcommand's local FlagSet

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants