Update support.yml fixed the gh -R issue (#1928)
This commit is contained in:
15
.github/workflows/support.yml
vendored
15
.github/workflows/support.yml
vendored
@@ -19,6 +19,7 @@ jobs:
|
|||||||
issues: write
|
issues: write
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GH_REPO: ${{ github.repository }}
|
||||||
NUMBER: ${{ github.event.issue.number }}
|
NUMBER: ${{ github.event.issue.number }}
|
||||||
ISSUE_AUTHOR: ${{ github.event.issue.user.login }}
|
ISSUE_AUTHOR: ${{ github.event.issue.user.login }}
|
||||||
steps:
|
steps:
|
||||||
@@ -35,21 +36,21 @@ jobs:
|
|||||||
- [Discord](https://discord.gg/ckbvBtDJgC)
|
- [Discord](https://discord.gg/ckbvBtDJgC)
|
||||||
run: |
|
run: |
|
||||||
retry() { n=0; until "$@"; do n=$((n+1)); [ $n -ge 3 ] && break; echo "retry $n: $*" >&2; sleep 2; done; }
|
retry() { n=0; until "$@"; do n=$((n+1)); [ $n -ge 3 ] && break; echo "retry $n: $*" >&2; sleep 2; done; }
|
||||||
retry gh issue comment "$NUMBER" -b "$BODY" || true
|
retry gh issue comment "$NUMBER" -R "$GH_REPO" -b "$BODY" || true
|
||||||
retry gh issue close "$NUMBER" || true
|
retry gh issue close "$NUMBER" -R "$GH_REPO" || true
|
||||||
gh issue lock "$NUMBER" -r "off_topic" || true
|
gh issue lock "$NUMBER" -R "$GH_REPO" -r "off_topic" || true
|
||||||
|
|
||||||
- name: Reopened or label removed, unlock issue
|
- name: Reopened or label removed, unlock issue
|
||||||
if: github.event.action == 'unlabeled' && github.event.label.name == 'support'
|
if: github.event.action == 'unlabeled' && github.event.label.name == 'support'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
retry() { n=0; until "$@"; do n=$((n+1)); [ $n -ge 3 ] && break; echo "retry $n: $*" >&2; sleep 2; done; }
|
retry() { n=0; until "$@"; do n=$((n+1)); [ $n -ge 3 ] && break; echo "retry $n: $*" >&2; sleep 2; done; }
|
||||||
retry gh issue reopen "$NUMBER" || true
|
retry gh issue reopen "$NUMBER" -R "$GH_REPO" || true
|
||||||
gh issue unlock "$NUMBER" || true
|
gh issue unlock "$NUMBER" -R "$GH_REPO" || true
|
||||||
|
|
||||||
- name: Remove support label on manual reopen
|
- name: Remove support label on manual reopen
|
||||||
if: github.event.action == 'reopened'
|
if: github.event.action == 'reopened'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
gh issue edit "$NUMBER" --remove-label "support" || true
|
gh issue edit "$NUMBER" -R "$GH_REPO" --remove-label "support" || true
|
||||||
gh issue unlock "$NUMBER" || true
|
gh issue unlock "$NUMBER" -R "$GH_REPO" || true
|
||||||
|
|||||||
Reference in New Issue
Block a user