Skip to content

Commit 692eab0

Browse files
Merge pull request #11 from blackduck-inc/fix-automation
rename GITHUBTOKEN to GITHUB_TOKEN
2 parents 365db75 + a540c57 commit 692eab0

File tree

8 files changed

+21
-19
lines changed

8 files changed

+21
-19
lines changed

.github/workflows/publish-QAExtension.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: versioning
3535
id: version-update
3636
env:
37-
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }}
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3838
run: |
3939
extension_name=$(jq -r '.name' < vss-extension-dev.json)
4040
echo "EXTENSION_NAME=$extension_name" >> $GITHUB_ENV
@@ -103,7 +103,7 @@ jobs:
103103
id: update-extension-version
104104
if: ${{ steps.publish-qaextension.conclusion == 'success' }}
105105
env:
106-
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }}
106+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
107107
run: |
108108
echo "Updating extension version in vss-extension-dev.json & extension_version.txt file"
109109
git config --local user.name "$(git log -n 1 --pretty=format:%an)"

.github/workflows/upgrade-extension-version.yml

+8-10
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- name: versioning
4040
id: version-update
4141
env:
42-
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }}
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4343
run: |
4444
extension_name=$(jq -r '.name' < vss-extension.json)
4545
echo "EXTENSION_NAME=$extension_name" >> $GITHUB_ENV
@@ -70,11 +70,6 @@ jobs:
7070
echo "Updated package.json file"
7171
cat package.json
7272
echo
73-
74-
echo "Updating package-lock.json with the new version: ${new_version}"
75-
jq --arg new_version "$new_version" '(.version = $new_version) | (.packages[""].version = $new_version)' package-lock.json > package-lock.json.tmp && mv package-lock.json.tmp package-lock.json
76-
echo "Updated package-lock.json file"
77-
echo
7873
7974
echo "Updating task.json with the new version: ${new_version}"
8075
jq --argjson major "$current_major" --argjson minor "$current_minor" --argjson patch "$current_patch" '(.version.Major = $major) | (.version.Minor = $minor) | (.version.Patch = $patch)' task.json > task.json.tmp && mv task.json.tmp task.json
@@ -85,17 +80,20 @@ jobs:
8580
- name: update extension version in file
8681
id: update-extension-version
8782
env:
88-
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }}
83+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8984
run: |
90-
echo "Updating extension version in vss-extension.json, vss-extension-dev.json, extension_version.txt, package.json, package-lock.json & task.json file"
85+
echo "Updating extension version in vss-extension.json, vss-extension-dev.json, package.json, package-lock.json & task.json file"
9186
git config --local user.name "$(git log -n 1 --pretty=format:%an)"
9287
git config --local user.email "$(git log -n 1 --pretty=format:%ae)"
9388
git checkout -b extension_version_update
94-
git pull origin extension_version_update --rebase || true
9589
git add vss-extension.json vss-extension-dev.json extension_version.txt
9690
cd blackduck-security-task
91+
npm install
92+
npm run all
9793
git add package.json package-lock.json task.json
94+
cd dist
95+
git add .
9896
git commit -m "upgrade extension version to ${{ env.NEW_VERSION }} [skip ci]"
9997
git push origin extension_version_update --force
10098
gh pr create --base main --head extension_version_update --title "Extension version upgrade to ${{ env.NEW_VERSION }}" --body "${{ env.EXTENSION_NAME }} version upgrade to ${{ env.NEW_VERSION }}" --fill
101-
echo "Successful updated extension version in vss-extension.json, vss-extension-dev.json, extension_version.txt, package.json, package-lock.json & task.json file..."
99+
echo "Successful updated extension version in vss-extension.json, vss-extension-dev.json, package.json, package-lock.json & task.json file..."

