-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Internal] Move PR message validation to a separate workflow (#983)
## Changes Move PR message validation to a separate workflow ## Tests Edit this PR message
- Loading branch information
1 parent
00b8067
commit 6253976
Showing
2 changed files
with
26 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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,25 @@ | ||
name: Validate Commit Message | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, edited] | ||
|
||
jobs: | ||
|
||
validate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Validate Tag | ||
run: | | ||
TAG=$(echo ${{ github.event.pull_request.title }} | sed -ne 's/\[\(.*\)\].*/\1/p') | ||
if grep -q "tag: \"\[$TAG\]\"" .codegen/changelog_config.yml; then | ||
echo "Valid tag found: [$TAG]" | ||
else | ||
echo "Invalid or missing tag in commit message: [$TAG]" | ||
exit 1 | ||
fi |
This file contains 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