Skip to content
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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/hint.yml
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 }}
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 \
-X POST \
$URL \
-H "Content-Type: application/json" \
-H "Authorization: token $GITHUB_TOKEN" \
--data "{ \"body\": \"$MESSAGE\" }"
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ EXTRA_DIST = \
.ci/osx-build.sh \
.ci/osx-prepare.sh \
.ci/ovn-kubernetes/Dockerfile \
.github/workflows/hint.yml \
.github/workflows/test.yml \
.github/workflows/ovn-kubernetes.yml \
boot.sh \
Expand Down