File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 2323 fetch-depth : 0
2424 persist-credentials : false
2525
26+ - name : Fetch PR head
27+ if : github.event_name == 'pull_request_target'
28+ run : |
29+ git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-head
30+
2631 - name : Set up Python
2732 uses : actions/setup-python@v5
2833 with :
@@ -40,10 +45,15 @@ jobs:
4045 GITHUB_HEAD_SHA : ${{ github.event.pull_request.head.sha || '' }}
4146 run : |
4247 # For pull requests, compare with base branch
43- if [ "$GITHUB_EVENT_NAME" = "pull_request_target " ]; then
48+ if [ "$GITHUB_EVENT_NAME" = "pull_request " ]; then
4449 BASE_REF="$GITHUB_BASE_SHA"
4550 HEAD_REF="$GITHUB_HEAD_SHA"
51+ echo "DEBUG: Comparing $BASE_REF to $HEAD_REF" >&2
52+ echo "DEBUG: Current HEAD is $(git rev-parse HEAD)" >&2
53+ echo "DEBUG: Available commits:" >&2
54+ git log --oneline -5 >&2
4655 DIFF_OUTPUT=$(git diff $BASE_REF $HEAD_REF -- zephyr/module.yml || echo "No changes found")
56+ echo "DEBUG: Diff result: $DIFF_OUTPUT" >&2
4757 else
4858 # For push events, get the previous commit that modified module.yml
4959 PREV_COMMIT=$(git log --oneline --follow -- zephyr/module.yml | head -2 | tail -1 | cut -d' ' -f1)
95105 EOF
96106
97107 - name : Create or update comment (Pull Request)
98- if : github.event_name == 'pull_request_target '
108+ if : github.event_name == 'pull_request '
99109 uses : actions/github-script@v7
100110 with :
101111 script : |
You can’t perform that action at this time.
0 commit comments