Skip to content

Fixed repository_compare examples #282

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

Merged
merged 2 commits into from
Jul 10, 2017

Conversation

aronpammer
Copy link

No description provided.

Copy link
Contributor

@gpocentek gpocentek left a comment

Choose a reason for hiding this comment

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

Nice catch, thank you!

Could you fix the 2 problems?

@@ -178,11 +178,11 @@
result = project.repository_compare('master', 'branch1')

# get the commits
for i in commit:
print(result.commits)
for commit in result.commits:
Copy link
Contributor

Choose a reason for hiding this comment

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

result is a dict, so you need result['commits'] here.


# get the diffs
for file_diff in commit.diffs:
for file_diff in result.diffs:
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here for diffs.

@aronpammer
Copy link
Author

You are right, I fixed them.

@gpocentek
Copy link
Contributor

Looks good, thank you for the quick update!

@gpocentek gpocentek merged commit e87835f into python-gitlab:master Jul 10, 2017
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