Skip to content

Commit c3fb51e

Browse files
committed
fixup! fetch default branch name from GitHub API
1 parent 37ffe70 commit c3fb51e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

components/git/release.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,11 @@ async function main(state, argv, cli, dir) {
124124

125125
return release.prepare();
126126
} else if (state === PROMOTE) {
127-
const release = new ReleasePromotion(argv, cli, dir);
128-
129-
cli.startSpinner('Verifying Releaser status');
130127
const credentials = await auth({ github: true });
131128
const request = new Request(credentials);
129+
const release = new ReleasePromotion(argv, request, cli, dir);
130+
131+
cli.startSpinner('Verifying Releaser status');
132132
const info = new TeamInfo(cli, request, 'nodejs', RELEASERS);
133133

134134
const releasers = await info.getMembers();

lib/promote_release.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default class ReleasePromotion extends Session {
2929
}
3030

3131
get branch() {
32-
return this.defaultBranch;
32+
return this.defaultBranch ?? this.config.branch;
3333
}
3434

3535
async getDefaultBranch() {

0 commit comments

Comments
 (0)