Merge pull request #1025 from mikepenz/develop

dev -> main
This commit is contained in:
Mike Penz
2023-02-18 13:22:53 +01:00
committed by GitHub
10 changed files with 1822 additions and 1276 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
"features": { "features": {
"ghcr.io/devcontainers/features/node:1": {}, "ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers-contrib/features/typescript:1": {} "ghcr.io/devcontainers-contrib/features/typescript:1": {}
} },
// Features to add to the dev container. More info: https://containers.dev/features. // Features to add to the dev container. More info: https://containers.dev/features.
// "features": {}, // "features": {},
+2 -2
View File
@@ -79,7 +79,7 @@ jobs:
run: echo "CHANGELOG" run: echo "CHANGELOG"
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
@@ -134,7 +134,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: "Build Changelog" - name: "Build Changelog"
id: github_release id: github_release
+1 -1
View File
@@ -43,7 +43,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
+1 -1
View File
@@ -197,7 +197,7 @@ The action supports flexible configuration options to modify vast areas of its b
> **Note** It is possible to provide the configuration as file and as json via the yml file. The order of config values used: `configurationJson` > `configuration` > `DefaultConfiguration`. > **Note** It is possible to provide the configuration as file and as json via the yml file. The order of config values used: `configurationJson` > `configuration` > `DefaultConfiguration`.
This configuration is a `JSON` in the following format. (The below shocases *example* configurations for all possible options. In most scenarios most of the settings will not be needed, and the defaults will be appropiate.) This configuration is a `JSON` in the following format. (The below showcases *example* configurations for all possible options. In most scenarios most of the settings will not be needed, and the defaults will be appropiate.)
```json ```json
{ {
+2 -2
View File
@@ -232,7 +232,7 @@ it('Should ignore PRs not merged into develop branch', async () => {
const changeLog = await releaseNotes.pull() const changeLog = await releaseNotes.pull()
console.log(changeLog) console.log(changeLog)
expect(changeLog).toStrictEqual(`\n\n150\n\n`) expect(changeLog).toStrictEqual(`150\n\n`)
}) })
it('Should ignore PRs not merged into main branch', async () => { it('Should ignore PRs not merged into main branch', async () => {
@@ -253,5 +253,5 @@ it('Should ignore PRs not merged into main branch', async () => {
const changeLog = await releaseNotes.pull() const changeLog = await releaseNotes.pull()
console.log(changeLog) console.log(changeLog)
expect(changeLog).toStrictEqual(`\n\n153\n\n`) expect(changeLog).toStrictEqual(`153\n\n`)
}) })
Generated Vendored
+113 -178
View File
File diff suppressed because one or more lines are too long
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
+1682 -1075
View File
File diff suppressed because it is too large Load Diff
+13 -13
View File
@@ -35,7 +35,7 @@
"@actions/core": "^1.10.0", "@actions/core": "^1.10.0",
"@actions/exec": "^1.1.1", "@actions/exec": "^1.1.1",
"@actions/github": "^5.1.1", "@actions/github": "^5.1.1",
"@octokit/rest": "^19.0.5", "@octokit/rest": "^19.0.7",
"https-proxy-agent": "^5.0.1", "https-proxy-agent": "^5.0.1",
"moment": "^2.29.4", "moment": "^2.29.4",
"semver": "^7.3.8", "semver": "^7.3.8",
@@ -43,20 +43,20 @@
"webpack": "^5.75.0" "webpack": "^5.75.0"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^29.2.5", "@types/jest": "^29.4.0",
"@types/node": "^18.11.18", "@types/node": "^18.14.0",
"@types/semver": "^7.3.13", "@types/semver": "^7.3.13",
"@typescript-eslint/parser": "^5.48.0", "@typescript-eslint/parser": "^5.52.0",
"@vercel/ncc": "^0.36.0", "@vercel/ncc": "^0.36.1",
"eslint": "^8.31.0", "eslint": "^8.34.0",
"eslint-plugin-github": "^4.6.0", "eslint-plugin-github": "^4.6.1",
"eslint-plugin-jest": "^27.2.0", "eslint-plugin-jest": "^27.2.1",
"jest": "^29.3.1", "jest": "^29.4.3",
"jest-circus": "^29.3.1", "jest-circus": "^29.4.3",
"js-yaml": "^4.1.0", "js-yaml": "^4.1.0",
"prettier": "2.8.1", "prettier": "2.8.4",
"ts-jest": "^29.0.3", "ts-jest": "^29.0.5",
"typescript": "^4.9.4" "typescript": "^4.9.5"
}, },
"overrides": { "overrides": {
"json5": "^2.2.3" "json5": "^2.2.3"
+6 -2
View File
@@ -173,14 +173,18 @@ export function buildChangelog(diffInfo: DiffInfo, prs: PullRequestInfo[], optio
let changelog = '' let changelog = ''
for (const [category, pullRequests] of categorized) { for (const [category, pullRequests] of categorized) {
if (pullRequests.length > 0) { if (pullRequests.length > 0) {
changelog = `${changelog + category.title}\n\n` if (category.title) {
changelog = `${changelog + category.title}\n\n`
}
for (const pr of pullRequests) { for (const pr of pullRequests) {
changelog = `${changelog + pr}\n` changelog = `${changelog + pr}\n`
} }
changelog = `${changelog}\n` // add space between sections changelog = `${changelog}\n` // add space between sections
} else if (category.empty_content !== undefined) { } else if (category.empty_content !== undefined) {
changelog = `${changelog + category.title}\n\n` if (category.title) {
changelog = `${changelog + category.title}\n\n`
}
changelog = `${changelog + category.empty_content}\n\n` changelog = `${changelog + category.empty_content}\n\n`
} }
} }