Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 20570eb

Browse files
committed
QHelp preview
1 parent 703e9e7 commit 20570eb

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/qhelp.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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 }}

0 commit comments

Comments
 (0)