-
Notifications
You must be signed in to change notification settings - Fork 543
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
Email notifications with gitlab #399
Open
alexwaibel
wants to merge
7
commits into
eduardoboucas:master
Choose a base branch
from
hispanic:email-notifs-with-gitlab
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Email notifications with gitlab #399
alexwaibel
wants to merge
7
commits into
eduardoboucas:master
from
hispanic:email-notifs-with-gitlab
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
* Convert error handler to more modern class declaration. * Make GitHub and GitService actually throw errors rather than return them * Fix some broken unit and acceptance tests
…itHub). - Modify handlePR.js to instantiate a generic GitService instead of GitHub. - Modify GitHub.js so that a blank (Staticman) version number can resolve to GitHub token authorization (as the version number is not available when instantiating GitHub from handlePR). - Modify server.js to provide v3 service-specific "webhook" endpoints. Retain usage of the express-github-webhook module for GitHub. - Update tests and add test cases for GitLab. - Add new webhook controller.
…error handling, and webhook request authentication. - Add support in the Staticman JSON configuration for GitLab and GitHub webhook request authentication via "gitlabWebhookSecret" and "githubWebhookSecret" properties. - In the handlePR controller, pass real values for the "branch" to the GitFactory. - In the handlePR controller, pass a value for "username" to the GitFactory that identifies the repo owner, not the submitter of the merge/pull request. - In the handlePR controller, when appropriate, return helpful error messages instead of simply null. - In the handlePR controller, fix the "staticman_" source branch test. - In the handlePR controller, clean up the analytics events invocations, as the logic is doing more than just deleting the source branch. - Improve server.js to silence UnhandledPromiseRejectionWarning messages. - Update and add unit tests.
- Remove commented-out code. - Add explicit error handler to allows for overriding the system/express error handler.
I migrated to GitLab and the only thing that wasn't working properly is the webhook, which this PR seems to address. Any progress in this? |
I implemented this in my fork - hispanic#1 Feel free to adapt it into a fork of your own. |
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.
Reopening #388 since GH won't let me reopen there. Code comments from last review there need to be addressed still.