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

chore(repo): ensure self mutation updates branch as well #3922

Merged
merged 9 commits into from
Aug 23, 2023

Conversation

MarkMcCulloh
Copy link
Contributor

@MarkMcCulloh MarkMcCulloh commented Aug 22, 2023

Pull requests do not actually run workflows on the head of a given branch, it uses the merge commit between that head and the target head (e.g. main)

This means that when mutation patches are generated, they assume they're operating on the merge commit. This PR makes that assumption true when applying patches by also updating the branch itself.

adding do-not-merge to test, but feel free to review.

By submitting this pull request, I confirm that my contribution is made under the terms of the Wing Cloud Contribution License.

@MarkMcCulloh MarkMcCulloh added the 🚧 pr/do-not-merge PRs with this label will not be automatically merged by mergify. label Aug 22, 2023
@MarkMcCulloh MarkMcCulloh requested a review from a team as a code owner August 22, 2023 20:22
MarkMcCulloh and others added 3 commits August 23, 2023 09:09
Signed-off-by: monada-bot[bot] <monabot@monada.co>
@monadabot monadabot added the ⚠️ pr/review-mutation PR has been mutated and will not auto-merge. Clear this label if the changes look good! label Aug 23, 2023
@MarkMcCulloh MarkMcCulloh removed the ⚠️ pr/review-mutation PR has been mutated and will not auto-merge. Clear this label if the changes look good! label Aug 23, 2023
Signed-off-by: monada-bot[bot] <monabot@monada.co>
@monadabot monadabot added the ⚠️ pr/review-mutation PR has been mutated and will not auto-merge. Clear this label if the changes look good! label Aug 23, 2023
@MarkMcCulloh MarkMcCulloh removed ⚠️ pr/review-mutation PR has been mutated and will not auto-merge. Clear this label if the changes look good! 🚧 pr/do-not-merge PRs with this label will not be automatically merged by mergify. labels Aug 23, 2023
@mergify
Copy link
Contributor

mergify bot commented Aug 23, 2023

Thanks for contributing, @MarkMcCulloh! This PR will now be added to the merge queue, or immediately merged if mark/mutation-update is up-to-date with main and the queue is empty.

@mergify mergify bot merged commit 116ee64 into main Aug 23, 2023
11 checks passed
@mergify mergify bot deleted the mark/mutation-update branch August 23, 2023 14:25
@monadabot
Copy link
Contributor

Congrats! 🚀 This was released in Wing 0.25.37.

mergify bot pushed a commit that referenced this pull request Aug 24, 2023
…e commit (#3946)

The change introduced in #3922 technically works, but the result is confusing because the patch applied is not an actual merge commit. So Github shows those changes as if you made them.

This PR instead does the mutation update via the github API. The downside of this (other than the obvious complexity) is that technically the updated branch can be newer than the one the diffs were created against. I would rather have that problem than the one we have now.

Change has been tested in my fork here https://github.com/MarkMcCulloh/wing-distributed-workflow/pull/5

*By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants