-
Notifications
You must be signed in to change notification settings - Fork 87
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
[disablebot] Fix workflow when run on PR #6096
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
16bb3e0
to
9e78265
Compare
# 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 }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait lol what is the diff between GH_MERGEBOT_TOKEN and GH_PYTORCHBOT_TOKEN
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume one is from pytorchmergebot and the other from pytorchbot but I don't actually know
I renamed here to GITHUB_TOKEN because I thought most people have a personal token saved as GITHUB_TOKEN and no mergebot token so when running locally they wouldn't have to remap. Also I guess the name would be misleading when the workflow is just using github token
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
We don't have access to the environment at PR time, so we don't have the GH_PYTORCHBOT_TOKEN. Instead we can fallback to GITHUB_TOKEN, but this doesn't have the necessary permissions for getting the correct unstable + disable jobs. However, being able to test the overall workflow on PR and the disable tests generator is better than nothing