Add pull_request trigger to build-branch workflow#2299
Draft
jonathanKingston wants to merge 2 commits intomainfrom
Draft
Add pull_request trigger to build-branch workflow#2299jonathanKingston wants to merge 2 commits intomainfrom
jonathanKingston wants to merge 2 commits intomainfrom
Conversation
The comment job now runs on PR open/reopen in addition to push. On pull_request events, it resolves the existing pr-releases/ build branch (created by the prior push) via git ls-remote and posts the comment immediately — no rebuild needed. Refactored the comment step into a separate job so the same template is used for both triggers.
Contributor
Build Branch
Static preview entry points
QR codes (mobile preview)
Integration commandsnpm (Android / Extension): Swift Package Manager (Apple): .package(url: "https://github.com/duckduckgo/content-scope-scripts.git", branch: "pr-releases/jkt/auto/workflow-pr-trigger-state-9f80")git submodule (Windows): git -C submodules/content-scope-scripts fetch origin pr-releases/jkt/auto/workflow-pr-trigger-state-9f80
git -C submodules/content-scope-scripts checkout origin/pr-releases/jkt/auto/workflow-pr-trigger-state-9f80Pin to exact commitnpm (Android / Extension): Swift Package Manager (Apple): .package(url: "https://github.com/duckduckgo/content-scope-scripts.git", revision: "297953d0bf5bb3830cc4f09ad10fa8d2a90263bb")git submodule (Windows): git -C submodules/content-scope-scripts fetch origin pr-releases/jkt/auto/workflow-pr-trigger-state-9f80
git -C submodules/content-scope-scripts checkout 297953d0bf5bb3830cc4f09ad10fa8d2a90263bb |
Contributor
[Beta] Generated file diffTime updated: Fri, 20 Feb 2026 18:23:35 GMT |
Pass github.event.pull_request.head.ref, github.ref_name, and
github.event_name through env vars instead of inline ${{ }}
expansion in the shell script. The pull_request trigger accepts
PRs from forks, so head.ref is attacker-controlled and could
contain shell metacharacters.
Contributor
Author
|
@laghee we discussed this at some point, I've not really looked through the change that much. I think it makes sense to me. |
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.
The comment job now runs on PR open/reopen in addition to push. On pull_request events, it resolves the existing pr-releases/ build branch (created by the prior push) via git ls-remote and posts the comment immediately — no rebuild needed.
Refactored the comment step into a separate job so the same template is used for both triggers.
Asana Task/Github Issue:
Description
Testing Steps
Checklist
Please tick all that apply:
Note
Low Risk
Workflow-only changes to GitHub Actions triggers and PR commenting; no production code, secrets, or data handling logic modified.
Overview
Adds a
pull_requesttrigger (open/reopen) to thebuild-branchGitHub Actions workflow so PRs get the build-branch preview comment immediately.Refactors commenting into a separate
commentjob that resolves the existingpr-releases/<source-branch>viagit ls-remoteand posts/updates the bot comment; forpushevents it still finds PRs by head branch, and it skips commenting when the build branch doesn’t exist.Written by Cursor Bugbot for commit 32f11b3. This will update automatically on new commits. Configure here.