Skip to content

Conversation

@webknjaz
Copy link
Member

It is possible to use gh release create --repo= [1] so that GH CLI does not need to infer the repository information from the Git repository.

GH CLI supports passing such options via environment values [2], which is what this patch makes use of.

It's a follow-up for #13891.

It is possible to use `gh release create --repo=` [[1]] so that GH CLI
does not need to infer the repository information from the Git
repository.

GH CLI supports passing such options via environment values [[2]],
which is what this patch makes use of.

It's a follow-up for pytest-dev#13891.

[1]: https://cli.github.com/manual/gh_release_create
[2]: https://cli.github.com/manual/gh_help_environment
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Nov 12, 2025
@webknjaz webknjaz added the backport 9.0.x apply to PRs at any point; backports the changes to the 9.0.x branch label Nov 12, 2025
Copy link

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 optimizes the create-github-release job in the CI/CD workflow by removing the unnecessary Git repository checkout. By setting the GH_REPO environment variable, the GitHub CLI can create releases without needing to infer repository information from a local Git clone.

Key Changes:

  • Removed the actions/checkout@v5 step from the create-github-release job
  • Added GH_REPO environment variable to support gh release create without local Git repository

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

Copy link
Member

@bluetech bluetech left a comment

Choose a reason for hiding this comment

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

Thanks!

@nicoddemus nicoddemus merged commit 21ad5c6 into pytest-dev:main Nov 12, 2025
33 checks passed
@patchback
Copy link

patchback bot commented Nov 12, 2025

Backport to 9.0.x: 💚 backport PR created

✅ Backport PR branch: patchback/backports/9.0.x/21ad5c65c979dfd2352784b3e074cd34f208dfdf/pr-13942

Backported as #13947

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Nov 12, 2025
* 🧪 Run `gh release` w/o Git in CI/CD

It is possible to use `gh release create --repo=` [[1]] so that GH CLI
does not need to infer the repository information from the Git
repository.

GH CLI supports passing such options via environment values [[2]],
which is what this patch makes use of.

It's a follow-up for #13891.

[1]: https://cli.github.com/manual/gh_release_create
[2]: https://cli.github.com/manual/gh_help_environment

* 📝 Add a change note for PRs #13942 and #13891

(cherry picked from commit 21ad5c6)
nicoddemus pushed a commit that referenced this pull request Nov 12, 2025
* 🧪 Run `gh release` w/o Git in CI/CD

It is possible to use `gh release create --repo=` [[1]] so that GH CLI
does not need to infer the repository information from the Git
repository.

GH CLI supports passing such options via environment values [[2]],
which is what this patch makes use of.

It's a follow-up for #13891.

[1]: https://cli.github.com/manual/gh_release_create
[2]: https://cli.github.com/manual/gh_help_environment

* 📝 Add a change note for PRs #13942 and #13891

(cherry picked from commit 21ad5c6)

Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <webknjaz@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 9.0.x apply to PRs at any point; backports the changes to the 9.0.x branch bot:chronographer:provided (automation) changelog entry is part of PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants