Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find pull request warning for pull_request closed event #775

Open
5 tasks
convers39 opened this issue Apr 23, 2024 · 3 comments
Open
5 tasks

Could not find pull request warning for pull_request closed event #775

convers39 opened this issue Apr 23, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@convers39
Copy link

Description:

I need to run a workflow after a PR is closed or merged. So I set the types as closed. Now the issue is since the PR is closed first in order to trigger the workflow, labeler seems not able to find a closed PR and gives me a warning message of Could not find pull request <number>, skipping. I have some tasks which rely on labeler, so wonder if there is any way to work with closed PRs.

on:
  pull_request:
    types: [ closed ]
jobs:
  delete_channel:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      id-token: write
    steps:
      - name: チェックアウト
        uses: actions/checkout@v4
        with:
          ref: ${{ github.event.pull_request.head.sha }}
      # ...
      - id: pr_labels
        uses: actions/labeler@v5
image

Action version:
Specify the action version

v5

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:

basically the action file I posted

Expected behavior:

Possible to deal with closed PRs.

Actual behavior:

Could not find pull request <number>, skipping warning, and the following steps are skipped.

@convers39 convers39 added bug Something isn't working needs triage labels Apr 23, 2024
@convers39
Copy link
Author

currently, I tried another workflow that can retrieve the labels after PR is closed

https://github.com/marketplace/actions/get-labels-action

@HarithaVattikuti
Copy link
Contributor

Hello @convers39
Thank you for creating this issue. We will investigate it and get back to you as soon as we have some feedback.

@abcdefghiraj
Copy link

Try adding the following to the params, I went through the code quickly and it seems prNumber is retrieved from a param pr-number.

pr-number: ${{ github.event.number }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants