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.
- Loading branch information
1 parent
30c7563
commit f67961e
Showing
5 changed files
with
158 additions
and
157 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -224,8 +224,11 @@ | |
} | ||
} | ||
}, | ||
"none": { | ||
"data": {} | ||
"not_defined": { | ||
"status": 404 | ||
}, | ||
"not_allowed": { | ||
"status": 403 | ||
} | ||
} | ||
} |
Oops, something went wrong.