Skip to content

Commit ae88c80

Browse files
committed
changes
1 parent 95e4d85 commit ae88c80

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.github/workflows/validate-queries.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
name: Validate SumoLogic Queries
22
on:
3-
pull_request:
3+
pull_request_target:
44
paths:
5-
- '**/*.md' # Trigger only when Markdown files change
5+
- '**/*.md'
6+
types:
7+
- review_requested
68

79
jobs:
810
validate-queries:
@@ -12,6 +14,18 @@ jobs:
1214
with:
1315
fetch-depth: 0 # Required for git diff detection
1416

17+
- name: Fetch pull request branch
18+
run: git fetch origin ${{ github.event.pull_request.head.ref }}:${{ github.event.pull_request.head.ref }}
19+
20+
- name: Checkout PR branch
21+
run: git checkout ${{ github.event.pull_request.head.ref }}
22+
23+
- name: Debug Git Log
24+
run: git log --oneline -n 10
25+
git diff --name-only --diff-filter=AM origin/main...HEAD -- 'docs/**/*.md' > changed_files.txt
26+
echo "Files to validate:"
27+
cat changed_files.txt
28+
1529
- name: Set up Python
1630
uses: actions/setup-python@v4
1731
with:

0 commit comments

Comments
 (0)