Skip to content

Commit 2014ad1

Browse files
authored
Merge pull request #208 from SableClient/7w1-patch-1
Use RELEASE_PAT for GitHub token in release workflow
2 parents 0110522 + 496bd3f commit 2014ad1

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/prepare-release.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
with:
1919
fetch-depth: 0
2020
persist-credentials: true
21+
token: ${{ secrets.RELEASE_PAT }}
2122

2223
- uses: fregante/setup-git-user@024bc0b8e177d7e77203b48dab6fb45666854b35 # v2.0.2
2324

@@ -29,7 +30,7 @@ jobs:
2930
run: knope prepare-release --verbose
3031
continue-on-error: true
3132
env:
32-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }}
3334

3435
- name: Enrich changelog with PR attribution
3536
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
@@ -60,6 +61,12 @@ jobs:
6061
});
6162
const pr = prs.data[0];
6263
if (pr) {
64+
const isInternal = pr.labels.some(label => label.name.toLowerCase() === 'internal');
65+
if (isInternal) {
66+
const lineRegex = new RegExp(`^.*.*\\r?\\n?`, 'gm');
67+
content = content.replace(lineRegex, '');
68+
continue;
69+
}
6370
replacement = `([#${pr.number}](${pr.html_url}) by @${pr.user.login})`;
6471
} else {
6572
// Commit exists but has no associated PR (e.g. direct push to dev)

0 commit comments

Comments
 (0)