diff --git a/.github/workflows/on-progress-on-branch-creation.yml b/.github/workflows/on-progress-on-branch-creation.yml new file mode 100644 index 0000000..66b66fe --- /dev/null +++ b/.github/workflows/on-progress-on-branch-creation.yml @@ -0,0 +1,25 @@ +name: Make issue "In progress" on branch creation + +on: + create: + +jobs: + move-to-in-progress: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - uses: actions/github-script@v7 + with: + script: | + const branch = context.ref.replace('refs/heads/', ''); + const match = branch.match(/^(\d+)-/); + if (!match) return; + + const issueNumber = parseInt(match[1]); + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issueNumber, + labels: ['In progress'] + });