-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[HUDI-4754] Add compliance check in github actions #6575
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
Merged
Merged
Changes from 30 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
353d9b6
pr title and comment validation
140189a
should work when edited
1600e31
check didn't run, hope this fixes
b1bf6ad
going back to how it was before
4d02f2c
adding some debugging to env vars
9f5bcdb
was setting the title env var to be the body. dumb typo
48147d1
getting rid of env vars because they didn't persist
a7a693c
this might fix the issue
0cb0b8f
capitalization on risk level doesn't matter now
c644d73
reducing title constraint so that the minimum number of digits is now 1
a2f8065
update test to reflect changes
a0d748b
current progress
6070ef9
trying to show error message
0e2333d
Merge branch 'apache:master' into inspect_pr_compliance
jonvex fe610b4
fixed typo
64ea13e
fixed typo
242f21c
addressed all found bugs
8977c6c
try to get error message to work
76ad961
testing template edit
b524fcc
fixed bash error
3f2440a
still trying to get template edit check to work
3ef2ca8
still having git issue
892ca08
disable on pr for faster testing
8bf172f
next try
5dfc76a
another try
17bb02d
another try
17d2908
another try
bba74fe
reverted change
00cd7e6
actually reverted change
51979ee
give a better error message
7e3c8e9
finished writing the testing
5e363b5
got rid of documentation from parsing
580379d
updated readme
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| #How to update the Pull Request Template | ||
| When updating the pr template, you must consider if updates need to be made to scripts/pr_compliance.py | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| name: validate pr | ||
| on: | ||
| pull_request: | ||
| types: [opened, edited, reopened, synchronize] | ||
| branches: | ||
| - master | ||
|
|
||
| jobs: | ||
| validate-pr: | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| REQUEST_BODY: ${{ github.event.pull_request.body }} | ||
| REQUEST_TITLE: ${{ github.event.pull_request.title }} | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: actions/setup-python@v3 | ||
| - name: run script | ||
| run: python scripts/pr_compliance.py > test.log || { echo "::error::pr_compliance.py $(cat test.log)" && exit 1; } | ||
xushiyan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
|
|
||
xushiyan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| name: Update Template | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, edited, reopened, synchronize] | ||
| branches: | ||
| - master | ||
| paths: | ||
| - .github/PULL_REQUEST_TEMPLATE.md | ||
|
|
||
| jobs: | ||
| check-script: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: ensure script is updated | ||
| run: git diff --name-only remotes/origin/master HEAD | grep -c scripts/pr_compliance.py || { echo "::error::PULL_REQUEST_TEMPLATE.md scripts/pr_compliance.py not updated" && exit 1; } | ||
xushiyan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.