security(upstream): anchor automated comparison branch to main instead of triggering feature ref
davoodmehraban89 committed
Oct 14, 2026 at 23:29 UTC
11ee31e733077094a5f8e53520c9bd6c471c65dd
1 file changed
+4
-2
.github/workflows/medusa-upstream-review.yml
+4
-2
@@ -21,9 +21,10 @@ jobs:
21
runs-on: ubuntu-latest
22
timeout-minutes: 45
23
steps:
24
- - name: Check out this repository
24
+ - name: Check out default branch for upstream comparison
25
uses: actions/checkout@v4
26
with:
27
+ ref: main
28
fetch-depth: 1
29
persist-credentials: true
30
@@ -39,7 +40,8 @@ jobs:
40
set -euo pipefail
41
git config user.name "github-actions[bot]"
42
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
42
- git checkout -B automation/medusa-upstream-review
43
+ # Always branch from main, never from a feature-branch push event.
44
+ git checkout -B automation/medusa-upstream-review origin/main
45
# Keep local GitHub settings and all owner-specific customizations intact.
46
# These exclusions prevent upstream --delete from removing storefront,
47
# project tracking, secret-scan policy, or owner-owned security scripts.