diff --git a/.github/workflows/jiralabels.yml b/.github/workflows/jiralabels.yml deleted file mode 100644 index 41220aeb..00000000 --- a/.github/workflows/jiralabels.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Ensure GH PRs have a corresponding JIRA issue - -on: - pull_request: - types: [opened, edited] - -permissions: - contents: read - pull-requests: write - -env: - GH_REPO: ${{ github.repository }} - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NUM: ${{ github.event.pull_request.number }} - -jobs: - check-jira-uri: - runs-on: ubuntu-latest - steps: - - name: Check for required URI pattern - id: check_uri - env: - PR_BODY: ${{ github.event.pull_request.body }} - URIPAT: "https://issues.redhat.com/browse/OPENJDK-" - run: | - if echo "$PR_BODY" | grep -q "$URIPAT"; then - echo "missing=false" >> $GITHUB_OUTPUT - else - echo "missing=true" >> $GITHUB_OUTPUT - fi - - - name: Apply label if URI missing - if: steps.check_uri.outputs.missing == 'true' - run: | - gh pr edit "$NUM" --add-label "needs-jira-issue" - exit 1 # fail workflow; must be resolved to green-light PR - - - name: Remove label if URI present - if: steps.check_uri.outputs.missing == 'false' - run: gh pr edit "$NUM" --remove-label "needs-jira-issue" - - label-branch: - runs-on: ubuntu-latest - steps: - - name: Add branch label if missing - run: gh pr edit "$NUM" --add-label "$GITHUB_BASE_REF"