File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Query help preview
22
3+ permissions :
4+ contents : read
5+ pull-requests : write
6+
37on :
4- pull_request :
8+ pull_request_target :
59 branches :
610 - main
7- - ' rc/*'
11+ - " rc/*"
812 paths :
913 - " ruby/**/*.qhelp"
1014
@@ -14,25 +18,25 @@ jobs:
1418 steps :
1519 - uses : actions/checkout@v2
1620 with :
21+ ref : refs/pull/${{ github.event.number }}/merge
1722 fetch-depth : 2
1823 - name : Determine changed files
1924 id : changes
2025 run : |
21- echo -n "::set-output name=qhelp_files::"
22- (git diff --name-only --diff-filter=ACMRT HEAD~1 HEAD | grep .qhelp$ | grep -v .inc.qhelp;
23- git diff --name-only --diff-filter=ACMRT HEAD~1 HEAD | grep .inc.qhelp$ | xargs -d '\n' -rn1 basename | xargs -d '\n' -rn1 git grep -l) |
24- sort -u | xargs -d '\n' -n1 printf "'%s' "
26+ (git diff --name-only --diff-filter=ACMRT HEAD~1 HEAD | grep '.qhelp$' | grep -v '.inc.qhelp';
27+ git diff --name-only --diff-filter=ACMRT HEAD~1 HEAD | grep '.inc.qhelp$' | xargs -d '\n' -rn1 basename | xargs -d '\n' -rn1 git grep -l) |
28+ sort -u > "${{ runner.temp }}/paths.txt"
2529
2630 - uses : ./.github/actions/fetch-codeql
2731
2832 - name : QHelp preview
2933 if : ${{ steps.changes.outputs.qhelp_files }}
3034 run : |
3135 ( echo "QHelp previews:";
32- for path in ${{ steps.changes.outputs.qhelp_files }} ; do
36+ cat " ${{ runner.temp }}/paths.txt" | while read path ; do
3337 echo "<details> <summary>${path}</summary>"
3438 echo
35- codeql generate query-help --format=markdown ${path}
39+ codeql generate query-help --format=markdown " ${path}"
3640 echo "</details>"
3741 done) | gh pr comment "${{ github.event.pull_request.number }}" -F -
3842 env :
You can’t perform that action at this time.
0 commit comments