Pull Request behind the target branch causing issues
See original GitHub issueBy comparing a PR that may not have been rebased against the latest changes to master
against master
itself, graphql-inspector emits backwards compatibility warnings for any recently added fields, even though these fields won’t be removed by the PR. Although it’s possible to work around this by merging the latest master
whenever this happens, this is a bit of a faff, especially given that GitHub doesn’t provide a button for doing this unless there’s a merge conflict.
Are there any tricks that would allow graphql-inspector to avoid showing these red herrings?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:16 (13 by maintainers)
Top Results From Across the Web
GitHub pull request showing commits that are already in target ...
The target branch was behind master and the pull request showed commits from master, so I merged master and pushed it to GitHub,...
Read more >Prevent Merge of Pull Requests Behind Target Branch
These types of PRs could cause the following problems: Conflicts make the branch not mergeable. Merge results are unknown since it has not...
Read more >Commits missing from Pull Request merge on target branch
Problem. After merging a Pull Request the merge commit and commits from the source branch cannot be found on the destination branch.
Read more >In GitHub, how do I resolve the issue 'This branch is n commits ...
Go to your GitHub profile and click on pull requests. Select the pull request you want to revert. Open it and at the...
Read more >Problems with Pull Requests and How to Fix Them
The pull request is then used as a vehicle for code review, ... runs a git merge against the target branch behind the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@wopian done, use
master
and try to run Inspector Action onpull_request
event, when it’s onpush
it won’t get a PR number. I would recommend to usepull_request
on PRs andpush
formaster
branch or something like that.Apologies @kamilkisiela, I managed to miss your reply here.
Suppose you have two developers, Bob & Sue, both working on the same codebase. They both pull the code at the same time to begin their work – let’s call the commit they start with
#c0
.After a day, Sue commits a change where she adds a new field to the schema (
Person.age
for arguments sake), so that the latest commit onmaster
is now#c1
.Bob then pushes a new feature that does not change the schema whatsoever, and so can’t possibly introduce a backwardly incompatible change. However,
graphql-inspector
compares his commit (which does not yet containPerson.age
) againstmaster
, which does, and concludes that Bob is breaking backwards compatibility by removing thePerson.age
field.Of course, he’s doing no such thing, and the problem is only that the latest version of
master
(containing commit#c1
) was not merged into his branch before performing the comparison.Hopefully that makes more sense now?