File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 33 push :
44 paths :
55 - ' zephyr/module.yml'
6- pull_request_target :
6+ pull_request :
77 paths :
88 - ' zephyr/module.yml'
99
2020 - name : Checkout the code
2121 uses : actions/checkout@v4
2222 with :
23+ ref : ${{ github.event.pull_request.head.sha }}
2324 fetch-depth : 0
2425 persist-credentials : false
2526
@@ -40,10 +41,15 @@ jobs:
4041 GITHUB_HEAD_SHA : ${{ github.event.pull_request.head.sha || '' }}
4142 run : |
4243 # For pull requests, compare with base branch
43- if [ "$GITHUB_EVENT_NAME" = "pull_request_target " ]; then
44+ if [ "$GITHUB_EVENT_NAME" = "pull_request " ]; then
4445 BASE_REF="$GITHUB_BASE_SHA"
4546 HEAD_REF="$GITHUB_HEAD_SHA"
47+ echo "DEBUG: Comparing $BASE_REF to $HEAD_REF" >&2
48+ echo "DEBUG: Current HEAD is $(git rev-parse HEAD)" >&2
49+ echo "DEBUG: Available commits:" >&2
50+ git log --oneline -5 >&2
4651 DIFF_OUTPUT=$(git diff $BASE_REF $HEAD_REF -- zephyr/module.yml || echo "No changes found")
52+ echo "DEBUG: Diff result: $DIFF_OUTPUT" >&2
4753 else
4854 # For push events, get the previous commit that modified module.yml
4955 PREV_COMMIT=$(git log --oneline --follow -- zephyr/module.yml | head -2 | tail -1 | cut -d' ' -f1)
95101 EOF
96102
97103 - name : Create or update comment (Pull Request)
98- if : github.event_name == 'pull_request_target '
104+ if : github.event_name == 'pull_request '
99105 uses : actions/github-script@v7
100106 with :
101107 script : |
You can’t perform that action at this time.
0 commit comments