blackduck-security-task/dist/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ exports.COVERITY_WAITFORSCAN_KEY = "coverity_waitForScan";
9797
exports.COVERITY_WAITFORSCAN_KEY_CLASSIC_EDITOR = "coverityWaitForScan";
9898
exports.COVERITY_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR = "coverityProjectDirectory";
9999
exports.COVERITY_PRCOMMENT_ENABLED_KEY = "coverity_prComment_enabled";
100-
exports.COVERITY_PRCOMMENT_ENABLED_KEY_CLASSIC_EDITOR = "coverityAutomationPrComment";
100+
exports.COVERITY_PRCOMMENT_ENABLED_KEY_CLASSIC_EDITOR = "coverityPrCommentEnabled";
101101
exports.COVERITY_LOCAL_KEY = "coverity_local";
102102
exports.COVERITY_LOCAL_KEY_CLASSIC_EDITOR = "coverityLocal";
103103
exports.COVERITY_VERSION_KEY = "coverity_version";
@@ -160,7 +160,7 @@ exports.BLACKDUCKSCA_SCAN_FAILURE_SEVERITIES_KEY_CLASSIC_EDITOR = "blackduckScaS
160160
*/
161161
exports.BLACKDUCK_PRCOMMENT_ENABLED_KEY = "blackduck_prComment_enabled";
162162
exports.BLACKDUCKSCA_PRCOMMENT_ENABLED_KEY = "blackducksca_prComment_enabled";
163-
exports.BLACKDUCKSCA_PRCOMMENT_ENABLED_KEY_CLASSIC_EDITOR = "blackduckScaAutomationPrComment";
163+
exports.BLACKDUCKSCA_PRCOMMENT_ENABLED_KEY_CLASSIC_EDITOR = "blackduckScaPrCommentEnabled";
164164
/**
165165
* @deprecated Use blackducksca_fixpr_enabled instead. This can be removed in future release.
166166
*/

blackduck-security-task/dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

blackduck-security-task/package-lock.json

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

blackduck-security-task/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "blackduck-security-scan",
33
"version": "1.10.0",
44
"main": "lib/main.js",
5+
"engines": { "node": ">=20.0.0" },
56
"scripts": {
67
"build": "tsc",
78
"package": "ncc build --source-map",

blackduck-security-task/src/blackduck-security-task/application-constant.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export const COVERITY_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR =
140140

141141
export const COVERITY_PRCOMMENT_ENABLED_KEY = "coverity_prComment_enabled";
142142
export const COVERITY_PRCOMMENT_ENABLED_KEY_CLASSIC_EDITOR =
143-
"coverityAutomationPrComment";
143+
"coverityPrCommentEnabled";
144144

145145
export const COVERITY_LOCAL_KEY = "coverity_local";
146146
export const COVERITY_LOCAL_KEY_CLASSIC_EDITOR = "coverityLocal";
@@ -225,7 +225,7 @@ export const BLACKDUCK_PRCOMMENT_ENABLED_KEY = "blackduck_prComment_enabled";
225225
export const BLACKDUCKSCA_PRCOMMENT_ENABLED_KEY =
226226
"blackducksca_prComment_enabled";
227227
export const BLACKDUCKSCA_PRCOMMENT_ENABLED_KEY_CLASSIC_EDITOR =
228-
"blackduckScaAutomationPrComment";
228+
"blackduckScaPrCommentEnabled";
229229
/**
230230
* @deprecated Use blackducksca_fixpr_enabled instead. This can be removed in future release.
231231
*/

blackduck-security-task/task.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@
563563
"groupName": "coverityScanOptions"
564564
},
565565
{
566-
"name": "coverityAutomationPrComment",
566+
"name": "coverityPrCommentEnabled",
567567
"type": "boolean",
568568
"label": "Add Comments to Pull Requests",
569569
"defaultValue": false,
@@ -789,7 +789,7 @@
789789
"groupName": "scanConfiguration"
790790
},
791791
{
792-
"name": "blackduckScaAutomationPrComment",
792+
"name": "blackduckScaPrCommentEnabled",
793793
"type": "boolean",
794794
"label": "Add Comments to Pull Requests",
795795
"defaultValue": false,

0 commit comments

Comments
 (0)