Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/19035.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allow any command of the `release.py` to accept a `--gh-token` argument.
22 changes: 20 additions & 2 deletions scripts-dev/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,16 @@ def _notify(message: str) -> None:


@cli.command()
def merge_back() -> None:
# Although this option is not used, allow it anyways. Otherwise the user will
# receive an error when providing it, which is annoying as other commands accept
# it.
@click.option(
"--gh-token",
"_gh_token",
envvar=["GH_TOKEN", "GITHUB_TOKEN"],
required=False,
)
def merge_back(_gh_token: Optional[str]) -> None:
_merge_back()


Expand Down Expand Up @@ -687,7 +696,16 @@ def _merge_back() -> None:


@cli.command()
def announce() -> None:
# Although this option is not used, allow it anyways. Otherwise the user will
# receive an error when providing it, which is annoying as other commands accept
# it.
@click.option(
"--gh-token",
"_gh_token",
envvar=["GH_TOKEN", "GITHUB_TOKEN"],
required=False,
)
def announce(_gh_token: Optional[str]) -> None:
_announce()


Expand Down
Loading