File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 1+ Allow any command of the `release.py` to accept a `--gh-token` argument.
Original file line number Diff line number Diff line change @@ -639,7 +639,16 @@ def _notify(message: str) -> None:
639639
640640
641641@cli .command ()
642- def merge_back () -> None :
642+ # Although this option is not used, allow it anyways. Otherwise the user will
643+ # receive an error when providing it, which is annoying as other commands accept
644+ # it.
645+ @click .option (
646+ "--gh-token" ,
647+ "_gh_token" ,
648+ envvar = ["GH_TOKEN" , "GITHUB_TOKEN" ],
649+ required = False ,
650+ )
651+ def merge_back (_gh_token : Optional [str ]) -> None :
643652 _merge_back ()
644653
645654
@@ -687,7 +696,16 @@ def _merge_back() -> None:
687696
688697
689698@cli .command ()
690- def announce () -> None :
699+ # Although this option is not used, allow it anyways. Otherwise the user will
700+ # receive an error when providing it, which is annoying as other commands accept
701+ # it.
702+ @click .option (
703+ "--gh-token" ,
704+ "_gh_token" ,
705+ envvar = ["GH_TOKEN" , "GITHUB_TOKEN" ],
706+ required = False ,
707+ )
708+ def announce (_gh_token : Optional [str ]) -> None :
691709 _announce ()
692710
693711
You can’t perform that action at this time.
0 commit comments