Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename GITHUBTOKEN to GITHUB_TOKEN #11

Merged
merged 3 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/publish-QAExtension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: versioning
id: version-update
env:
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
extension_name=$(jq -r '.name' < vss-extension-dev.json)
echo "EXTENSION_NAME=$extension_name" >> $GITHUB_ENV
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
id: update-extension-version
if: ${{ steps.publish-qaextension.conclusion == 'success' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Updating extension version in vss-extension-dev.json & extension_version.txt file"
git config --local user.name "$(git log -n 1 --pretty=format:%an)"
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/upgrade-extension-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: versioning
id: version-update
env:
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
extension_name=$(jq -r '.name' < vss-extension.json)
echo "EXTENSION_NAME=$extension_name" >> $GITHUB_ENV
Expand Down Expand Up @@ -70,11 +70,6 @@ jobs:
echo "Updated package.json file"
cat package.json
echo

echo "Updating package-lock.json with the new version: ${new_version}"
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
echo "Updated package-lock.json file"
echo

echo "Updating task.json with the new version: ${new_version}"
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
Expand All @@ -85,17 +80,20 @@ jobs:
- name: update extension version in file
id: update-extension-version
env:
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Updating extension version in vss-extension.json, vss-extension-dev.json, extension_version.txt, package.json, package-lock.json & task.json file"
echo "Updating extension version in vss-extension.json, vss-extension-dev.json, package.json, package-lock.json & task.json file"
git config --local user.name "$(git log -n 1 --pretty=format:%an)"
git config --local user.email "$(git log -n 1 --pretty=format:%ae)"
git checkout -b extension_version_update
git pull origin extension_version_update --rebase || true
git add vss-extension.json vss-extension-dev.json extension_version.txt
cd blackduck-security-task
npm install
npm run all
git add package.json package-lock.json task.json
cd dist
git add .
git commit -m "upgrade extension version to ${{ env.NEW_VERSION }} [skip ci]"
git push origin extension_version_update --force
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
echo "Successful updated extension version in vss-extension.json, vss-extension-dev.json, extension_version.txt, package.json, package-lock.json & task.json file..."
echo "Successful updated extension version in vss-extension.json, vss-extension-dev.json, package.json, package-lock.json & task.json file..."
4 changes: 2 additions & 2 deletions blackduck-security-task/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion blackduck-security-task/dist/index.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions blackduck-security-task/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions blackduck-security-task/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "blackduck-security-scan",
"version": "1.10.0",
"main": "lib/main.js",
"engines": { "node": ">=20.0.0" },
"scripts": {
"build": "tsc",
"package": "ncc build --source-map",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export const COVERITY_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR =

export const COVERITY_PRCOMMENT_ENABLED_KEY = "coverity_prComment_enabled";
export const COVERITY_PRCOMMENT_ENABLED_KEY_CLASSIC_EDITOR =
"coverityAutomationPrComment";
"coverityPrCommentEnabled";

export const COVERITY_LOCAL_KEY = "coverity_local";
export const COVERITY_LOCAL_KEY_CLASSIC_EDITOR = "coverityLocal";
Expand Down Expand Up @@ -225,7 +225,7 @@ export const BLACKDUCK_PRCOMMENT_ENABLED_KEY = "blackduck_prComment_enabled";
export const BLACKDUCKSCA_PRCOMMENT_ENABLED_KEY =
"blackducksca_prComment_enabled";
export const BLACKDUCKSCA_PRCOMMENT_ENABLED_KEY_CLASSIC_EDITOR =
"blackduckScaAutomationPrComment";
"blackduckScaPrCommentEnabled";
/**
* @deprecated Use blackducksca_fixpr_enabled instead. This can be removed in future release.
*/
Expand Down
4 changes: 2 additions & 2 deletions blackduck-security-task/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@
"groupName": "coverityScanOptions"
},
{
"name": "coverityAutomationPrComment",
"name": "coverityPrCommentEnabled",
"type": "boolean",
"label": "Add Comments to Pull Requests",
"defaultValue": false,
Expand Down Expand Up @@ -789,7 +789,7 @@
"groupName": "scanConfiguration"
},
{
"name": "blackduckScaAutomationPrComment",
"name": "blackduckScaPrCommentEnabled",
"type": "boolean",
"label": "Add Comments to Pull Requests",
"defaultValue": false,
Expand Down