Skip to content

build: merge-pr new checks that all requested changes have been addre… #21817

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

Closed
wants to merge 2 commits into from

Conversation

mhevery
Copy link
Contributor

@mhevery mhevery commented Jan 27, 2018

No description provided.

@mhevery mhevery requested a review from IgorMinar January 27, 2018 00:03
@mhevery mhevery added the target: patch This PR is targeted for the next patch release label Jan 27, 2018
@@ -60,6 +61,11 @@ if [[ "$PR_CLA" != "cla: yes" ]]; then
exit 1
fi

if [[ $MERGE_STATUS == *CHANGES_REQUESTED* ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that this is right. or is it? we care if we have all the approvals. no? if someone objects and has the authority to do so, we should change pullapprove to not approve the PR.

the thing is that anyone can object to a change, including a non-contributor. this should not block merging.

Copy link
Contributor Author

@mhevery mhevery Jan 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is the use case.

  1. I approve the PR, pull approve goes green 💚 .
  2. You come along and object. You would expect for pull approve to go red 🔴 , but it does not. So now we are in mergeable state even touch there are outstanding reviews and that should not be it.

At this point status is green with a check mark but you have an objection. This PR makes it so that both the pull approve status as well as reviews are green. (Yes it is weird that status can be green and review red, but that is the way it is)

So we could be smarter and try to reconcile which reviews are from our team and which are not, but that would make the script complicated. The easiest is to just go to the UI and dismiss the review which you don't agree with.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about we use http://docs.pullapprove.com/groups/reject_value/ instead?

required: 1
reject_value: -999

that way pullapprove is always the source of truth and it's up to the reviewer/pr author to make sure that the PR is green.

// fyi: @alexeagle

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we do that, than we can effectively discard the PR. How will dismissals be valued?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 that "is this approved" should always be equal to "is pullapprove green"

Let's try this setting out and just test the scenario you're concerned about? That's what we did last time we changed the logic.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@IgorMinar IgorMinar added the action: review The PR is still awaiting reviews from at least one requested reviewer label Jan 27, 2018
@jasonaden jasonaden added the area: build & ci Related the build and CI infrastructure of the project label Jan 29, 2018
@IgorMinar
Copy link
Contributor

I think this is now obsolete due to #21922. @mhevery can you confirm?

@IgorMinar IgorMinar added state: blocked and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Feb 9, 2018
@mhevery mhevery added action: merge The PR is ready for merge by the caretaker and removed state: blocked labels Feb 9, 2018
@mhevery
Copy link
Contributor Author

mhevery commented Feb 9, 2018

no #21922 does not do what we want. So this still needs to be merged.

Copy link
Contributor

@IgorMinar IgorMinar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please make the error message more explicit and actionable. I provided a suggestion.

@@ -60,6 +61,11 @@ if [[ "$PR_CLA" != "cla: yes" ]]; then
exit 1
fi

if [[ $MERGE_STATUS == *CHANGES_REQUESTED* ]]; then
echo The PR $PR_NUMBER has requested changes from a reviewer.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"the PR XXX has not been approved by all reviewers. Ask PR owner to obtain reviews or dismiss reviews and document the dismissal reason."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@IgorMinar IgorMinar added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: merge The PR is ready for merge by the caretaker labels Feb 10, 2018
@mhevery mhevery added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews flag: can be closed? labels Feb 10, 2018
mhevery added a commit that referenced this pull request Feb 10, 2018
@mhevery mhevery closed this in 4a4d749 Feb 10, 2018
@mhevery mhevery deleted the merge-pr branch February 14, 2018 23:01
matsko added a commit that referenced this pull request Feb 14, 2018
matsko added a commit that referenced this pull request Feb 15, 2018
@vicb vicb added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Feb 15, 2018
vicb pushed a commit to vicb/angular that referenced this pull request Feb 15, 2018
vicb pushed a commit that referenced this pull request Feb 15, 2018
jbogarthyde pushed a commit to jbogarthyde/angular that referenced this pull request Feb 23, 2018
jbogarthyde pushed a commit to jbogarthyde/angular that referenced this pull request Feb 23, 2018
jbogarthyde pushed a commit to jbogarthyde/angular that referenced this pull request Feb 23, 2018
jbogarthyde pushed a commit to jbogarthyde/angular that referenced this pull request Feb 23, 2018
smdunn pushed a commit to smdunn/angular that referenced this pull request Feb 28, 2018
smdunn pushed a commit to smdunn/angular that referenced this pull request Feb 28, 2018
smdunn pushed a commit to smdunn/angular that referenced this pull request Feb 28, 2018
leo6104 pushed a commit to leo6104/angular that referenced this pull request Mar 25, 2018
leo6104 pushed a commit to leo6104/angular that referenced this pull request Mar 25, 2018
leo6104 pushed a commit to leo6104/angular that referenced this pull request Mar 25, 2018
leo6104 pushed a commit to leo6104/angular that referenced this pull request Mar 25, 2018
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews action: merge The PR is ready for merge by the caretaker area: build & ci Related the build and CI infrastructure of the project cla: yes target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants