File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Query help preview
2+
3+ on :
4+ pull_request :
5+ branches : [main]
6+ paths :
7+ - " **/*.qhelp"
8+
9+ jobs :
10+ qhelp :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v2
14+ with :
15+ fetch-depth : 2
16+ - name : Determine changed files
17+ id : changes
18+ run : |
19+ echo "::set-output name=qhelp_files::$(git diff --name-only --diff-filter=ACMRT HEAD~1 HEAD | grep .qhelp$ | xargs)"
20+ - name : Fetch CodeQL
21+ run : |
22+ LATEST=$(gh release list --repo https://github.com/github/codeql-cli-binaries | cut -f 1 | sort --version-sort | tail -1)
23+ gh release download --repo https://github.com/github/codeql-cli-binaries --pattern codeql-linux64.zip "$LATEST"
24+ unzip -q codeql-linux64.zip
25+ env :
26+ GITHUB_TOKEN : ${{ github.token }}
27+ - name : QHelp preview
28+ if : ${{ steps.changes.outputs.qhelp_files }}
29+ run : |
30+ ( echo "QHelp previews:";
31+ for path in ${{ steps.changes.outputs.qhelp_files }} ; do
32+ echo "<details> <summary>${path}</summary>"
33+ echo
34+ codeql/codeql generate query-help --format=markdown ${path}
35+ echo "</details>"
36+ done) | gh pr comment "${{ github.event.pull_request.number }}" -F -
37+ env :
38+ GITHUB_TOKEN : ${{ github.token }}
You can’t perform that action at this time.
0 commit comments