-
Notifications
You must be signed in to change notification settings - Fork 612
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
Added GitHub signature checking feature + tests #77
Conversation
Hmmm it's weird. In my machine all the tests pass without any problem |
Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests |
@@ -46,6 +46,7 @@ | |||
|
|||
<properties> | |||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
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.
It didn't pass the integration tests without this change
75395a8
to
e36d52c
Compare
Using the default `refspec` prohibits the project from automatically building non-PR branches like `origin/master`. Prepending the `refspec` with the heads and remote/origin allows the project to build pull requests as well as other branches like `origin/my-feature`. This should resolve jenkinsci#77. Big thanks to janinko#77 (comment) 😄
Please merge in latest master. |
…to github_signature Conflicts: src/main/java/org/jenkinsci/plugins/ghprb/GhprbRootAction.java src/main/java/org/jenkinsci/plugins/ghprb/GhprbTrigger.java src/test/java/org/jenkinsci/plugins/ghprb/GhprbPullRequestMergeTest.java src/test/java/org/jenkinsci/plugins/ghprb/GhprbRepositoryTest.java src/test/java/org/jenkinsci/plugins/ghprb/GhprbRootActionTest.java src/test/java/org/jenkinsci/plugins/ghprb/GhprbTestUtil.java
Merged! |
…to github_signature Conflicts: src/main/java/org/jenkinsci/plugins/ghprb/GhprbRepository.java src/main/java/org/jenkinsci/plugins/ghprb/GhprbTrigger.java src/main/resources/org/jenkinsci/plugins/ghprb/GhprbTrigger/config.jelly src/test/java/org/jenkinsci/plugins/ghprb/GhprbRepositoryTest.java src/test/java/org/jenkinsci/plugins/ghprb/GhprbTestUtil.java
Updated to the latest master. |
I updated master to use multiple GitHub configurations. Please update to master and make sure everything works appropriately. |
You will need additional property in credentials. |
…to github_signature Conflicts: src/main/java/org/jenkinsci/plugins/ghprb/GhprbRootAction.java src/main/java/org/jenkinsci/plugins/ghprb/GhprbTrigger.java src/test/java/org/jenkinsci/plugins/ghprb/GhprbRootActionTest.java src/test/java/org/jenkinsci/plugins/ghprb/GhprbTestUtil.java
Merged and tests passed |
Using the default `refspec` prohibits the project from automatically building non-PR branches like `origin/master`. Prepending the `refspec` with the heads and remote/origin allows the project to build pull requests as well as other branches like `origin/my-feature`. This should resolve jenkinsci#77. Big thanks to janinko#77 (comment) 😄
Upon receiving a signed POST, i.e. containing a X-Hub-Signature header, that header was just ignored. Now it checks if the signature is correct, and in case it is, then it processes the POST normally.