-
Notifications
You must be signed in to change notification settings - Fork 736
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
Change withURLPath to setRawURLPath #770
Conversation
I have started to change some methods, would the PR involve changing all of the methods to |
b2c9b2a
to
6a176e6
Compare
@@ -118,7 +118,7 @@ public String getSHA1() { | |||
* if disabling protection fails | |||
*/ | |||
public void disableProtection() throws IOException { | |||
root.createRequest().method("DELETE").withUrlPath(protection_url).send(); | |||
root.createRequest().method("DELETE").setRawUrlPath(protection_url).send(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bitwiseman protection_url is a full url http://localhost:36413/repos/github-api-test-org/temp-testDisableProtectionOnly/branches/master/protection
, so I changed it , is this similar to what you have in mind
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will add the wire mock snapshot soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is the kind of change that I'm looking for.
d9ed3bb
to
f48b33e
Compare
@sladyn98 |
@bitwiseman Definitely I will rebase and re re record |
f48b33e
to
5837cf4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bitwiseman A little help required
public void testGetProtection() throws Exception { | ||
GHBranchProtection protection = branch.enableProtection().enable(); | ||
GHBranchProtection protectionTest = repo.getBranch(BRANCH).getProtection(); | ||
assertTrue(protectionTest instanceof GHBranchProtection); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though the above branch master is already protected it still throws a message that the branch is not protected. It seems a bit strange
"body": "{\"message\":\"Branch not protected\",\"documentation_url\":\"https://developer.github.com/v3/repos/branches/#remove-branch-protection\"}",
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub doesn't think it is protected. The data files definitely show that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any solution ? Because manually changing doesn't seem to work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sladyn98
Not sure. I'll take a look.
...etProtection/__files/repos_github-api-test-org_temp-testgetprotection_branches_master-3.json
Show resolved
Hide resolved
.../mappings/repos_github-api-test-org_temp-testgetprotection_branches_master_protection-4.json
Outdated
Show resolved
Hide resolved
9874d6c
to
ca76975
Compare
@bitwiseman Wonderful the tests now pass :) |
@sladyn98 Class (or even smaller) is fine. Sounds good. |
Co-Authored-By: Liam Newman <[email protected]>
@bitwiseman this PR added some tests, so it's kind of an improvement :) |
Thanks @sladyn98 ! |
@bitwiseman Your welcome looking forward to contributing more :) |
Description
This PR deals with trying to fiinish moving all full URL setting to
setRawUrlPath
and changewithUrlPath
to not require starting/
Related to #700
Before submitting a PR:
We love getting PRs, but we hate asking people for the same basic changes every time.
master
. Create your PR from that branch.mvn clean compile
locally. This may reformat your code, commit those changes.mvn -D enable-ci clean install site
locally. If this command doesn't succeed, your change will not pass CI.