# This ensures that when a ticket is not labeled as Done in Jira, it will re-open the ticket on GitHub.

name: Labeling ticket "To Do"
on:
  issues:
    types: [labeled]
jobs:
  label_issues:
    runs-on: ubuntu-latest
    if: |
      !contains(github.event.issue.labels.*.name, 'status: done')
    permissions:
      issues: write
    steps:
      - run: 'gh issue reopen "$NUMBER"'
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          GH_REPO: ${{ github.repository }}
          NUMBER: ${{ github.event.issue.number }}
