Skip to content

Commit

Permalink
fix(manage-merge-queue): broken github profile link in comment (#695)
Browse files Browse the repository at this point in the history
  • Loading branch information
danadajian authored Jan 16, 2025
1 parent 2ec4f0a commit 635aee6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
7 changes: 2 additions & 5 deletions dist/284.index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/284.index.js.map

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions src/helpers/manage-merge-queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import { approvalsSatisfied } from './approvals-satisfied';
import { createPrComment } from './create-pr-comment';
import { isUserInTeam } from './is-user-in-team';
import { getEmailOnUserProfile } from './get-email-on-user-profile';
import { join } from 'path';

export class ManageMergeQueue extends HelperInputs {
max_queue_size?: string;
Expand Down Expand Up @@ -68,9 +67,9 @@ export const manageMergeQueue = async ({
if (slack_webhook_url && login) {
const email = await getEmailOnUserProfile({ login, pattern });
if (!email) {
const patternText = pattern ? ` and must match the regex pattern \`${pattern}\`` : '';
const patternText = pattern ? `, and it must match the regex pattern \`${pattern}\`` : '';
await createPrComment({
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!`
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}!`
});
return removePrFromQueue(pullRequest);
}
Expand Down
1 change: 0 additions & 1 deletion test/helpers/manage-merge-queue.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jest.mock('../../src/helpers/is-user-in-team');
jest.mock('../../src/helpers/approvals-satisfied');
jest.mock('../../src/helpers/create-pr-comment');
jest.mock('../../src/utils/../../src/helpers/prepare-queued-pr-for-merge');
jest.mock('path');
jest.mock('@actions/core');
jest.mock('@actions/github', () => ({
context: { repo: { repo: 'repo', owner: 'owner' }, issue: { number: 123 }, serverUrl: 'sampleUrl' },
Expand Down

0 comments on commit 635aee6

Please sign in to comment.