mirror of
https://github.com/stan220/flathub.git
synced 2026-09-08 18:29:08 +00:00
ci: Fix the action again
This commit is contained in:
@@ -23,14 +23,10 @@ jobs:
|
||||
in error, please comment or reopen!
|
||||
REPO: flathub/flathub
|
||||
run: |
|
||||
has_label=$(gh pr --repo "$REPO" view ${{ github.event.pull_request.number }} --json labels -q '.labels | any(.name == "leave-open")')
|
||||
has_label=$(gh pr --repo "$REPO" view "${{ github.event.pull_request.number }}" --json labels -q '.labels | any(.name == "leave-open")')
|
||||
|
||||
if [[ "$has_label" != "true" ]]; then
|
||||
if gh api orgs/${{ github.repository_owner }}/members/${{ github.event.pull_request.user.login }} --silent; then
|
||||
echo "User $PR_AUTHOR is a member of $ORG_NAME. Skipping"
|
||||
else
|
||||
echo "User $PR_AUTHOR is not a member of $ORG_NAME and no 'leave-open' label is found"
|
||||
gh pr --repo "$REPO" close ${{ github.event.pull_request.number }} -c "$COMMENT"
|
||||
else
|
||||
echo "PR has 'leave-open' label. Skipping"
|
||||
if ! gh api orgs/${{ github.repository_owner }}/members/${{ github.event.pull_request.user.login }} --silent; then
|
||||
gh pr --repo "$REPO" close "${{ github.event.pull_request.number }}" -c "$COMMENT"
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user