-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Labels
Description
Subject of the issue
the action doesn't return api data on closed pr event
Your git environment
I have two github jobs one is to get the data using this repo action and one is a job that triggered when a pr is closed
jobs:
get-pr:
runs-on: ubuntu-latest
outputs:
PR: ${{steps.PR.outputs.pr}}
steps:
- name: Find Pull Request
uses: 8BitJonny/[email protected]
id: PR
with:
sha: ${{ github.event.pull_request.head.sha }}
closed_by_user:
timeout-minutes: 30
needs: get-pr
if: needs.get-pr.outputs.PR != '' && github.event.pull_request.merged == false && github.event.pull_request.closed
runs-on: ubuntu-latest
steps:
.....
Steps to reproduce
with the following if condition on the job
needs.get-pr.outputs.PR != '' && github.event.pull_request.merged == false && github.event.pull_request.closed
Expected behaviour
needs.get-pr.outputs.PR return json data , the job will triggered
Actual behaviour
the closed_by_user jobs didn't run because the needs.get-pr.outputs.PR didn't return any json data
when I removed the needs.get-pr.outputs.PR != '' the job is triggered, but got error since I need a data from the API, but the data is empty