-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat: implement requiredStatusChecks
for GitHub and GitLab
#4597
Conversation
37a8091
to
8266281
Compare
There are some obvious use cases here but also some less obvious.
The key question is: what to do if the user configures a required status check that fails to show up? I think we should probably be pending forever. What do you think? |
Ha, I totally missed those cases. |
Let me think for a while. Also, should I do this for other platforms in this PR? Or should I separate them up? |
Ideally we would implement this for all platforms that could support it. It's OK to note a feature is "platform X only" but it can confuse users even still, so ideally we don't do that. |
e9e1e0a
to
187073e
Compare
requiredStatusChecks
requiredStatusChecks
5c8782c
to
6d4c552
Compare
6d4c552
to
dd334fb
Compare
requiredStatusChecks
requiredStatusChecks
for GitHub and GitLab
@rarkins I ended up implement for both GitHub and GitLab. |
@leipert could you glance at the GitLab part of this? |
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.
Can we extract some util function for this? I see a lot duplicated code.
if ( | ||
commitStatus.state === 'failed' || | ||
filteredStatusesCombined === 'failed' || | ||
checkRuns.some(run => run.conclusion === 'failed') |
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.
Should we be applying the same logic to check runs? What happens if the user applies requiredStatusChecks
while also there are some check runs?
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.
I'll see what I can do.
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.
Check runs (github) support. Also, possible to de-duplicate the core logic between github and gitlab implementations?
@sarunint any news? Are you planning any changes? |
This should be simple adaptable for azure would be more difficult. renovate/lib/platform/azure/index.ts Line 353 in 4adb0c0
https://docs.microsoft.com/en-us/rest/api/azure/devops/git/statuses/list?view=azure-devops-rest-5.1 |
@viceice Sorry, I've been very busy this month. I'll try to fix things up this weekend. |
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.
Needs deconflicting
|
Closes #1853 (partially)