-
Notifications
You must be signed in to change notification settings - Fork 263
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
add github actions bot with a hint comment for contributors. #147
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,33 @@ | ||||||||
name: Hint to a github contributor | ||||||||
|
||||||||
on: | ||||||||
pull_request_target: | ||||||||
types: [opened, created] | ||||||||
|
||||||||
jobs: | ||||||||
comment: | ||||||||
runs-on: ubuntu-latest | ||||||||
steps: | ||||||||
- name: Add comment to PR | ||||||||
env: | ||||||||
URL: ${{ github.event.pull_request.comments_url }} | ||||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
MESSAGE: | ||||||||
Hi!\n | ||||||||
Thanks for the patch.\n | ||||||||
Please take a look at | ||||||||
https://github.com/ovn-org/ovn/blob/main/Documentation/internals/contributing/submitting-patches.rst | ||||||||
and | ||||||||
https://github.com/ovn-org/ovn/blob/main/Documentation/internals/contributing/coding-style.rst\n | ||||||||
Squash commits and ensure that your patch passes the checks:\n | ||||||||
```\n | ||||||||
$ ./utilities/checkpatch.py -1\n | ||||||||
```\n | ||||||||
|
||||||||
run: | | ||||||||
curl \ | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're using |
||||||||
-X POST \ | ||||||||
$URL \ | ||||||||
-H "Content-Type: application/json" \ | ||||||||
-H "Authorization: token $GITHUB_TOKEN" \ | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
--data "{ \"body\": \"$MESSAGE\" }" |
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.
https://docs.github.com/en/rest/issues/issues?apiVersion=2022-11-28#create-an-issue
Default permissions for repositories depend on when the repository/user/organization/enterprise was created. Newer organizations are created with more restrictive permissions. Older entities should be upgraded to restricted permissions, but until they are, you'll be able to do things w/o declaring permissions and will experience problems trying to share those workflows to restricted containers.
https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#configuring-the-default-github_token-permissions