joerick / pr-labels-action

A Github action that extracts labels from the PR that this build belongs to, and makes them available to other actions.
25 stars 7 forks source link

Error message: Not a pull request #4

Closed ericknyoto closed 3 years ago

ericknyoto commented 3 years ago

I have a conflicted PR with: base: staging branch compare: feature branch

I put the workflow on master branch. But the steps for pr-labels-actions shows: Not a pull request

name: check-conflicts-and-notify
on:
  schedule:
    - cron: '*/5 * * * *'
jobs:
  check-conflicts:
    runs-on: self-hosted
    steps:
      - name: Label merge conflicts
        uses: eps1lon/actions-label-merge-conflict@v2.0.0
        with:
          repoToken: "${{ secrets.JG_BOT_TOKEN }}"
          dirtyLabel: "conflicts"
          removeOnDirtyLabel: "automerge"
          continueOnMissingPermissions: true
      - name: Check conflicted PR
        uses: joerick/pr-labels-action@v1.0.6
        id: pr-labels
      - name: Sent to Google Chat
        if: contains(steps.pr-labels.outputs.labels, ' conflicts ')
        uses: Co-qn/google-chat-notification@releases/v1
        with:
          name: Conflict Merge to Staging
          url: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
          status: failure
joerick commented 3 years ago

Hmm, I guess I didn't explain well what the action does. It should run in an on: pull_request workflow - it uses metadata from the pull request it's building

ericknyoto commented 3 years ago

Thanks, I used on: schedule. Thats why the workflow weren't triggered.