Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeysova committed Jun 24, 2021
1 parent 2c01c60 commit 18213ae
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ async function main() {
await Promise.all(resolvedTeams.map((team) => linearStateMapAssert(team)));

console.log('——', context);
const { action, eventName } = context.payload;
const { title, url: prUrl, review_comments_url: prReviewUrl } = context.payload.pull_request;
const { action, eventName, serverUrl } = context.payload;
const { title, draft, html_url: prHtmlUrl } = context.payload.pull_request;

const foundIssuesIds = findIssuesInText(title);
if (issuesRequired && foundIssuesIds.length === 0) {
Expand All @@ -48,9 +48,11 @@ async function main() {
await Promise.all(
foundIssuesIds.map(async (id) => {
const issue = await linearIssueFind(id);

const prLink = `https://${serverUrl}/${prHtmlUrl}`;
await linearIssueCommentSend(
issue,
`PR for this link [here](${prUrl}). You can review it on [this link](${prReviewUrl})`,
`Pull request [${title}](${prLink}). You can [review it](${prLink}/files)`,
);
}),
);
Expand Down

0 comments on commit 18213ae

Please sign in to comment.