mirror of
https://github.com/strongswan/strongswan.git
synced 2025-11-29 00:00:17 -05:00
github: Make LGTM project ID configurable via environment variable
This commit is contained in:
parent
f830e71457
commit
cd7b80e869
1
.github/workflows/lgtm.yml
vendored
1
.github/workflows/lgtm.yml
vendored
@ -30,6 +30,7 @@ jobs:
|
|||||||
# so we continue to use the approach we used on Travis
|
# so we continue to use the approach we used on Travis
|
||||||
- env:
|
- env:
|
||||||
LGTM_TOKEN: ${{ secrets.LGTM_TOKEN }}
|
LGTM_TOKEN: ${{ secrets.LGTM_TOKEN }}
|
||||||
|
LGTM_PROJECT: ${{ secrets.LGTM_PROJECT }}
|
||||||
BUILD_NUMBER: ${{ github.run_id }}
|
BUILD_NUMBER: ${{ github.run_id }}
|
||||||
COMMIT_ID: ${{ github.sha }}
|
COMMIT_ID: ${{ github.sha }}
|
||||||
COMMIT_BASE: ${{ github.event.before }}
|
COMMIT_BASE: ${{ github.event.before }}
|
||||||
|
|||||||
@ -335,12 +335,11 @@ lgtm)
|
|||||||
base=$(git merge-base origin/master ${COMMIT_ID})
|
base=$(git merge-base origin/master ${COMMIT_ID})
|
||||||
fi
|
fi
|
||||||
base=$(git rev-parse $base)
|
base=$(git rev-parse $base)
|
||||||
project_id=1506185006272
|
|
||||||
|
|
||||||
echo "Starting code review for $COMMIT_ID (base $base) on lgtm.com"
|
echo "Starting code review for $COMMIT_ID (base $base) on lgtm.com"
|
||||||
git diff --binary $base > lgtm.patch || exit $?
|
git diff --binary $base > lgtm.patch || exit $?
|
||||||
curl -s -X POST --data-binary @lgtm.patch \
|
curl -s -X POST --data-binary @lgtm.patch \
|
||||||
"https://lgtm.com/api/v1.0/codereviews/${project_id}?base=${base}&external-id=${BUILD_NUMBER}" \
|
"https://lgtm.com/api/v1.0/codereviews/${LGTM_PROJECT}?base=${base}&external-id=${BUILD_NUMBER}" \
|
||||||
-H 'Content-Type: application/octet-stream' \
|
-H 'Content-Type: application/octet-stream' \
|
||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H "Authorization: Bearer ${LGTM_TOKEN}" > lgtm.res || exit $?
|
-H "Authorization: Bearer ${LGTM_TOKEN}" > lgtm.res || exit $?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user