tod 0.11.2

An unofficial Todoist command-line client
# This workflow checks if a pull request is labeled with "do not merge" or "WIP" and fails any jobs if the tag exists.

name: 'Check PR Merge' 
permissions:
  contents: read
on:
    pull_request:
        branches:
            - main
        types:
            - opened
            - reopened
            - synchronize
            - edited
            - labeled
            - unlabeled

jobs:
  fail-by-label:
    if: contains(github.event.pull_request.labels.*.name, 'do not merge') || contains(github.event.pull_request.labels.*.name, 'WIP')
    runs-on: ubuntu-latest
    steps:
      - name: Fail if PR is labeled "do not merge" or "WIP"
        # This step will fail the job if the PR has the "do not merge" or "WIP" label.
        run: |
          echo "This PR is labeled 'do not merge' or 'WIP'. Please remove the label to proceed with merging."
          exit 1