Skip to content

Commit

Permalink
chore: update changlelog script to handle revert pr ref (#26801)
Browse files Browse the repository at this point in the history
  • Loading branch information
emilyrohrbough authored May 22, 2023
1 parent 6df7a70 commit 80985c8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
16 changes: 12 additions & 4 deletions scripts/semantic-commits/get-binary-release-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,15 @@ const getReleaseData = async (latestReleaseInfo) => {

const { type: semanticType, references } = semanticResult

if (!references.length || !references[0].issue) {
if (!references.length) {
console.log('Commit does not have an associated pull request number...')

return
}

const ref = references.find((r) => !r.raw.includes('revert #'))

if (!ref) {
console.log('Commit does not have an associated pull request number...')

return
Expand All @@ -75,19 +83,19 @@ const getReleaseData = async (latestReleaseInfo) => {
const { data: pullRequest } = await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}', {
owner: 'cypress-io',
repo: 'cypress',
pull_number: references[0].issue,
pull_number: ref.issue,
})

const associatedIssues = getLinkedIssues(pullRequest.body)

commits.push({
commitMessage: semanticResult.header,
semanticType,
prNumber: references[0].issue,
prNumber: ref.issue,
associatedIssues,
})

prsInRelease.push(`https://github.com/cypress-io/cypress/pull/${references[0].issue}`)
prsInRelease.push(`https://github.com/cypress-io/cypress/pull/${ref.issue}`)

associatedIssues.forEach((issueNumber) => {
issuesInRelease.push(`https://github.com/cypress-io/cypress/issues/${issueNumber}`)
Expand Down
2 changes: 1 addition & 1 deletion scripts/semantic-commits/validate-binary-changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const changelog = async () => {
if (process.env.CIRCLECI) {
console.log({ checkedInBinaryVersion })

if (process.env.CIRCLE_BRANCH !== 'develop' && process.env.CIRCLE_BRANCH !== 'release-12.5.0' && !/^release\/\d+\.\d+\.\d+$/.test(process.env.CIRCLE_BRANCH) && !hasVersionBump) {
if (process.env.CIRCLE_BRANCH !== 'develop' && process.env.CIRCLE_BRANCH !== 'fix-changelog-script' && !/^release\/\d+\.\d+\.\d+$/.test(process.env.CIRCLE_BRANCH) && !hasVersionBump) {
console.log('Only verify the entire changelog for develop, a release branch or any branch that bumped to the Cypress version in the package.json.')

return
Expand Down

5 comments on commit 80985c8

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 80985c8 May 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.13.0/linux-arm64/develop-80985c8d4b29884e086b1608be5205781e81432d/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 80985c8 May 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.13.0/linux-x64/develop-80985c8d4b29884e086b1608be5205781e81432d/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 80985c8 May 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.13.0/darwin-arm64/develop-80985c8d4b29884e086b1608be5205781e81432d/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 80985c8 May 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.13.0/darwin-x64/develop-80985c8d4b29884e086b1608be5205781e81432d/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 80985c8 May 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.13.0/win32-x64/develop-80985c8d4b29884e086b1608be5205781e81432d/cypress.tgz

Please sign in to comment.