Skip to content

Commit

Permalink
Add routing logic to sentry repo (#373)
Browse files Browse the repository at this point in the history
* add routing logic to sentry repo

* instead of capture exception, use capture message when team label lookup fails

* add comment for rerouting to label description

* remove warning
  • Loading branch information
hubertdeng123 authored Dec 28, 2022
1 parent bab3ea9 commit 58fac94
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/brain/issueLabelHandler/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ import {
import { getOssUserType } from '@utils/getOssUserType';
import { isFromABot } from '@utils/isFromABot';

const REPOS_TO_TRACK_FOR_ROUTING = new Set([
// 'sentry',
'sentry-docs',
]);
const REPOS_TO_TRACK_FOR_ROUTING = new Set(['sentry', 'sentry-docs']);

import { ClientType } from '@/api/github/clientType';
import { UNROUTED_LABEL, UNTRIAGED_LABEL } from '@/config';
Expand Down Expand Up @@ -118,7 +115,10 @@ async function routeIssue(octokit, teamLabelName, teamDescription) {
});
return `Routing to @${SENTRY_ORG}/${strippedTeamName} for [triage](https://develop.sentry.dev/processing-tickets/#3-triage)`;
} catch (error) {
Sentry.captureException(error);
// Use capture message here, because many teams rely on the label description for routing and it's not an exception we care about yet.
Sentry.captureMessage(
'Routing to team label name failed, retrying with label description'
);
// If the label name doesn't work, try description
try {
const descriptionSlugName = teamDescription || '';
Expand Down

0 comments on commit 58fac94

Please sign in to comment.