diff --git a/.changescriberc b/.changescriberc new file mode 100644 index 0000000..06865a6 --- /dev/null +++ b/.changescriberc @@ -0,0 +1,6 @@ +{ + "generate": { + "fromPackageJson": true, + "taskUrlTemplate": "https://ctinnovation.atlassian.net/browse/{taskCode}" + } +} \ No newline at end of file diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 0e3df72..9fb2d83 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,6 +1,6 @@ module.exports = { env: { - browser: true, + browser: false, commonjs: true, es2021: true }, diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2d84a2f..f4e6d47 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,18 +21,14 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - with: - token: ${{ secrets.REPO_ACCESS }} - name: Setup Node.js environment uses: actions/setup-node@v4 with: node-version: "20.x" - registry-url: https://npm.pkg.github.com/ - scope: "@ctinnovation" - name: install dependencies - run: npm install -g @ctinnovation/changelogger + run: npm install -g changescribe env: NODE_AUTH_TOKEN: ${{secrets.NPM_GET_TOKEN}} @@ -54,7 +50,7 @@ jobs: - name: Create pull request id: pr-create - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: github-token: ${{ github.token }} script: | @@ -70,7 +66,7 @@ jobs: return res.data.number; - name: Request and assign review - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: github-token: ${{ github.token }} script: | @@ -99,8 +95,6 @@ jobs: - name: Checkout if: "${{ env.TAG }}" uses: actions/checkout@v4 - with: - token: ${{ secrets.REPO_ACCESS }} - name: Tagging if: "${{ env.TAG }}" @@ -110,7 +104,7 @@ jobs: - name: Create and publish release on tag if: "${{ env.TAG }}" - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: github-token: ${{ github.token }} script: | @@ -122,6 +116,13 @@ jobs: name: "${{ env.TAG }}" }) + - name: Setup Node.js environment + uses: actions/setup-node@v4 + with: + node-version: "20.x" + registry-url: "https://registry.npmjs.org" + always-auth: "true" + - name: NPM package publish if: "${{ env.TAG }}" run: | diff --git a/README.md b/README.md index ab49731..e67c867 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ With explore, for each repository, gitstronaut will give you information about: - Pull requests: warning you about Pull Requests that are open and not merged - Tags: warning you when the default branch is not aligned with the latest tag (and how many commits are between the two) -If you're using [changelogger](https://github.com/ctinnovation/changelogger) for handling your CHANGELOGs gitstronaut will also hint you the likely next release needed for that repo. +If you're using [changescribe](https://github.com/ctinnovation/changescribe) for handling your CHANGELOGs gitstronaut will also hint you the likely next release needed for that repo. ### Tags diff --git a/commands/print.mjs b/commands/print.mjs index b9e7b70..31b8126 100644 --- a/commands/print.mjs +++ b/commands/print.mjs @@ -144,7 +144,7 @@ async function printUnalignedRepo (ui, argv, repo, { }, repo.default_branch) } catch (e) { ui.logger.info('unable to get any information about next release') - ui.logger.info(ui.colors.gray('💡 are you using https://github.com/ctinnovation/changelogger?')) + ui.logger.info(ui.colors.gray('💡 are you using https://github.com/ctinnovation/changescribe?')) return } diff --git a/package.json b/package.json index 09f8514..ced90d0 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ }, "scripts": { "test": "exit 0", - "version": "git branch -D 'release_'$npm_package_version || true && git checkout -b 'release_'$npm_package_version && changelogger -p && git add .", + "version": "git branch -D 'release_'$npm_package_version || true && git checkout -b 'release_'$npm_package_version && changescribe && git add .", "postversion": "git commit -mv$npm_package_version && git push --set-upstream origin 'release_'$npm_package_version" }, "repository": {