Skip to content

Commit

Permalink
tc
Browse files Browse the repository at this point in the history
  • Loading branch information
clee2000 committed Jan 9, 2025
1 parent 73fbf31 commit 9e78265
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/update_disabled_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,9 @@ def main() -> None:
help="Set the repo to query the issues from",
)
args = parser.parse_args()
token = os.getenv("GH_PYTORCHBOT_TOKEN")
token = os.getenv("GITHUB_TOKEN")
if not token:
raise RuntimeError("The GH_PYTORCHBOT_TOKEN environment variable is required")
raise RuntimeError("The GITHUB_TOKEN environment variable is required")

# Get the list of disabled issues and sort them
disable_issues = get_disable_issues(token)
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/update_disabled_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ permissions:
jobs:
update-disabled-tests:
runs-on: ubuntu-latest
environment: trigger-nightly
environment: ${{ github.ref == 'refs/heads/main' && 'trigger-nightly' || '' }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -27,8 +27,10 @@ jobs:
# The token is used to confirm issue creator's write permission before
# allowing them to disable jobs. Note that the token needs to have access
# to the target repo, i.e. pytorch/pytorch instead of test-infra. Using
# PyTorch bot token is the most obvious choice.
GH_PYTORCHBOT_TOKEN: ${{ secrets.GH_PYTORCHBOT_TOKEN }}
# PyTorch bot token is the most obvious choice. Outside of the
# environment, we do not have access to this token so fall back to the
# GITHUB_TOKEN.
GITHUB_TOKEN: ${{ github.ref == 'refs/heads/main' && secrets.GH_MERGEBOT_TOKEN || secrets.GITHUB_TOKEN }}
run: |
python3 .github/scripts/update_disabled_issues.py
Expand Down

0 comments on commit 9e78265

Please sign in to comment.