Skip to content

Automate some GitHub PR status labels manipulations #1

Automate some GitHub PR status labels manipulations

Automate some GitHub PR status labels manipulations #1

Workflow file for this run

name: labels
on:
pull_request:
types: [ opened, synchronize, reopened, converted_to_draft, ready_for_review ]
permissions:
pull-requests: write
jobs:
open:
runs-on: ubuntu-latest
if: ${{ github.event.action == "opened" && github.event.pull_request.draft }}
steps:
- run: gh pr edit $ISSUE --add-label "Status: Work in Progress"

Check failure on line 15 in .github/workflows/labels.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/labels.yml

Invalid workflow file

You have an error in your yaml syntax on line 15
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE: ${{ github.event.pull_request.html_url }}
push:
runs-on: ubuntu-latest
if: ${{ github.event.action == "synchronize" || github.event.action == "reopened" }}
steps:
- run: gh pr edit $ISSUE --remove-label "Status: Accepted,Status: Inactive,Status: Revision Needed,Status: Stale"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE: ${{ github.event.pull_request.html_url }}
draft:
runs-on: ubuntu-latest
if: ${{ github.event.action == "converted_to_draft" }}
steps:
- run: gh pr edit $ISSUE --remove-label "Status: Accepted,Status: Code Review Needed,Status: Inactive,Status: Revision Needed,Status: Stale" --add-label "Status: Work in Progress"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE: ${{ github.event.pull_request.html_url }}
rfr:
runs-on: ubuntu-latest
if: ${{ github.event.action == "ready_for_review" }}
steps:
- run: gh pr edit $ISSUE --remove-label "Status: Accepted,Status: Inactive,Status: Revision Needed,Status: Stale,Status: Work in Progress" --add-label "Status: Code Review Needed"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE: ${{ github.event.pull_request.html_url }}