-
Notifications
You must be signed in to change notification settings - Fork 48
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
[Lint] Add bat version and lint CI permission #132
[Lint] Add bat version and lint CI permission #132
Conversation
@@ -10,6 +10,19 @@ jobs: | |||
lint-python: | |||
name: Lint Python | |||
runs-on: ubuntu-latest | |||
permissions: |
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 referenced from Pytorch/TensorRT setting, which is also using third-party actions.
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 think only lint-python
will need to set permissions because others don't use 3p actions.
.github/workflows/lint.yaml
Outdated
permissions: | ||
actions: write | ||
checks: write | ||
contents: write | ||
deployments: none | ||
id-token: write | ||
issues: write | ||
discussions: write | ||
packages: write | ||
pull-requests: write | ||
repository-projects: none | ||
security-events: none | ||
statuses: write |
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.
permissions: | |
actions: write | |
checks: write | |
contents: write | |
deployments: none | |
id-token: write | |
issues: write | |
discussions: write | |
packages: write | |
pull-requests: write | |
repository-projects: none | |
security-events: none | |
statuses: write |
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.
Do we need to change those not using third-party as well?
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.
these jobs are fine. as long as they are not 3p github actions
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.
Then this one if good to go?
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 would just remove the whole permissions section for these two jobs
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.
That won't work. It seems if you have one with specify permissions, you will have to define others as well, based on my trial.
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.
hmm that's good to know. kinda surprising that it works this way though
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.
Nah, I just checked my commit. I think I haven't tried that. Let me give it a try.
id-token: write | ||
issues: none | ||
discussions: none | ||
packages: none |
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.
none fields can be removed because "If you specify the access for any of these scopes, all of those that are not specified are set to none." https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
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 think one of the benefits of leaving it there is that the next person, who needs to change the permission, can see what options he/she has on this (No need to investigate again). Besides, we are not adding more lines on this. What do you think?
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.
sounds good to me
cc @gramalingam for batch files review. |
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, thanks!
fixes #127