Skip to content

Feature request: return the number of the PR created as an output #78

@xiehan

Description

@xiehan

From what I can tell, this is already available in the code, so it should hopefully be fairly easy to return it as an output.

pull_request_number = create_pull_request(

How to specify that an Action has outputs: https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#outputs-for-docker-container-and-javascript-actions
End-to-end example including how to set the output: https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action

Use case: I have a process that needs to run on the PR that was created by this action. Right now I do:

prnumber=$(gh search prs --repo ${{ github.repository }} --state open --match title "$PR_TITLE" --json number --jq '.[].number')

... which works but is kinda janky. It'd be great if this action would just return the number of the PR that was created so I wouldn't have to do this extra step.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions