pr-check: Add new checks

This commit is contained in:
bbhtt
2025-09-14 10:39:24 +05:30
parent 8793b5f806
commit ed894a7155
+24
View File
@@ -101,6 +101,10 @@ jobs:
PR_THREAD_COUNT=$(gh api repos/$GH_REPO/pulls/$PR_NUM/comments \
--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
comment_exists() {
@@ -140,6 +144,16 @@ jobs:
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
echo "PR title validation failed"
BLOCKED=1
@@ -230,6 +244,16 @@ jobs:
bot, build
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: >
This pull request is temporarily marked as blocked as some
automated checks failed on it. Please make sure the pull