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 repository merge attributes #784

Closed
wants to merge 2 commits into from

Conversation

asagage
Copy link

@asagage asagage commented May 5, 2018

This PR just adds repository attributes for allow_merge_commit, allow_rebase_merge, allow_squash_merge.

@asagage
Copy link
Author

asagage commented May 13, 2018

@sfdye I added a few tests, but I can't figure out how to record the requests. My auth keeps failing when I attempt to record. I do use MFA, and I have tried using a personal access token, but it's still failing.

@sfdye
Copy link
Member

sfdye commented May 17, 2018

@asagage Have you used the --auth_with_token option? Maybe the permission of your personal token is not enough?

@kyogi14
Copy link

kyogi14 commented May 17, 2018

It looks like possibly the last merge for switching out the requests library has broken the recording. I traced it to fixAuthorizationHeader() is being executed prior to the request being sent to the server, thereby stripping the auth tokens.

@sfdye sfdye added the bug label Jun 19, 2018
@sfdye
Copy link
Member

sfdye commented Jun 23, 2018

@kyogi14 @asagage

Sorry for the wait. Now that this bug is potentially fixed in #795 , can you please try again? Thanks!

@sfdye sfdye closed this in #842 Jul 13, 2018
sfdye pushed a commit that referenced this pull request Jul 13, 2018
Closes #784
Closes #785

First commit fixes a small bug that I observed while trying to record some new test fixtures: the stringification of the headers is not correctly printed as a list of tuples, but as an `iteritems` object, so I forced the list evaluation.

Second commit adds the missing properties `allow_merge_commit`, `allow_rebase_merge`, `allow_squash_merge`, and `has_projects` to the `Repository` class.

Note however that I ran into some trouble while modifying the `edit` method of the `Repository` class to make use of the new properties, specifically while writing tests, so I will fix the `edit` method in a future PR.
candrikos pushed a commit to candrikos/PyGithub that referenced this pull request Sep 25, 2020
Closes PyGithub#784
Closes PyGithub#785

First commit fixes a small bug that I observed while trying to record some new test fixtures: the stringification of the headers is not correctly printed as a list of tuples, but as an `iteritems` object, so I forced the list evaluation.

Second commit adds the missing properties `allow_merge_commit`, `allow_rebase_merge`, `allow_squash_merge`, and `has_projects` to the `Repository` class.

Note however that I ran into some trouble while modifying the `edit` method of the `Repository` class to make use of the new properties, specifically while writing tests, so I will fix the `edit` method in a future PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants