mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2025-12-24 02:39:18 -05:00
ci: updated support workflow concurrency and logic (#1926)
This commit is contained in:
37
.github/workflows/support.yml
vendored
37
.github/workflows/support.yml
vendored
@@ -4,33 +4,52 @@ on:
|
|||||||
issues:
|
issues:
|
||||||
types: [labeled, unlabeled, reopened]
|
types: [labeled, unlabeled, reopened]
|
||||||
|
|
||||||
permissions: {}
|
permissions:
|
||||||
|
issues: read
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: support-${{ github.ref }}
|
group: support-${{ github.event.issue.number }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
support:
|
support:
|
||||||
if: github.event.label.name == 'support'
|
if: github.event.label.name == 'support' || github.event.action == 'reopened'
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
permissions:
|
permissions:
|
||||||
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 }}
|
||||||
steps:
|
steps:
|
||||||
- name: Comment and close issue
|
- name: Label added, comment and close issue
|
||||||
run: gh issue close "$NUMBER" -r "off-topic" -c "$BODY"
|
if: github.event.action == 'labeled' && github.event.label.name == 'support'
|
||||||
|
shell: bash
|
||||||
env:
|
env:
|
||||||
BODY: >
|
BODY: >
|
||||||
:wave: @{issue-author}, we use the issue tracker exclusively
|
:wave: @${{ env.ISSUE_AUTHOR }}, we use the issue tracker exclusively
|
||||||
for bug reports and feature requests. However, this issue appears
|
for bug reports and feature requests. However, this issue appears
|
||||||
to be a support request. Please use our support channels
|
to be a support request. Please use our support channels
|
||||||
to get help with Jellyseerr.
|
to get help with Jellyseerr.
|
||||||
|
|
||||||
- [Discord](https://discord.gg/ckbvBtDJgC)
|
- [Discord](https://discord.gg/ckbvBtDJgC)
|
||||||
|
run: |
|
||||||
|
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 close "$NUMBER" || true
|
||||||
|
gh issue lock "$NUMBER" -r "off_topic" || true
|
||||||
|
|
||||||
- name: Lock issue
|
- name: Reopened or label removed, unlock issue
|
||||||
run: gh issue lock "$NUMBER" -r "off_topic"
|
if: github.event.action == 'unlabeled' && github.event.label.name == 'support'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
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
|
||||||
|
gh issue unlock "$NUMBER" || true
|
||||||
|
|
||||||
|
- name: Remove support label on manual reopen
|
||||||
|
if: github.event.action == 'reopened'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
gh issue edit "$NUMBER" --remove-label "support" || true
|
||||||
|
gh issue unlock "$NUMBER" || true
|
||||||
|
|||||||
Reference in New Issue
Block a user