Compare commits

...

21 Commits

Author SHA1 Message Date
Mariusz Kliber
005434d2f6 Merge branch 'fossjunkie/internal-ci-checks' into fossjunkie-patch-1 2022-11-30 17:56:19 +00:00
Mariusz Kliber
c56609b290 Debug: testing original API call 2022-11-30 17:55:03 +00:00
Mariusz Kliber
802fc8c9d0 Debug: removed grep 2022-11-30 17:48:37 +00:00
Mariusz Kliber
596cb72e07 Debug: testing API calls 2022-11-30 17:48:37 +00:00
Mariusz Kliber
fd64b87c45 Debug: dump user scope 2022-11-30 17:48:37 +00:00
Mariusz Kliber
337b85a2d3 Apply suggestions from aibaars
Co-authored-by: Arthur Baars <aibaars@github.com>
2022-11-30 17:48:37 +00:00
Mariusz Kliber
d2a80ce184 CI: Add Internal CI Checks workflow 2022-11-30 17:48:37 +00:00
Mariusz Kliber
143034bd88 Merge branch 'fossjunkie/internal-ci-checks' into fossjunkie-patch-1 2022-11-30 17:33:56 +00:00
Mariusz Kliber
b0e2405ba4 Debug: remove id-token 2022-11-30 17:31:58 +00:00
Mariusz Kliber
835e65f8a9 Merge branch 'fossjunkie/internal-ci-checks' into fossjunkie-patch-1 2022-11-30 17:29:31 +00:00
Mariusz Kliber
e78d066d88 Debug: Add max permissions 2022-11-30 17:29:06 +00:00
Mariusz Kliber
35b63b58b2 Merge branch 'fossjunkie/internal-ci-checks' into fossjunkie-patch-1 2022-11-30 17:05:06 +00:00
Mariusz Kliber
b5fe06cb2f Debug: removed grep 2022-11-30 17:04:25 +00:00
Arthur Baars
4420d6c642 Update README.md 2022-11-30 18:02:11 +01:00
Mariusz Kliber
e9311fcee4 Merge branch 'fossjunkie/internal-ci-checks' into fossjunkie-patch-1 2022-11-30 16:59:49 +00:00
Mariusz Kliber
67dba54bbd Debug: testing API calls 2022-11-30 16:59:31 +00:00
Mariusz Kliber
7f733c40fe Merge branch 'fossjunkie/internal-ci-checks' into fossjunkie-patch-1 2022-11-30 16:56:13 +00:00
Mariusz Kliber
17f0c44be8 Debug: dump user scope 2022-11-30 16:55:06 +00:00
Mariusz Kliber
408d128c34 Update README.md 2022-11-30 16:51:02 +00:00
Mariusz Kliber
aabdf0676f Apply suggestions from aibaars
Co-authored-by: Arthur Baars <aibaars@github.com>
2022-11-30 16:31:59 +00:00
Mariusz Kliber
b4d62ee4be CI: Add Internal CI Checks workflow 2022-11-30 16:31:59 +00:00
2 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
name: Internal CI Checks
# This workflows checks if the author of a PR is a member of the CodeQL team
# and adds `ready-for-internal-ci` label to trigger the internal CI
on:
pull_request_target:
jobs:
set-label:
runs-on: ubuntu-latest
steps:
- name: Set a label to trigger internal CI checks
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
USERNAME: ${{ github.event.pull_request.user.login }}
PR_NUMBER: ${{ github.event.pull_request.number }}
LABEL: "ready-for-internal-ci"
run: |
set +eo pipefail
echo "Testing API calls"
gh api -i /repos/github/codeql
echo "Checking if user $USERNAME is a member of the CodeQL team"
gh api -H "Accept: application/vnd.github+json" /orgs/github/teams/codeql/memberships/$USERNAME > /dev/null 2>&1
if [ "$?" == 0 ]; then
echo "User $USERNAME is a member of the CodeQL team"
echo "Adding '${LABEL}' label"
gh pr edit "${PR_NUMBER}" --repo "$GITHUB_REPOSITORY" --add-label "$LABEL"
else
echo "User $USERNAME is not a member of the CodeQL team"
echo "To trigger the internal CI, a maintainer needs to add the '${LABEL}' label"
fi

View File

@@ -1,5 +1,7 @@
# CodeQL
This open source repository contains the standard CodeQL libraries and queries that power [GitHub Advanced Security](https://github.com/features/security/code) and the other application security products that [GitHub](https://github.com/features/security/) makes available to its customers worldwide.
## How do I learn CodeQL and run queries?