Skip to content

Commit 348e88f

Browse files
authored
Merge pull request #1590 from mikepenz/develop
dev -> main
2 parents bcae711 + 9816d6c commit 348e88f

13 files changed

Lines changed: 2300 additions & 2195 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
33
{
44
"name": "Node.js & TypeScript",
5-
"image": "mcr.microsoft.com/devcontainers/typescript-node:24-bullseye@sha256:14e1448d47b65dd61a6dc1476b4f391643174abd70b64069b9644e0ad1bdb152",
5+
"image": "mcr.microsoft.com/devcontainers/typescript-node:24-bullseye@sha256:147a65f600d906c678cb40b7fa17957b943f49cf3a094c2a1ad56044605f87e8",
66
"features": {
77
"ghcr.io/devcontainers/features/node:1": {}
88
},

.github/workflows/check-dist.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ jobs:
2727
contents: read
2828

2929
steps:
30-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
30+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3131

3232
- name: Set Node.js 24.x
33-
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
33+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
3434
with:
3535
node-version: 24.x
3636

@@ -50,7 +50,7 @@ jobs:
5050
id: diff
5151

5252
# If index.js was different than expected, upload the expected version as an artifact
53-
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
53+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
5454
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
5555
with:
5656
name: dist

.github/workflows/ci.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ jobs:
1919
pull-requests: write
2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
22+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2323
with:
2424
fetch-depth: 100
2525
fetch-tags: true
2626

2727
- name: Set Node.js 24.x
28-
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
28+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
2929
with:
3030
node-version: 24.x
3131

@@ -46,7 +46,7 @@ jobs:
4646
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4747

4848
- name: Publish Test Report
49-
uses: mikepenz/action-junit-report@49b2ca06f62aa7ef83ae6769a2179271e160d8e4 # v6
49+
uses: mikepenz/action-junit-report@bccf2e31636835cf0874589931c4116687171386 # v6.4.0
5050
if: success() || failure() # always run even if the previous step fails
5151
with:
5252
report_paths: 'junit.xml'
@@ -59,16 +59,16 @@ jobs:
5959
github.event_name == 'pull_request' &&
6060
startsWith(github.head_ref, 'renovate/') &&
6161
github.event.pull_request.head.repo.full_name == github.repository &&
62-
github.actor == github.repository_owner
62+
(github.actor == github.repository_owner || github.actor == 'renovate-mike[bot]')
6363
runs-on: ubuntu-latest
6464
permissions:
6565
contents: write
6666
steps:
67-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
67+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6868
with:
6969
ref: ${{ github.event.pull_request.head.ref }}
7070
persist-credentials: false
71-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
71+
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
7272
with:
7373
node-version: 24.x
7474
- run: npm ci && npm run build && npm run package
@@ -131,7 +131,7 @@ jobs:
131131
run: echo "CHANGELOG"
132132

133133
- name: Checkout
134-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
134+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
135135
with:
136136
fetch-depth: 0
137137

@@ -226,10 +226,10 @@ jobs:
226226
attestations: write
227227
steps:
228228
- name: Checkout
229-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
229+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
230230

231231
- name: Set Node.js 24.x
232-
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
232+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
233233
with:
234234
node-version: 24.x
235235

@@ -238,20 +238,20 @@ jobs:
238238

239239
- name: "Build Changelog"
240240
id: github_release
241-
uses: mikepenz/release-changelog-builder-action@a34a8009a9588bb86b02a873cf592440e96a5da8 # v6
241+
uses: mikepenz/release-changelog-builder-action@bcae7115752d4ed746ff92feb666574428a79415 # v6.2.1
242242
with:
243243
configuration: "configs/configuration_repo.json"
244244
ignorePreReleases: ${{ !contains(github.ref, '-') }}
245245
token: ${{ secrets.GITHUB_TOKEN }}
246246

247247
- name: Create Release
248-
uses: mikepenz/action-gh-release@5c3d16ffbdc3e0fbfe2c8a69a448798f5d9b30c2 # v2
248+
uses: mikepenz/action-gh-release@2a00e201320fb618d8e705a736286b2e31aa48e2 # v3.0.0
249249
with:
250250
body: ${{steps.github_release.outputs.changelog}}
251251
prerelease: ${{ contains(github.ref, '-rc') || contains(github.ref, '-b') || contains(github.ref, '-a') }}
252252
token: ${{ secrets.GITHUB_TOKEN }}
253253

254254
- name: Attest build provenance
255-
uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4
255+
uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0
256256
with:
257257
subject-path: dist/index.js

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ jobs:
4343

4444
steps:
4545
- name: Checkout repository
46-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
46+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4747

4848
# Initializes the CodeQL tools for scanning.
4949
- name: Initialize CodeQL
50-
uses: github/codeql-action/init@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
50+
uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
5151
with:
5252
languages: ${{ matrix.language }}
5353
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -58,7 +58,7 @@ jobs:
5858
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5959
# If this step fails, then you should remove it and run the build manually (see below)
6060
- name: Autobuild
61-
uses: github/codeql-action/autobuild@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
61+
uses: github/codeql-action/autobuild@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
6262

6363
# ℹ️ Command-line programs to run using the OS shell.
6464
# 📚 https://git.io/JvXDl
@@ -72,4 +72,4 @@ jobs:
7272
# make release
7373

7474
- name: Perform CodeQL Analysis
75-
uses: github/codeql-action/analyze@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
75+
uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2

__tests__/releaseNotesBuilder.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ test('[Github] Should match generated changelog (unspecified fromTag)', async ()
1717
'mikepenz',
1818
'release-changelog-builder-action',
1919
null,
20-
'v0.0.3',
20+
'v6.1.1',
2121
false,
2222
false,
2323
false,
@@ -34,10 +34,10 @@ test('[Github] Should match generated changelog (unspecified fromTag)', async ()
3434

3535
const changeLog = await releaseNotesBuilder.build()
3636
console.log(changeLog)
37-
expect(changeLog).toStrictEqual(`## 🧪 Tests
37+
expect(changeLog).toStrictEqual(`## 🚀 Features
3838
39-
- [CI] Specify Test Case
40-
- PR: #10
39+
- Upgrade all dependencies and move to ESLint 10
40+
- PR: #1521
4141
4242
`)
4343
})

__tests__/transform.test.ts

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,3 +710,55 @@ test('Use Rules to get all open PRs in one Category and merged categorised.', as
710710
`## Open PRs only\n\n- Still pending open pull request\n - PR: #6\n\n## 🚀 Features and 🐛 Issues\n\n- [ABC-1234] - this is a PR 3 title message\n - PR: #3\n\n`
711711
)
712712
})
713+
714+
const mkPr = (number: number, title: string, label: string): PullRequestInfo => ({
715+
number,
716+
title,
717+
htmlURL: '',
718+
baseBranch: '',
719+
createdAt: moment(),
720+
mergedAt: moment(),
721+
mergeCommitSha: `sha${number}`,
722+
author: 'octocat',
723+
authorName: 'octocat',
724+
repoName: 'test-repo',
725+
labels: [label],
726+
milestone: '',
727+
body: '',
728+
assignees: [],
729+
requestedReviewers: [],
730+
approvedReviewers: [],
731+
status: 'merged'
732+
})
733+
734+
const specialCharsConfig: Configuration = Object.assign({}, DefaultConfiguration, {
735+
categories: [
736+
{title: '## Features', labels: ['feature']},
737+
{title: '## Bugs', labels: ['bug']},
738+
{title: '## Tests', labels: ['test']}
739+
],
740+
template: '#{{CHANGELOG}}',
741+
pr_template: '* #{{TITLE}} by @#{{AUTHOR}} in ##{{NUMBER}}'
742+
})
743+
744+
test('PR titles with backtick code spans render verbatim', async () => {
745+
const prs = [
746+
mkPr(269, 'Fix unit test for `String.Format()`', 'test'),
747+
mkPr(270, 'Improvements in `String` class', 'feature'),
748+
mkPr(271, 'Rewrote `Guid.CompareTo`', 'bug')
749+
]
750+
const out = buildChangelogTest(specialCharsConfig, prs, repositoryUtils)
751+
expect(out).toContain('* Fix unit test for `String.Format()` by @octocat in #269')
752+
expect(out).toContain('* Improvements in `String` class by @octocat in #270')
753+
expect(out).toContain('* Rewrote `Guid.CompareTo` by @octocat in #271')
754+
})
755+
756+
test('PR titles with $-escape sequences render verbatim', async () => {
757+
const prs = [
758+
mkPr(101, 'weird $& and $1 and $$ chars', 'bug'),
759+
mkPr(102, "edge $` and $' and $0 and $<name>", 'bug')
760+
]
761+
const out = buildChangelogTest(specialCharsConfig, prs, repositoryUtils)
762+
expect(out).toContain('* weird $& and $1 and $$ chars by @octocat in #101')
763+
expect(out).toContain("* edge $` and $' and $0 and $<name> by @octocat in #102")
764+
})

0 commit comments

Comments
 (0)