Fix: forward pr-number input to sticky-pull-request-comment#131
Open
ndoschek wants to merge 1 commit intorossjrw:mainfrom
Open
Fix: forward pr-number input to sticky-pull-request-comment#131ndoschek wants to merge 1 commit intorossjrw:mainfrom
ndoschek wants to merge 1 commit intorossjrw:mainfrom
Conversation
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.
Draft
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When using the action in a
workflow_runtriggered workflow, thepr-numberinput is correctly used for the deployment path, but it is not passed to thesticky-pull-request-commentstep. As a result, the comment step is skipped with the following message:no pull request numbers given: skip stepExample: https://github.com/eclipse-theia/theia-website/actions/runs/21430355423/job/61708044522#step:6:206
This issue occurs because
workflow_runevents do not providegithub.event.pull_request.number, whichsticky-pull-request-commentdepends on by default.Fix
Pass the
numberparameter to bothsticky-pull-request-commentsteps, with a fallback to maintain backwards compatibility:number: ${{ env.pr_number || github.event.pull_request.number }}This ensures that:
workflow_runworkflows function correctly whenpr-numberis providedpull_requestandpull_request_targetworkflows continue to work without changes