-
Notifications
You must be signed in to change notification settings - Fork 2
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
webhook-service
has to work with private repositories
#50
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jachro
force-pushed
the
validation-for-private-repo
branch
2 times, most recently
from
March 1, 2019 14:01
b3f168b
to
063a545
Compare
jachro
force-pushed
the
validation-for-private-repo
branch
from
March 1, 2019 15:52
063a545
to
42af67a
Compare
@jachro is this ready to be tested? |
@rokroskar not yet. I found a bug yesterday and some noise in the logs. I addressed most of that yesterday but need to re-test today. |
This reverts commit 3431462.
lorenzo-cavazzi
approved these changes
Mar 7, 2019
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.
Working for both public
and private
repos.
Can also be tried it in the UI with these:
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR makes the
webhook-service
's endpoints to work with private repositories. The changes to the endpoints are:POST /projects/:id/webhooks/validation
validates project's hook. The behaviour of the endpoint is the following:POST /projects/:id/webhooks
validates project's hook prior to a new hook is created using the same rules as in the grid above. Then hook is created only for cases marked with NOT_FOUND and the hook creation endpoint responds with CREATED (201). For cases marked in the grid with OK, the hook creation endpoint responds with OK, too.POST /webhooks/events
- the endpoint works as before except for private repos events when the endpoint tries to use a stored Access Token. In fact, an attempt to fetch an Access Token is performed regardless of project visibility and if there's no token found, there's an assumption that the event is for aPublic
project.closes #42