Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
refactor: use options object in LandingSession
  • Loading branch information
lundibundi committed Aug 22, 2020
commit f5b356b578e42ed0dfeb73e0359a21184a85034d
3 changes: 1 addition & 2 deletions components/git/land.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,7 @@ async function main(state, argv, cli, req, dir) {
cli.log('run `git node land --abort` before starting a new session');
return;
}
session = new LandingSession(cli, req, dir, argv.prid, argv.backport,
argv.lint, argv.autorebase);
session = new LandingSession(cli, req, dir, argv);
const metadata = await getMetadata(session.argv, argv.skipRefs, cli);
if (argv.backport) {
const split = metadata.metadata.split('\n')[0];
Expand Down
2 changes: 1 addition & 1 deletion lib/landing_session.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const LINT_RESULTS = {
};

class LandingSession extends Session {
constructor(cli, req, dir, prid, backport, lint, autorebase) {
constructor(cli, req, dir, { prid, backport, lint, autorebase } = {}) {
super(cli, dir, prid);
this.req = req;
this.backport = backport;
Expand Down