Skip to content

Fix gh pr new command #13639

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

popododo0720
Copy link

Closes #13638

Description

Fixed deprecated gh pr new command in scripts/prepare-release-pr.py to use gh pr create instead.

Problem

  • gh pr new was deprecated in GitHub CLI 2.0 and is no longer a valid command
  • Script fails when executed with modern GitHub CLI versions

Solution

  • Replaced gh pr new with gh pr create in prepare-release-pr.py (line 133)
  • Added changelog entry (changelog/13638.bugfix.rst)
  • Updated AUTHORS file

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Aug 8, 2025
Copy link
Member

Choose a reason for hiding this comment

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

This should probably be contrib instead of bugfix as it's not a bugfix relevant for users of pytest.

Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

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

Additionally to changing the note type, the markup could be improved a little.

Comment on lines +1 to +2
Fixed deprecated ``gh pr new`` command in :file:`scripts/prepare-release-pr.py`.
The script now uses ``gh pr create`` which is compatible with GitHub CLI v2.0+.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Fixed deprecated ``gh pr new`` command in :file:`scripts/prepare-release-pr.py`.
The script now uses ``gh pr create`` which is compatible with GitHub CLI v2.0+.
Fixed deprecated :command:`gh pr new` command in :file:`scripts/prepare-release-pr.py`.
The script now uses :command:`gh pr create` which is compatible with GitHub CLI v2.0+.

Copy link
Member

Choose a reason for hiding this comment

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

I got curious because those were new to me, but it doesn't seem :command: or :file: have any effect other than format the text as code:

image

I don't mind leaving it there if you prefer, but I mention in case it was expected to produce different results.

Copy link
Member

Choose a reason for hiding this comment

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

I think Furo needs to learn to style them. But markup-wise, they are nice to have.

Copy link
Member

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:provided (automation) changelog entry is part of PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gh pr new - No longer valid. Use gh pr create.
4 participants