Skip to content

Commit e7b63f1

Browse files
authored
chore(ci): fix commit parsing logic (#336)
1 parent 5ef2b6d commit e7b63f1

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

scripts/release/create-release-issue.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,16 @@ async function createReleaseIssue(): Promise<void> {
179179
const commitsWithUnknownLanguageScope: string[] = [];
180180
const commitsWithoutLanguageScope: string[] = [];
181181

182+
// Remove the local tag, and fetch it from the remote.
183+
// We move the `released` tag as we release, so we need to make it up-to-date.
184+
await run(`git tag -d ${RELEASED_TAG}`);
185+
await run(
186+
`git fetch origin refs/tags/${RELEASED_TAG}:refs/tags/${RELEASED_TAG}`
187+
);
188+
182189
// Reading commits since last release
183190
const latestCommits = (
184-
await run(`git log --oneline ${RELEASED_TAG}..${MAIN_BRANCH}`)
191+
await run(`git log --oneline --abbrev=8 ${RELEASED_TAG}..${MAIN_BRANCH}`)
185192
)
186193
.split('\n')
187194
.filter(Boolean)

scripts/release/process-release.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,9 @@ async function processRelease(): Promise<void> {
269269
await run(`git push`);
270270

271271
// remove old `released` tag
272-
await run(`git fetch origin refs/tags/released:refs/tags/released`);
272+
await run(
273+
`git fetch origin refs/tags/${RELEASED_TAG}:refs/tags/${RELEASED_TAG}`
274+
);
273275
await run(`git tag -d ${RELEASED_TAG}`);
274276
await run(`git push --delete origin ${RELEASED_TAG}`);
275277

0 commit comments

Comments
 (0)