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

Allow Github PR Diff #8

Open
winterDroid opened this issue Jan 22, 2018 · 2 comments
Open

Allow Github PR Diff #8

winterDroid opened this issue Jan 22, 2018 · 2 comments

Comments

@winterDroid
Copy link

Thanks for the plugin, but it would be nice to be able to use a Github PR as a diff.
If the a PR was branched off the target branch couple of days ago and the target branched changed quite a lot, the diff is still much bigger than the actual patch.

@tomasbjerre
Copy link
Owner

tomasbjerre commented Jan 22, 2018

If you refer to the PR being built in Travis, then Travis will always build the merge right? Not the source branch by its own. And if that merge is being built, all reported violations will refer to lines in that diff (source branch and target branch).

If you are building the feature-branch by its own, perhaps from can be the most recent ancestor of source and target branches, to can be source or just HEAD:

./gradlew check -PdiffFrom=`git merge-base target-branch source-branch` -PdiffTo=source-branch

@winterDroid
Copy link
Author

Mmh I used pull/<PR number>/merge to checkout the merged PR in diffFrom and the target branch in diffTo. But I'll try your proposal.

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

No branches or pull requests

2 participants