Skip to content

Fix: forward pr-number input to sticky-pull-request-comment#131

Open
ndoschek wants to merge 1 commit intorossjrw:mainfrom
ndoschek:fix/forward-pr-number-to-sticky-comment
Open

Fix: forward pr-number input to sticky-pull-request-comment#131
ndoschek wants to merge 1 commit intorossjrw:mainfrom
ndoschek:fix/forward-pr-number-to-sticky-comment

Conversation

@ndoschek
Copy link

Problem

When using the action in a workflow_run triggered workflow, the pr-number input is correctly used for the deployment path, but it is not passed to the sticky-pull-request-comment step. As a result, the comment step is skipped with the following message:

no pull request numbers given: skip step

Example: https://github.com/eclipse-theia/theia-website/actions/runs/21430355423/job/61708044522#step:6:206

This issue occurs because workflow_run events do not provide github.event.pull_request.number, which sticky-pull-request-comment depends on by default.

Fix

Pass the number parameter to both sticky-pull-request-comment steps, with a fallback to maintain backwards compatibility: number: ${{ env.pr_number || github.event.pull_request.number }}

This ensures that:

  • workflow_run workflows function correctly when pr-number is provided
  • Existing pull_request and pull_request_target workflows continue to work without changes

The pr-number input is used for the deployment path but not passed to
the sticky-pull-request-comment step, causing comments to be skipped
in workflow_run contexts where github.event.pull_request.number is
unavailable.

Fixes comment posting for workflow_run triggered deployments while
preserving existing behavior for pull_request workflows.
@rossjrw rossjrw added the bug Something isn't working label Jan 30, 2026
@rossjrw rossjrw mentioned this pull request Jan 30, 2026
ndoschek added a commit to eclipse-theia/theia-website that referenced this pull request Feb 2, 2026
- pr-preview-action doesn't forward pr-number to sticky-pull-request-comment
- Comments skipped in workflow_run contexts where github.event.pull_request.number is unavailable
- Workaround by calling sticky-pull-request-comment directly with the PR number until upstream fix was merged and published (rossjrw/pr-preview-action#131)
ndoschek added a commit to eclipse-theia/theia-website that referenced this pull request Feb 2, 2026
- pr-preview-action doesn't forward pr-number to sticky-pull-request-comment
- Comments skipped in workflow_run contexts where github.event.pull_request.number is unavailable
- Workaround by calling sticky-pull-request-comment directly with the PR number until upstream fix was merged and published (rossjrw/pr-preview-action#131)
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

Successfully merging this pull request may close these issues.

2 participants