-
Notifications
You must be signed in to change notification settings - Fork 0
[WIP] Ensure updates are pushing to other orgs and repos #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
c2d9d7c
cde310d
330d352
caa4bce
46f5a4b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,129 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Auto-merge PRs after CI passes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Automatically merges approved PRs to main once all checks pass | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: Auto Merge | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pull_request_review: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| types: [submitted] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| workflow_run: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| workflows: ["CI"] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| types: [completed] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| auto-merge: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: Auto Merge PR | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Only run on approved PRs targeting main | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| github.event_name == 'pull_request_review' || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| contents: write | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pull-requests: write | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| checks: read | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Get PR info | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id: pr | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Get PR number from the event | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [ "${{ github.event_name }}" == "pull_request_review" ]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PR_NUMBER="${{ github.event.pull_request.number }}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| elif [ "${{ github.event_name }}" == "workflow_run" ]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Extract PR number from workflow run | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PR_NUMBER=$(gh pr list --json number,headRefName --jq '.[] | select(.headRefName=="${{ github.event.workflow_run.head_branch }}") | .number' | head -1) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Check failureCode scanning / CodeQL Code injection Critical
Potential code injection in
${ github.event.workflow_run.head_branch } Error loading related location Loading workflow_run Error loading related location Loading
Copilot AutofixAI 18 days ago In general, to fix code injection issues in GitHub Actions, never interpolate untrusted For this workflow, the only problematic usage is Concretely:
No new methods or external libraries are needed; we only adjust the YAML workflow and rely on normal Bash variable expansion.
Suggested changeset
1
.github/workflows/auto-merge.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "No PR found for event type: ${{ github.event_name }}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| exit 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [ -z "$PR_NUMBER" ]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "No PR number found for branch ${{ github.event.workflow_run.head_branch }}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Check failureCode scanning / CodeQL Code injection Critical
Potential code injection in
${ github.event.workflow_run.head_branch } Error loading related location Loading workflow_run Error loading related location Loading
Copilot AutofixAI 18 days ago In general, the fix is to avoid using For this workflow, the best minimal fix without changing functionality is:
This preserves the behavior (same branch name value) but follows GitHub’s recommended pattern and eliminates the code-injection warning. Concretely, edit
No new methods or external tools are required; this is purely a YAML/inline shell change within the shown step.
Suggested changeset
1
.github/workflows/auto-merge.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "No PR number found for branch ${{ github.event.workflow_run.head_branch }}" | |
| echo "No PR number found for event ${{ github.event_name }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guard workflow_run when no PR exists
On workflow_run events, CI also runs for direct pushes to main/develop (see .github/workflows/ci.yml on.push.branches), so there is often no associated PR. In that case PR_NUMBER will be empty and this step exits 1, causing the auto-merge workflow to fail on every push/merge to those branches. Consider skipping the job when github.event.workflow_run.pull_requests is empty or explicitly gating workflow_run to PR-triggered runs to avoid persistent failures.
Useful? React with 👍 / 👎.
Copilot
AI
Jan 31, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow will fail with "exit 1" when no PR number is found for a branch in workflow_run events. However, this is normal behavior when CI runs on direct commits to main (not from a PR). The workflow should handle this case gracefully by exiting early without error, rather than failing the entire workflow. Consider checking if this is a PR-related run before attempting to find the PR number, or exit with success (exit 0) when no PR is found.
| echo "No PR number found for branch ${{ github.event.workflow_run.head_branch }}" | |
| exit 1 | |
| if [ "${{ github.event_name }}" == "workflow_run" ]; then | |
| echo "No PR number found for branch ${{ github.event.workflow_run.head_branch }}; this workflow_run is not associated with a PR. Exiting successfully." | |
| exit 0 | |
| else | |
| echo "No PR number found for event type: ${{ github.event_name }}" | |
| exit 1 | |
| fi |
Check failure
Code scanning / CodeQL
Code injection Critical
${ steps.pr.outputs.state }
pull_request_review
Potential code injection in
${ steps.pr.outputs.state }
workflow_run
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 18 days ago
General fix approach: avoid using ${{ ... }} expression interpolation directly inside shell run: blocks for data that might be tainted. Instead, assign those values to environment variables at the step level using ${{ ... }} once, then access them inside the script using the native shell syntax ($VAR). This prevents GitHub’s expression language from injecting into the shell parsing context.
Best concrete fix here: in the “Check merge conditions” step, move the three interpolations of steps.pr.outputs.state, mergeable, and review_decision out of the script body and into an env: section, then in the script simply reference $STATE, $MERGEABLE, and $REVIEW_DECISION. This preserves existing behavior (the same strings are passed, the same comparisons and outputs occur), but closes the code injection pattern flagged by CodeQL. Only that step needs modification; other uses like if: steps.check.outputs.can_merge == 'true' are in YAML expressions, not shell.
Required changes in .github/workflows/auto-merge.yml:
- Add an
env:block to the “Check merge conditions” step that maps:STATE: ${{ steps.pr.outputs.state }}MERGEABLE: ${{ steps.pr.outputs.mergeable }}REVIEW_DECISION: ${{ steps.pr.outputs.review_decision }}
- Remove the three initial assignment lines inside the
run:block that currently assign those via${{ ... }}. - Keep all subsequent usage of
$STATE,$MERGEABLE,$REVIEW_DECISIONunchanged, since they already use safe shell variable expansion.
No new methods or external libraries are needed; this is pure YAML and shell syntax.
-
Copy modified lines R69-R72
| @@ -66,11 +66,11 @@ | ||
|
|
||
| - name: Check merge conditions | ||
| id: check | ||
| env: | ||
| STATE: ${{ steps.pr.outputs.state }} | ||
| MERGEABLE: ${{ steps.pr.outputs.mergeable }} | ||
| REVIEW_DECISION: ${{ steps.pr.outputs.review_decision }} | ||
| run: | | ||
| STATE="${{ steps.pr.outputs.state }}" | ||
| MERGEABLE="${{ steps.pr.outputs.mergeable }}" | ||
| REVIEW_DECISION="${{ steps.pr.outputs.review_decision }}" | ||
|
|
||
| echo "PR State: $STATE" | ||
| echo "Mergeable: $MERGEABLE" | ||
| echo "Review Decision: $REVIEW_DECISION" |
Check failure
Code scanning / CodeQL
Code injection Critical
${ steps.pr.outputs.mergeable }
pull_request_review
Potential code injection in
${ steps.pr.outputs.mergeable }
workflow_run
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 18 days ago
General approach: Avoid using ${{ steps.pr.outputs.* }} directly inside shell code. Instead, map those values into environment variables in the step definition (env:) and then read them using standard shell variable expansion ($VAR). This matches GitHub’s recommended mitigation and prevents CodeQL from flagging code injection, while preserving behavior.
Best concrete fix here:
- In the “Check merge conditions” step, remove inline GitHub expression usage within the
run:script:- Replace:
STATE="${{ steps.pr.outputs.state }}" MERGEABLE="${{ steps.pr.outputs.mergeable }}" REVIEW_DECISION="${{ steps.pr.outputs.review_decision }}"
- With references to environment variables (e.g.,
STATE="$STATE", etc.).
- Replace:
- Configure those environment variables using the step’s
env:block:env: STATE: ${{ steps.pr.outputs.state }} MERGEABLE: ${{ steps.pr.outputs.mergeable }} REVIEW_DECISION: ${{ steps.pr.outputs.review_decision }}
- Optionally, for consistency and future-proofing, we could do the same style for other steps, but the reported taint path is specifically for
mergeableat line 71 in this step, so we will minimally adjust this step only. - No additional imports, tools, or external dependencies are needed; we just restructure how data is passed into the shell.
Concrete changes (line-level):
- In
.github/workflows/auto-merge.yml, in the “Check merge conditions” step (around lines 67–76):- Add an
env:section withSTATE,MERGEABLE, andREVIEW_DECISIONpopulated from${{ steps.pr.outputs.* }}. - Simplify the
run:script to rely on those shell environment variables rather than embedding expressions inside the script.
- Add an
This preserves all existing logic and outputs, only changing how the values are passed to the shell.
-
Copy modified lines R69-R72
| @@ -66,11 +66,11 @@ | ||
|
|
||
| - name: Check merge conditions | ||
| id: check | ||
| env: | ||
| STATE: ${{ steps.pr.outputs.state }} | ||
| MERGEABLE: ${{ steps.pr.outputs.mergeable }} | ||
| REVIEW_DECISION: ${{ steps.pr.outputs.review_decision }} | ||
| run: | | ||
| STATE="${{ steps.pr.outputs.state }}" | ||
| MERGEABLE="${{ steps.pr.outputs.mergeable }}" | ||
| REVIEW_DECISION="${{ steps.pr.outputs.review_decision }}" | ||
|
|
||
| echo "PR State: $STATE" | ||
| echo "Mergeable: $MERGEABLE" | ||
| echo "Review Decision: $REVIEW_DECISION" |
Check failure
Code scanning / CodeQL
Code injection Critical
${ steps.pr.outputs.review_decision }
pull_request_review
Potential code injection in
${ steps.pr.outputs.review_decision }
workflow_run
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 18 days ago
To fix the problem, we should stop interpolating ${{ steps.pr.outputs.review_decision }} directly into the shell script and instead pass it through an environment variable, then read it using native shell variable syntax ($REVIEW_DECISION) inside the run: block. This matches GitHub’s recommended pattern and prevents expression-based injection.
Concretely, in the Check merge conditions step (lines 68–87), we will:
- Add an
env:section that maps the step outputs (state,mergeable,review_decision) to environment variables (STATE,MERGEABLE,REVIEW_DECISION). - Change the first lines of the script so that
STATE,MERGEABLE, andREVIEW_DECISIONare either used directly from the environment or explicitly assigned from$STATE,$MERGEABLE,$REVIEW_DECISIONusing pure shell syntax, without any${{ ... }}interpolation insiderun:.
This keeps the workflow behavior identical: it still checks the same conditions and sets the same can_merge output, but the untrusted data path into the shell is now via a normal environment variable, which GitHub scopes safely at the expression level. No new imports or external dependencies are needed, and all changes are confined to the .github/workflows/auto-merge.yml file in the Check merge conditions step.
-
Copy modified lines R69-R72 -
Copy modified lines R74-R76
| @@ -66,10 +66,14 @@ | ||
|
|
||
| - name: Check merge conditions | ||
| id: check | ||
| env: | ||
| STATE: ${{ steps.pr.outputs.state }} | ||
| MERGEABLE: ${{ steps.pr.outputs.mergeable }} | ||
| REVIEW_DECISION: ${{ steps.pr.outputs.review_decision }} | ||
| run: | | ||
| STATE="${{ steps.pr.outputs.state }}" | ||
| MERGEABLE="${{ steps.pr.outputs.mergeable }}" | ||
| REVIEW_DECISION="${{ steps.pr.outputs.review_decision }}" | ||
| STATE="$STATE" | ||
| MERGEABLE="$MERGEABLE" | ||
| REVIEW_DECISION="$REVIEW_DECISION" | ||
|
|
||
| echo "PR State: $STATE" | ||
| echo "Mergeable: $MERGEABLE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enforce base branch before auto-merge
The merge gate only checks state, mergeable, and reviewDecision and never verifies the PR’s base branch. Because CI also runs on develop, an approved PR targeting develop will satisfy these checks and be auto-merged, despite the workflow’s stated intent to merge only to main. Add a base-branch condition (e.g., github.event.pull_request.base.ref == 'main' or equivalent for workflow_run) to prevent unintended merges to non-main branches.
Useful? React with 👍 / 👎.
Check failure
Code scanning / CodeQL
Code injection Critical
${ steps.pr.outputs.state }
pull_request_review
Potential code injection in
${ steps.pr.outputs.state }
workflow_run
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 18 days ago
In general, to fix this class of issues in GitHub Actions, avoid using ${{ ... }} expressions directly inside shell scripts (run: blocks) with values that might be influenced by untrusted input. Instead, map those values into environment variables with workflow expression syntax, and then read them within the script using the shell’s own variable syntax (e.g., $VAR), which is what GitHub recommends.
Concretely for this workflow, the problematic use is in the Summary step:
- name: Summary
if: always()
run: |
echo "🎯 Auto-merge Summary"
echo ""
echo "PR: #${{ steps.pr.outputs.pr_number }}"
echo "State: ${{ steps.pr.outputs.state }}"
echo "Can merge: ${{ steps.check.outputs.can_merge }}"
echo "Status: ${{ job.status }}"We should (a) pass the needed values into the step via env: using ${{ ... }} only there, and (b) in the run: block, refer to them with shell syntax ($PR_NUMBER, $STATE, etc.). This removes direct interpolation of potentially tainted data into the script and satisfies CodeQL’s recommendation.
Implementation details, all in .github/workflows/auto-merge.yml:
- Modify the
Summarystep to add anenv:section defining:PR_NUMBER: ${{ steps.pr.outputs.pr_number }}STATE: ${{ steps.pr.outputs.state }}CAN_MERGE: ${{ steps.check.outputs.can_merge }}JOB_STATUS: ${{ job.status }}
- Update the
run:script in that step to use those environment variables:echo "PR: #$PR_NUMBER"echo "State: $STATE"echo "Can merge: $CAN_MERGE"echo "Status: $JOB_STATUS"
- No new methods or external dependencies are needed; we only adjust YAML structure and shell variable usage.
This single change addresses all alert variants related to ${{ steps.pr.outputs.state }} in this step.
-
Copy modified lines R123-R127 -
Copy modified lines R131-R134
| @@ -120,10 +120,15 @@ | ||
|
|
||
| - name: Summary | ||
| if: always() | ||
| env: | ||
| PR_NUMBER: ${{ steps.pr.outputs.pr_number }} | ||
| STATE: ${{ steps.pr.outputs.state }} | ||
| CAN_MERGE: ${{ steps.check.outputs.can_merge }} | ||
| JOB_STATUS: ${{ job.status }} | ||
| run: | | ||
| echo "🎯 Auto-merge Summary" | ||
| echo "" | ||
| echo "PR: #${{ steps.pr.outputs.pr_number }}" | ||
| echo "State: ${{ steps.pr.outputs.state }}" | ||
| echo "Can merge: ${{ steps.check.outputs.can_merge }}" | ||
| echo "Status: ${{ job.status }}" | ||
| echo "PR: #$PR_NUMBER" | ||
| echo "State: $STATE" | ||
| echo "Can merge: $CAN_MERGE" | ||
| echo "Status: $JOB_STATUS" |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,186 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| # Sync shared workflows and configs to other org repos | ||||||||||||||||||||||||||||||||||||||||||||||||||
| # This workflow pushes templates and shared files to target organizations | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| name: Sync to Orgs | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| branches: [main] | ||||||||||||||||||||||||||||||||||||||||||||||||||
| paths: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - 'templates/**' | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - '.github/workflows/**' | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| - '.github/workflows/**' | |
| - '.github/workflows/**' | |
| - '!.github/workflows/sync-to-orgs.yml' |
Copilot
AI
Jan 31, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The timestamp field uses GitHub Actions syntax '${{ github.event.head_commit.timestamp }}' inside a Python string literal, which won't be interpolated. This will result in the literal string being sent rather than the actual timestamp value. To fix this, the timestamp should be passed as an environment variable and accessed via os.environ.get(), similar to how GITHUB_SHA is handled on line 146.
| payload = { | |
| 'event_type': 'sync_from_bridge', | |
| 'client_payload': { | |
| 'source': 'BlackRoad-OS/.github', | |
| 'ref': os.environ.get('GITHUB_SHA', 'main'), | |
| 'timestamp': '${{ github.event.head_commit.timestamp }}' | |
| # Derive head commit timestamp from the GitHub event payload | |
| import json | |
| head_commit_timestamp = None | |
| event_path = os.environ.get('GITHUB_EVENT_PATH') | |
| if event_path: | |
| try: | |
| with open(event_path, 'r', encoding='utf-8') as f: | |
| event = json.load(f) | |
| head_commit = event.get('head_commit') or {} | |
| head_commit_timestamp = head_commit.get('timestamp') | |
| except Exception: | |
| head_commit_timestamp = None | |
| payload = { | |
| 'event_type': 'sync_from_bridge', | |
| 'client_payload': { | |
| 'source': 'BlackRoad-OS/.github', | |
| 'ref': os.environ.get('GITHUB_SHA', 'main'), | |
| 'timestamp': head_commit_timestamp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow triggers on all pull_request_review submissions (line 7-8), not just approvals. This means it will run for comments, changes requested, and dismissals as well. While the workflow does check for approval status later (line 95), it's more efficient to filter at the trigger level. Consider adding a filter:
types: [submitted]withif: github.event.review.state == 'approved'at the job level, or change the trigger to only fire on approvals.