Skip to content

Why does the number input have a lower priority than the pull request event number? #608

Open
@rossjrw

Description

Docs state that the number input has a lower priority than the implicit ${{ github.event.number }} from the context of a pull_request (et al.) event:

### `number`
**Optional** Pull request number for push event. Note that this has a **lower priority** than the number of a pull_request event.

export const pullRequestNumber =
context?.payload?.pull_request?.number ||
+core.getInput("number", {required: false})

Why is this the case? If the end user explicitly specifies a PR number, even during a pull_request workflow, doesn't it make more sense to assume the user knows what they're doing and respect that setting?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions