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

Add AlternatePatchAction #5

Closed
wants to merge 2 commits into from
Closed

Add AlternatePatchAction #5

wants to merge 2 commits into from

Conversation

akshatkarani
Copy link
Owner

@akshatkarani akshatkarani commented Jul 9, 2019

Added new attribute in Result class, alternate_diffs which is the list of alternative patches that bear is suggesting. For each alternate_diff an AlterantePatchAction instance is added.
The idea is very similar to adding multiple instances of ShowPatchAction, AlternatePatchAction just helps with manipulating between the original patch and the alternate patch.
Also because of the way how the user chooses an action and how actions are printed on the screen, AlternatePatchAction needs it's own get_metadata function. The part of updating the description and passing count seems a little hackish but I didn't see any other way.

@akshatkarani
Copy link
Owner Author

akshatkarani commented Jul 9, 2019

This PR is on top of changes made in coala#6029
Actually, it doesn't depend on this PR.

@akshatkarani
Copy link
Owner Author

akshatkarani commented Jul 11, 2019

Don't forget to document the new parameter :)

Yes, it's a list where each element if an alternative diff.

This adds a new attribute `alternate_diffs` to Result class. It is a
list of dictionaries where each element is an alternate patch suggested
by the bear. Corresponding to each `alternate_diff` an instance of
AlternatePatchAction is added to the list of actions.
@abhishalya
Copy link

@akshatkarani Appveyor is failing because it can't find the appveyor.yml file in home directory. Manually add the path to the appveyor.yml file in your CI settings.

@abhishalya
Copy link

Also, create a PR on the upstream repo now.

@akshatkarani
Copy link
Owner Author

Also, create a PR on the upstream repo now.

Done coala#6057

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.

2 participants