Merge pull request #208 from SableClient/7w1-patch-1

Use RELEASE_PAT for GitHub token in release workflow
This commit is contained in:
7w1 authored and GitHub committed 2026-03-11 22:10:28 -05:00
commit 2014ad147c
1 file changed
+8 -1
+8 -1
View File
@@ -18,6 +18,7 @@ jobs:
with:
fetch-depth: 0
persist-credentials: true
token: ${{ secrets.RELEASE_PAT }}
- uses: fregante/setup-git-user@024bc0b8e177d7e77203b48dab6fb45666854b35 # v2.0.2
@@ -29,7 +30,7 @@ jobs:
run: knope prepare-release --verbose
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }}
- name: Enrich changelog with PR attribution
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
@@ -60,6 +61,12 @@ jobs:
});
const pr = prs.data[0];
if (pr) {
const isInternal = pr.labels.some(label => label.name.toLowerCase() === 'internal');
if (isInternal) {
const lineRegex = new RegExp(`^.*.*\\r?\\n?`, 'gm');
content = content.replace(lineRegex, '');
continue;
}
replacement = `([#${pr.number}](${pr.html_url}) by @${pr.user.login})`;
} else {
// Commit exists but has no associated PR (e.g. direct push to dev)