Loading src/tasks/remind.ts +9 −9 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ import { } from '@openstapps/gitlab-api/lib/types'; import {WebClient} from '@slack/client'; import {logger} from '../common'; import {GROUPS, NOTE_PREFIX} from '../configuration'; import {GROUPS, NOTE_PREFIX, SLACK_CHANNEL} from '../configuration'; export async function remind(api: Api): Promise<void> { // get list of open merge requests Loading Loading @@ -58,18 +58,18 @@ export async function remind(api: Api): Promise<void> { }); if (hasUnresolvedDiscussions) { // send message to slack await client.chat.postMessage({ channel: 'C762UG76Z', text: `Merge request '${mergeRequest.title}' has unresolved discussions! See ${mergeRequest.web_url}!`, }); let recipient = mergeRequest.author.username; if (typeof mergeRequest.assignee !== 'undefined') { recipient = mergeRequest.assignee.username; } // create note in merge request await api.createNote( mergeRequest.project_id, Scope.MERGE_REQUESTS, mergeRequest.iid, `${NOTE_PREFIX} Please resolve pending discussions, @${mergeRequest.author.username}!`, `${NOTE_PREFIX} Please resolve pending discussions, @${recipient}!`, ); return; Loading @@ -95,7 +95,7 @@ export async function remind(api: Api): Promise<void> { // send message to slack await client.chat.postMessage({ channel: 'C762UG76Z', channel: SLACK_CHANNEL, text: `Merge request '${mergeRequest.title}' needs more approvals! See ${mergeRequest.web_url}!`, }); Loading @@ -111,7 +111,7 @@ export async function remind(api: Api): Promise<void> { // send message to slack await client.chat.postMessage({ channel: 'C762UG76Z', channel: SLACK_CHANNEL, text: `Merge request '${mergeRequest.title}' is ready to be merged! See ${mergeRequest.web_url}!`, }); Loading Loading
src/tasks/remind.ts +9 −9 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ import { } from '@openstapps/gitlab-api/lib/types'; import {WebClient} from '@slack/client'; import {logger} from '../common'; import {GROUPS, NOTE_PREFIX} from '../configuration'; import {GROUPS, NOTE_PREFIX, SLACK_CHANNEL} from '../configuration'; export async function remind(api: Api): Promise<void> { // get list of open merge requests Loading Loading @@ -58,18 +58,18 @@ export async function remind(api: Api): Promise<void> { }); if (hasUnresolvedDiscussions) { // send message to slack await client.chat.postMessage({ channel: 'C762UG76Z', text: `Merge request '${mergeRequest.title}' has unresolved discussions! See ${mergeRequest.web_url}!`, }); let recipient = mergeRequest.author.username; if (typeof mergeRequest.assignee !== 'undefined') { recipient = mergeRequest.assignee.username; } // create note in merge request await api.createNote( mergeRequest.project_id, Scope.MERGE_REQUESTS, mergeRequest.iid, `${NOTE_PREFIX} Please resolve pending discussions, @${mergeRequest.author.username}!`, `${NOTE_PREFIX} Please resolve pending discussions, @${recipient}!`, ); return; Loading @@ -95,7 +95,7 @@ export async function remind(api: Api): Promise<void> { // send message to slack await client.chat.postMessage({ channel: 'C762UG76Z', channel: SLACK_CHANNEL, text: `Merge request '${mergeRequest.title}' needs more approvals! See ${mergeRequest.web_url}!`, }); Loading @@ -111,7 +111,7 @@ export async function remind(api: Api): Promise<void> { // send message to slack await client.chat.postMessage({ channel: 'C762UG76Z', channel: SLACK_CHANNEL, text: `Merge request '${mergeRequest.title}' is ready to be merged! See ${mergeRequest.web_url}!`, }); Loading