Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@aconsuegra
Copy link
Contributor

Fixes #10887

Similar to #10884

Another test that required massaging in the expected error output. In this case, I'm not sure if I'm escaping the single quotes ' correctly. Happy to make changes if there is a better way!

Copilot AI review requested due to automatic review settings April 28, 2025 16:58
@aconsuegra aconsuegra requested a review from a team as a code owner April 28, 2025 16:58
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.

Copilot wasn't able to review any files in this pull request.

Files not reviewed (1)
  • acceptance/testdata/repo/repo-rename-transfer-ownership.txtar: Language not supported

@cliAutomation cliAutomation added the external pull request originating outside of the CLI core team label Apr 28, 2025
@williammartin williammartin merged commit e51b03d into cli:trunk Jun 17, 2025
11 checks passed
@williammartin
Copy link
Member

➜  cli git:(trunk) βœ— GOMAXPROCS=1 GH_ACCEPTANCE_HOST=github.com GH_ACCEPTANCE_ORG=gh-acceptance-testing GH_ACCEPTANCE_SCRIPT=repo-rename-transfer-ownership.txtar go test -count=1 -tags=acceptance -run ^TestRepo$ ./acceptance -v
=== RUN   TestRepo
=== RUN   TestRepo/repo-rename-transfer-ownership
=== PAUSE TestRepo/repo-rename-transfer-ownership
=== CONT  TestRepo/repo-rename-transfer-ownership
    testscript.go:584: WORK=$WORK
        PATH=/var/folders/45/sdnm1hp10nj1s9q57dp3bc5h0000gn/T/testscript-main3081762953/bin:/Users/williammartin/go/pkg/mod/golang.org/[email protected]/bin:/opt/homebrew/opt/go/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/MacGPG2/bin:/Applications/Wireshark.app/Contents/MacOS:/Applications/VMware Fusion.app/Contents/Public:/usr/local/go/bin:/Users/williammartin/.cargo/bin:/Applications/Ghostty.app/Contents/MacOS:/Users/williammartin/go/bin/:/opt/homebrew/opt/go/libexec/bin
        GOTRACEBACK=system
        HOME=$WORK
        TMPDIR=$WORK/.tmp
        devnull=/dev/null
        /=/
        :=:
        $=$
        exe=
        SCRIPT_NAME=repo_rename_transfer_ownership
        GH_CONFIG_DIR=$WORK
        GH_HOST=github.com
        ORG=gh-acceptance-testing
        GH_TOKEN=ghp_************************************
        RANDOM_STRING=xizidMfrKv

        # Create a repository with a file so it has a default branch (1.818s)
        > exec gh repo create $ORG/$SCRIPT_NAME-$RANDOM_STRING --add-readme --private
        [stdout]
        https://github.com/gh-acceptance-testing/repo_rename_transfer_ownership-xizidMfrKv
        # Attempt to rename the repo with a slash in the name (0.101s)
        > ! exec gh repo rename $ORG/new-name --repo=$ORG/$SCRIPT_NAME-$RANDOM_STRING --yes
        [stderr]
        New repository name cannot contain '/' character - to transfer a repository to a new owner, you must follow additional steps on <github.com>. For more information on transferring repository ownership, see <https://docs.github.com/en/repositories/creating-and-managing-repositories/transferring-a-repository>.
        [exit status 1]
        > stderr 'New repository name cannot contain \''/\'' character - to transfer a repository to a new owner, you must follow additional steps on <github.com>. For more information on transferring repository ownership, see <https://docs.github.com/en/repositories/creating-and-managing-repositories/transferring-a-repository>.'
        # Defer repo deletion (0.000s)
        > defer gh repo delete $ORG/$SCRIPT_NAME-$RANDOM_STRING --yes
        PASS

--- PASS: TestRepo (0.00s)
    --- PASS: TestRepo/repo-rename-transfer-ownership (2.47s)
PASS
ok      github.com/cli/cli/v2/acceptance        2.966s

tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Jun 19, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [cli/cli](https://github.com/cli/cli) | patch | `v2.74.1` -> `v2.74.2` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>cli/cli (cli/cli)</summary>

### [`v2.74.2`](https://github.com/cli/cli/releases/tag/v2.74.2): GitHub CLI 2.74.2

[Compare Source](cli/cli@v2.74.1...v2.74.2)

#### What's Changed

##### πŸ› Fixes

- Fix assignees being dropped from `gh pr edit` by [@&#8203;BagToad](https://github.com/BagToad) in cli/cli#11065
- Add accurate context when run rerun fails by [@&#8203;leudz](https://github.com/leudz) in cli/cli#10774
- Avoid requesting MR reviewer twice by [@&#8203;williammartin](https://github.com/williammartin) in cli/cli#11099
- Quote filenames suggested at the end of worklow run by [@&#8203;williammartin](https://github.com/williammartin) in cli/cli#11134
- Fix expected error output of TestRepo/repo-rename-transfer-ownership by [@&#8203;aconsuegra](https://github.com/aconsuegra) in cli/cli#10888

##### πŸ“š Docs & Chores

- Add instructions for MidnightBSD installation by [@&#8203;laffer1](https://github.com/laffer1) in cli/cli#10699
- docs: update install command for Debian by [@&#8203;MagneticNeedle](https://github.com/MagneticNeedle) in cli/cli#10935
- Fix step order for CodeQL workflow by [@&#8203;BagToad](https://github.com/BagToad) in cli/cli#11145
- Add workflow to check `help wanted` labelling by [@&#8203;williammartin](https://github.com/williammartin) in cli/cli#11105
- Quote workflow conditional by [@&#8203;williammartin](https://github.com/williammartin) in cli/cli#11122
- Fix script path for help-wanted check by [@&#8203;BagToad](https://github.com/BagToad) in cli/cli#11125
- Exclude 3rd party license compliance content from GHAS scanning by [@&#8203;andyfeller](https://github.com/andyfeller) in cli/cli#11127
- Second fix for file not found in help-wanted check by [@&#8203;BagToad](https://github.com/BagToad) in cli/cli#11128
- Ensure gh executes in workflow check script by [@&#8203;williammartin](https://github.com/williammartin) in cli/cli#11133
- Improve help wanted check skipping logic by [@&#8203;BagToad](https://github.com/BagToad) in cli/cli#11135

##### :dependabot: Dependencies

- Bump go to 1.24 by [@&#8203;williammartin](https://github.com/williammartin) in cli/cli#11142
- chore(deps): bump mislav/bump-homebrew-formula-action from 3.2 to 3.4 by [@&#8203;dependabot](https://github.com/dependabot) in cli/cli#11066
- chore(deps): bump github.com/sigstore/protobuf-specs from 0.4.2 to 0.4.3 by [@&#8203;dependabot](https://github.com/dependabot) in cli/cli#11092
- chore(deps): bump google.golang.org/grpc from 1.72.0 to 1.72.2 by [@&#8203;dependabot](https://github.com/dependabot) in cli/cli#11033
- chore(deps): bump actions/attest-build-provenance from 2.3.0 to 2.4.0 by [@&#8203;dependabot](https://github.com/dependabot) in cli/cli#11107
- chore(deps): bump github.com/in-toto/attestation from 1.1.1 to 1.1.2 by [@&#8203;dependabot](https://github.com/dependabot) in cli/cli#11123
- chore(deps): bump github.com/google/go-containerregistry from 0.20.3 to 0.20.6 by [@&#8203;dependabot](https://github.com/dependabot) in cli/cli#11120
- Bump golangci-lint to v2 by [@&#8203;williammartin](https://github.com/williammartin) in cli/cli#11121

#### New Contributors

- [@&#8203;MagneticNeedle](https://github.com/MagneticNeedle) made their first contribution in cli/cli#10935
- [@&#8203;laffer1](https://github.com/laffer1) made their first contribution in cli/cli#10699

**Full Changelog**: cli/cli@v2.74.1...v2.74.2

</details>

---

### Configuration

πŸ“… **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

β™» **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

πŸ”• **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC42MC4xIiwidXBkYXRlZEluVmVyIjoiNDAuNjAuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
@marshalokos

This comment was marked as spam.

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

Labels

external pull request originating outside of the CLI core team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expected error message in TestRepo/repo-rename-transfer-ownership acceptance test is out of date

4 participants