refactor: use main in release-notes (#29395)
This commit is contained in:
parent
a61f1446bc
commit
750ebfdbca
1 changed files with 7 additions and 6 deletions
|
@ -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');
|
||||||
|
|
Loading…
Add table
Reference in a new issue