-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(ci): fix commit parsing logic #336
Conversation
✅ Deploy Preview for api-clients-automation canceled.
|
✗ The generated branch has been deleted.If the PR has been merged, you can check the generated code on the |
@@ -179,6 +178,13 @@ async function createReleaseIssue(): Promise<void> { | |||
const commitsWithUnknownLanguageScope: string[] = []; | |||
const commitsWithoutLanguageScope: string[] = []; | |||
|
|||
// Remove the local tag, and fetch it from the remote. | |||
// We move the `released` tag as we release, so we need to make it up-to-date. | |||
await run(`git tag -d ${RELEASED_TAG}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As explained above, we need to remove the local tag, and fetch it from the remote.
@@ -269,7 +269,9 @@ async function processRelease(): Promise<void> { | |||
await run(`git push`); | |||
|
|||
// remove old `released` tag | |||
await run(`git fetch origin refs/tags/released:refs/tags/released`); | |||
await run( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just gardening.
const LENGTH_SHA1 = 8; | ||
const hash = commit.slice(0, LENGTH_SHA1); | ||
let message = commit.slice(LENGTH_SHA1 + 1); | ||
const hash = commit.split(' ')[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we only care about feat
and fix
commits here? If so, we can use them as a split, so we don't rely on spaces or hash length
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I just discovered --abbrev=8
option!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be safer to abbrev 7? Or does abbrev 8 on a 7 char long hash works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok nevermind I guess I got it now :D
f147bda
to
af879d5
Compare
af879d5
to
9e70d33
Compare
🧭 What and Why
🎟 JIRA Ticket:
Changes included:
🧪 Test