refactor: use main in release-notes (#29395)

This commit is contained in:
Jeremy Rose 2021-05-28 12:14:50 -07:00 committed by GitHub
parent a61f1446bc
commit 750ebfdbca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,13 +37,13 @@ const getTagsOf = async (point) => {
}; };
const getTagsOnBranch = async (point) => { const getTagsOnBranch = async (point) => {
const masterTags = await getTagsOf('master'); const mainTags = await getTagsOf('main');
if (point === 'master') { if (point === 'main') {
return masterTags; return mainTags;
} }
const masterTagsSet = new Set(masterTags); const mainTagsSet = new Set(mainTags);
return (await getTagsOf(point)).filter(tag => !masterTagsSet.has(tag)); return (await getTagsOf(point)).filter(tag => !mainTagsSet.has(tag));
}; };
const getBranchOf = async (point) => { const getBranchOf = async (point) => {
@ -66,7 +66,8 @@ const getAllBranches = async () => {
return branches.split('\n') return branches.split('\n')
.map(branch => branch.trim()) .map(branch => branch.trim())
.filter(branch => !!branch) .filter(branch => !!branch)
.filter(branch => branch !== 'origin/HEAD -> origin/master') // TODO(main-migration): Simplify once branch rename is complete.
.filter(branch => branch !== 'origin/HEAD -> origin/master' && branch !== 'origin/HEAD -> origin/main')
.sort(); .sort();
} catch (err) { } catch (err) {
console.error('Failed to fetch all branches'); console.error('Failed to fetch all branches');