Alert unsigned commits higher frequency (#16579)
This commit is contained in:
@@ -21,12 +21,7 @@ jobs:
|
||||
set -x
|
||||
HEAD_SHA=${{ github.event.pull_request.head.sha }}
|
||||
PR_NUMBER=${{ github.event.pull_request.number }}
|
||||
|
||||
BRAVE_CORE_PATH=brave/brave-core
|
||||
post_once() {
|
||||
comments=$(gh -R "$BRAVE_CORE_PATH" pr view "$PR_NUMBER" --json comments --jq ".comments[].body")
|
||||
grep -F -q "$(head -1 <<<"$1")" <<<"$comments" || gh -R "$BRAVE_CORE_PATH" pr comment "$PR_NUMBER" -b "$1"
|
||||
}
|
||||
|
||||
commit=$(gh api -H "Accept: application/vnd.github+json" "/repos/${BRAVE_CORE_PATH}/commits/${HEAD_SHA}")
|
||||
verification=$(jq -r .commit.verification <<<"$commit")
|
||||
@@ -39,5 +34,5 @@ jobs:
|
||||
Please follow the handbook to configure [commit signing](https://github.com/brave/handbook/blob/master/development/commit-and-tag-signing.md)
|
||||
cc: @${author_login}
|
||||
"
|
||||
post_once "$msg"
|
||||
gh -R "$BRAVE_CORE_PATH" pr comment "$PR_NUMBER" -b "$msg"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user