Skip to content

Commit 635aee6

Browse files
authored
fix(manage-merge-queue): broken github profile link in comment (#695)
1 parent 2ec4f0a commit 635aee6

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

dist/284.index.js

Lines changed: 2 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/284.index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/helpers/manage-merge-queue.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import { approvalsSatisfied } from './approvals-satisfied';
3333
import { createPrComment } from './create-pr-comment';
3434
import { isUserInTeam } from './is-user-in-team';
3535
import { getEmailOnUserProfile } from './get-email-on-user-profile';
36-
import { join } from 'path';
3736

3837
export class ManageMergeQueue extends HelperInputs {
3938
max_queue_size?: string;
@@ -68,9 +67,9 @@ export const manageMergeQueue = async ({
6867
if (slack_webhook_url && login) {
6968
const email = await getEmailOnUserProfile({ login, pattern });
7069
if (!email) {
71-
const patternText = pattern ? ` and must match the regex pattern \`${pattern}\`` : '';
70+
const patternText = pattern ? `, and it must match the regex pattern \`${pattern}\`` : '';
7271
await createPrComment({
73-
body: `@${login} Your PR cannot be added to the queue because your email must be set on your [GitHub profile](${join(context.serverUrl, context.actor)})${patternText}. Follow the instructions [here](${githubEmailDocsLink}) to add or fix your email!`
72+
body: `@${login} Your PR cannot be added to the queue because your email must be set on your GitHub profile${patternText}. Follow the instructions [here](${githubEmailDocsLink}) to add or fix your email on ${context.serverUrl}!`
7473
});
7574
return removePrFromQueue(pullRequest);
7675
}

test/helpers/manage-merge-queue.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ jest.mock('../../src/helpers/is-user-in-team');
3333
jest.mock('../../src/helpers/approvals-satisfied');
3434
jest.mock('../../src/helpers/create-pr-comment');
3535
jest.mock('../../src/utils/../../src/helpers/prepare-queued-pr-for-merge');
36-
jest.mock('path');
3736
jest.mock('@actions/core');
3837
jest.mock('@actions/github', () => ({
3938
context: { repo: { repo: 'repo', owner: 'owner' }, issue: { number: 123 }, serverUrl: 'sampleUrl' },

0 commit comments

Comments
 (0)