mirror of
https://github.com/stan220/flathub.git
synced 2026-09-08 17:28:57 +00:00
pr-check: Add new checks
This commit is contained in:
@@ -101,6 +101,10 @@ jobs:
|
|||||||
PR_THREAD_COUNT=$(gh api repos/$GH_REPO/pulls/$PR_NUM/comments \
|
PR_THREAD_COUNT=$(gh api repos/$GH_REPO/pulls/$PR_NUM/comments \
|
||||||
--jq '[.[] | select(.position != null)] | length')
|
--jq '[.[] | select(.position != null)] | length')
|
||||||
|
|
||||||
|
COMMIT_COUNT="(gh api repos/$GH_REPO/pulls/$PR_NUM --jq '.commits')"
|
||||||
|
|
||||||
|
CONTAINS_MASTER=$(gh api repos/$GH_REPO/pulls/$PR_NUM/commits --jq '.[1] | (.commit.author.email == "mclasen@redhat.com" and .commit.message == "Add some instructions")')
|
||||||
|
|
||||||
BLOCKED=0
|
BLOCKED=0
|
||||||
|
|
||||||
comment_exists() {
|
comment_exists() {
|
||||||
@@ -140,6 +144,16 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [ "$CONTAINS_MASTER" = "true" ]; then
|
||||||
|
echo "PR contains commits from master branch"
|
||||||
|
BLOCKED=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$CONTAINS_MASTER" = "true" ]; then
|
||||||
|
echo "PR contains commits from master branch"
|
||||||
|
BLOCKED=1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$EXIT_CODE" -ne 0 ]; then
|
if [ "$EXIT_CODE" -ne 0 ]; then
|
||||||
echo "PR title validation failed"
|
echo "PR title validation failed"
|
||||||
BLOCKED=1
|
BLOCKED=1
|
||||||
@@ -230,6 +244,16 @@ jobs:
|
|||||||
|
|
||||||
bot, build
|
bot, build
|
||||||
BUILD_START_COMMENT_PARTIAL: "Starting a test build of the submission"
|
BUILD_START_COMMENT_PARTIAL: "Starting a test build of the submission"
|
||||||
|
REVIEW_COMMENT: |
|
||||||
|
This pull request is temporarily marked as blocked as some
|
||||||
|
automated checks failed on it. Please make sure the
|
||||||
|
following are items are done:
|
||||||
|
|
||||||
|
1. The title of the pull request is `Add $FLATPAK_ID`.
|
||||||
|
2. All [checklist items](https://github.com/flathub/flathub/blob/master/.github/pull_request_template.md)
|
||||||
|
in the pull request body are marked as complete.
|
||||||
|
3. The pull request does not contain commits from the `master`
|
||||||
|
branch of [this repository](https://github.com/flathub/flathub/commits/master/).
|
||||||
REVIEW_COMMENT: >
|
REVIEW_COMMENT: >
|
||||||
This pull request is temporarily marked as blocked as some
|
This pull request is temporarily marked as blocked as some
|
||||||
automated checks failed on it. Please make sure the pull
|
automated checks failed on it. Please make sure the pull
|
||||||
|
|||||||
Reference in New Issue
Block a user