This repository has been archived by the owner on Jul 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #232 from pr-triage/revert-230-revert-223-feat.194…
….partial-approval Revert "Revert "feat: support multiple PR reviews""
- Loading branch information
Showing
6 changed files
with
511 additions
and
144 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
const debug = require("debug")("probot:pr-triage"); | ||
const Raven = require("raven"); | ||
const Sentry = require("@sentry/node"); | ||
const PRTriage = require("./lib/pr-triage"); | ||
|
||
Raven.config( | ||
process.env.NODE_ENV === "production" && | ||
"https://[email protected]/1222067" | ||
).install(); | ||
if (process.env.NODE_ENV === "production") { | ||
Sentry.init({ | ||
dsn: "https://[email protected]/1222067" | ||
}); | ||
} | ||
|
||
function probotPlugin(robot) { | ||
const events = [ | ||
|
@@ -26,16 +27,14 @@ async function triage(context) { | |
const prTriage = forRepository(context); | ||
const pullRequest = getPullRequest(context); | ||
|
||
Raven.context(() => { | ||
Raven.setContext({ | ||
extra: { | ||
owner: context.repo()["owner"], | ||
repo: context.repo()["repo"], | ||
number: pullRequest.number | ||
} | ||
try { | ||
Sentry.configureScope(scope => { | ||
scope.setExtra("pull_request_url", pullRequest.url); | ||
}); | ||
prTriage.triage(pullRequest); | ||
}); | ||
} catch (e) { | ||
Sentry.captureMessage(e); | ||
} | ||
} | ||
|
||
function forRepository(context) { | ||
|
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
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
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
Oops, something went wrong.