mirror of
https://github.com/changesets/action
synced 2026-10-26 16:39:56 +08:00
Sort things by public/private
This commit is contained in:
@@ -124,3 +124,16 @@ export async function execWithOutput(
|
||||
stderr: myError
|
||||
};
|
||||
}
|
||||
|
||||
export function sortTheThings(
|
||||
a: { private: boolean; highestLevel: number },
|
||||
b: { private: boolean; highestLevel: number }
|
||||
) {
|
||||
if (a.private === b.private) {
|
||||
return b.highestLevel - a.highestLevel;
|
||||
}
|
||||
if (a.private) {
|
||||
return 1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user