Skip to content
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

Show required commit status which haven’t been done yet #21892

Closed
MarkusAmshove opened this issue Nov 21, 2022 · 8 comments · Fixed by #29143
Closed

Show required commit status which haven’t been done yet #21892

MarkusAmshove opened this issue Nov 21, 2022 · 8 comments · Fixed by #29143
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented topic/pr Issues related to pull requests type/bug
Milestone

Comments

@MarkusAmshove
Copy link
Contributor

Feature Description

If a base branch has a protection requiring a check, but the check hasn’t been started for a commit yet, then there is no indication in the pull which checks are missing.

aside from pending, failed, succeeded etc checks, the pull page could also render missing checks (required checks that haven’t reported any status for the commit yet)

Screenshots

No response

@MarkusAmshove MarkusAmshove added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Nov 21, 2022
@lunny
Copy link
Member

lunny commented Nov 21, 2022

I think this has been implemented, you can find it in the branch protection page.

@MarkusAmshove
Copy link
Contributor Author

I can't find a setting in the branch protection, might be a 1.18 feature (currently running 1.17.3)

@MarkusAmshove
Copy link
Contributor Author

This still seems to be missing, unless I'm missing an option.

If you have a required check called "A" and open a PR for the protected branch, but the commit doesn't have any status from the check "A", then the PR page just says that there are missing checks, but not which checks are missing.

@lafriks lafriks added type/bug type/enhancement An improvement of existing functionality and removed type/proposal The new feature has not been accepted yet but needs to be discussed first. type/feature Completely new functionality. Can only be merged if feature freeze is not active. labels May 24, 2023
@lafriks
Copy link
Member

lafriks commented May 24, 2023

It not only does not show required checks in PR view, it also allows merging PR while CI has not reported any status for required checks that are set in branch protection rules

@lafriks lafriks added issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented topic/pr Issues related to pull requests labels May 24, 2023
@MarkusAmshove
Copy link
Contributor Author

It not only does not show required checks in PR view, it also allows merging PR while CI has not reported any status for required checks that are set in branch protection rules

This one already bit us 4-5 times since 1.20 and the introduction of patterns for status checks :)

@MarkusAmshove
Copy link
Contributor Author

It not only does not show required checks in PR view, it also allows merging PR while CI has not reported any status for required checks that are set in branch protection rules

Is there a way to set required checks as pending on the side of Gitea?
I can try to add them for PR updates via a 3rd party app with webhooks, but I think it could happen that I overwrite a commit status that was notified in the meantime

@MarkusAmshove
Copy link
Contributor Author

I gave it a shot to fix the problem with the linked PR

@lunny lunny added this to the 1.21.6 milestone Feb 19, 2024
@lunny lunny removed the type/enhancement An improvement of existing functionality label Feb 19, 2024
lunny pushed a commit that referenced this issue Feb 19, 2024
fixes #21892 

This PR disallows merging a PR when not all commit status contexts
configured in the branch protection are met.

Previously, the PR was happy to merge when one commit status was
successful and the other contexts weren't reported.

Any feedback is welcome, first time Go :-)
I'm also not sure if the changes in the template break something else

Given the following branch protection:


![branch_protection](https://github.com/go-gitea/gitea/assets/2401875/f871b4e4-138b-435a-b496-f9ad432e3dec)

This was shown before the change:


![before](https://github.com/go-gitea/gitea/assets/2401875/60424ff0-ee09-4fa0-856e-64e6e3fb0612)

With the change, it is now shown as this:


![after](https://github.com/go-gitea/gitea/assets/2401875/4e464142-efb1-4889-8166-eb3be26c8f3d)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
MarkusAmshove added a commit to MarkusAmshove/gitea that referenced this issue Feb 19, 2024
fixes go-gitea#21892

This PR disallows merging a PR when not all commit status contexts
configured in the branch protection are met.

Previously, the PR was happy to merge when one commit status was
successful and the other contexts weren't reported.

Any feedback is welcome, first time Go :-)
I'm also not sure if the changes in the template break something else

Given the following branch protection:

![branch_protection](https://github.com/go-gitea/gitea/assets/2401875/f871b4e4-138b-435a-b496-f9ad432e3dec)

This was shown before the change:

![before](https://github.com/go-gitea/gitea/assets/2401875/60424ff0-ee09-4fa0-856e-64e6e3fb0612)

With the change, it is now shown as this:

![after](https://github.com/go-gitea/gitea/assets/2401875/4e464142-efb1-4889-8166-eb3be26c8f3d)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
silverwind pushed a commit to silverwind/gitea that referenced this issue Feb 20, 2024
fixes go-gitea#21892 

This PR disallows merging a PR when not all commit status contexts
configured in the branch protection are met.

Previously, the PR was happy to merge when one commit status was
successful and the other contexts weren't reported.

Any feedback is welcome, first time Go :-)
I'm also not sure if the changes in the template break something else

Given the following branch protection:


![branch_protection](https://github.com/go-gitea/gitea/assets/2401875/f871b4e4-138b-435a-b496-f9ad432e3dec)

This was shown before the change:


![before](https://github.com/go-gitea/gitea/assets/2401875/60424ff0-ee09-4fa0-856e-64e6e3fb0612)

With the change, it is now shown as this:


![after](https://github.com/go-gitea/gitea/assets/2401875/4e464142-efb1-4889-8166-eb3be26c8f3d)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6543 pushed a commit to 6543-forks/gitea that referenced this issue Feb 26, 2024
fixes go-gitea#21892

This PR disallows merging a PR when not all commit status contexts
configured in the branch protection are met.

Previously, the PR was happy to merge when one commit status was
successful and the other contexts weren't reported.

Any feedback is welcome, first time Go :-)
I'm also not sure if the changes in the template break something else

Given the following branch protection:

![branch_protection](https://github.com/go-gitea/gitea/assets/2401875/f871b4e4-138b-435a-b496-f9ad432e3dec)

This was shown before the change:

![before](https://github.com/go-gitea/gitea/assets/2401875/60424ff0-ee09-4fa0-856e-64e6e3fb0612)

With the change, it is now shown as this:

![after](https://github.com/go-gitea/gitea/assets/2401875/4e464142-efb1-4889-8166-eb3be26c8f3d)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit a11ccc9)
Copy link

github-actions bot commented Mar 1, 2024

Automatically locked because of our CONTRIBUTING guidelines

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented topic/pr Issues related to pull requests type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants