-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git-node: add config option to set wait times #367
Conversation
06acd22
to
6883ba6
Compare
Can you add some docs? From the look of the code I assume it's in hours? |
Sure. What's the best place to document this? git-node.md or ncu-config.md? |
It's git-node specific config so I think it should be documented there. |
Codecov Report
@@ Coverage Diff @@
## master #367 +/- ##
==========================================
+ Coverage 75.12% 75.37% +0.24%
==========================================
Files 21 21
Lines 1399 1405 +6
==========================================
+ Hits 1051 1059 +8
+ Misses 348 346 -2
Continue to review full report at Codecov.
|
Add two new config options: `waitTimeSingleApproval` and `waitTimeMultiApproval`, which can be used to set how long ncu should wait before landing a PR with 1 approval or with 2+ approvals.
dab4020
to
ef00a4d
Compare
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The option names are a bit odd to me but I cannot think of anything more natural either..
@@ -78,6 +80,14 @@ class Session { | |||
return this.config.readme; | |||
} | |||
|
|||
get waitTimeSingleApproval() { | |||
return this.config.waitTimeSingleApproval; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Umm, on a second thought, why are the defaults set in the PR checker, instead of here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, that makes more sense. I'll move it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second thought, this won't work because git node metadata
doesn't use a Session. So git node land
would get the defaults correctly, but git node metadata
wouldn't.
We could create a MetadataSession, but it seems a bit too much. Also doesn't make sense since the idea of a session (to my understanding at least) is to save the state of a command to be resumed later.
Should we keep this here then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @joyeecheung
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, makes sense, I forgot that the PR checker is also run by the metadata generator.
@joyeecheung do you mind landing this? I don't have commit access to this repo (I also can't remove the WIP tag) |
Add two new config options:
waitTimeSingleApproval
andwaitTimeMultiApproval
, which can be used to set how long ncu shouldwait before landing a PR with 1 approval or with 2+ approvals.