Skip to content

Commit 9957e38

Browse files
committed
fix: consider master and main on code repos
1 parent f13e453 commit 9957e38

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env node
2-
console.log('release-notes-patch -> v1.6.2 (switch docu repo from master to main as default branch)')
2+
console.log('release-notes-patch -> v1.6.3 (switch docu repo from master to main as default branch + fix)')
33
const argv = require('yargs')
44
.demandOption(['token', 'owner', 'repo', 'sha', 'tag'])
55
.help(false)

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ const branches = createBranchList({
1515
months: {before: 8, after: 4}
1616
})
1717
// add 'main' to live patch the upcoming release notes
18+
// add 'master' to live patch the upcoming release notes
1819
branches.push('main')
20+
branches.push('master')
1921

2022
const targetOwner = 'livingdocsIO'
2123
const targetRepo = 'documentation'
@@ -39,7 +41,7 @@ module.exports = async ({token, owner, repo, sha, tag, test = false} = {}) => {
3941

4042
let patchedReleaseNotes
4143
// patch release notes detail for upcoming release
42-
if (release.branchName === 'main') {
44+
if (release.branchName === 'master' || release.branchName === 'main') {
4345
const pull = await getPullBySha({owner, repo, token, sha})
4446
if (!pull) return `Release notes will not be extended, because no PR found for commit ${sha} in ${owner}/${repo}. \nThis happens when someone pushes to main without opening a PR.`
4547
patchedReleaseNotes = addPatchToUpcomingReleaseNote({

0 commit comments

Comments
 (0)