Skip to content

Commit

Permalink
fix(GH-29): Update the term "Dotnet Outdated" to bew ".Net outdated" …
Browse files Browse the repository at this point in the history
…so it's inline with action name
  • Loading branch information
gavanlamb committed Jun 17, 2024
1 parent 972064d commit 5aa77de
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
28 changes: 14 additions & 14 deletions __tests__/services/githubService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ describe("createCheckRun", () => {

test.each([
["name", "name"],
["Dotnet Outdated", null]
[".Net Outdated", null]
])("should create a check run with a name of %s when the check-run-name is %s", async (expectedName: string, name: string | null) => {
const detailedBody = "detailed";
const summaryBody = "summary";
Expand Down Expand Up @@ -130,7 +130,7 @@ describe("createCheckRun", () => {
const detailedBody = "detailed";
const summaryBody = "summary";
const conclusion = CheckConclusion.Success;
const name = "Dotnet Outdated";
const name = ".Net Outdated";
const owner = "owner";
const repo = "repo";
const sha = "sha";
Expand Down Expand Up @@ -174,7 +174,7 @@ describe("createCheckRun", () => {
const detailedBody = "detailed";
const summaryBody = "summary";
const conclusion = CheckConclusion.Success;
const name = "Dotnet Outdated";
const name = ".Net Outdated";
const owner = "owner";
const repo = "repo";
const sha = "sha";
Expand Down Expand Up @@ -314,7 +314,7 @@ describe("addComment", () => {
const commentKey = null;
const headRef = "feature/branch";
const issueNumber = 1;
const messageId = `<!-- dotnet-outdated-comment:${headRef} -->`;
const messageId = `<!-- .net-outdated-comment:${headRef} -->`;
const owner = "owner";
const repo = "repo";

Expand All @@ -339,7 +339,7 @@ describe("addComment", () => {
id: commentId,
node_id: "1242342",
url: "",
body:`${messageId}\n\n#Dotnet Outdated`,
body:`${messageId}\n\n# .Net Outdated`,
body_text: undefined,
body_html: undefined,
html_url: "",
Expand All @@ -355,7 +355,7 @@ describe("addComment", () => {
id: 5,
node_id: "1242342",
url: "",
body:`<!-- dotnet-outdated-comment:5467546785 -->\n\n#Dotnet Outdated`,
body:`<!-- .net-outdated-comment:5467546785 -->\n\n# .Net Outdated`,
body_text: undefined,
body_html: undefined,
html_url: "",
Expand Down Expand Up @@ -396,7 +396,7 @@ describe("addComment", () => {
const commentId = 2;
const commentKey = "key";
const issueNumber = 1;
const messageId = `<!-- dotnet-outdated-comment:${commentKey} -->`;
const messageId = `<!-- .net-outdated-comment:${commentKey} -->`;
const owner = "owner";
const repo = "repo";

Expand All @@ -421,7 +421,7 @@ describe("addComment", () => {
id: commentId,
node_id: "1242342",
url: "",
body:`${messageId}\n\n#Dotnet Outdated`,
body:`${messageId}\n\n# .Net Outdated`,
body_text: undefined,
body_html: undefined,
html_url: "",
Expand All @@ -437,7 +437,7 @@ describe("addComment", () => {
id: 5,
node_id: "1242342",
url: "",
body:`<!-- dotnet-outdated-comment:5467546785 -->\n\n#Dotnet Outdated`,
body:`<!-- .net-outdated-comment:5467546785 -->\n\n# .Net Outdated`,
body_text: undefined,
body_html: undefined,
html_url: "",
Expand Down Expand Up @@ -478,7 +478,7 @@ describe("addComment", () => {
const commentId = 2;
const commentKey = "key";
const issueNumber = 1;
const messageId = `<!-- dotnet-outdated-comment:${commentKey} -->`;
const messageId = `<!-- .net-outdated-comment:${commentKey} -->`;
const owner = "owner";
const repo = "repo";

Expand All @@ -503,7 +503,7 @@ describe("addComment", () => {
id: commentId,
node_id: "1242342",
url: "",
body:`${messageId}\n\n#Dotnet Outdated`,
body:`${messageId}\n\n# .Net Outdated`,
body_text: undefined,
body_html: undefined,
html_url: "",
Expand All @@ -519,7 +519,7 @@ describe("addComment", () => {
id: 5,
node_id: "1242342",
url: "",
body:`<!-- dotnet-outdated-comment:5467546785 -->\n\n#Dotnet Outdated`,
body:`<!-- .net-outdated-comment:5467546785 -->\n\n# .Net Outdated`,
body_text: undefined,
body_html: undefined,
html_url: "",
Expand Down Expand Up @@ -559,7 +559,7 @@ describe("addComment", () => {
const body = "Comment";
const commentKey = "key";
const issueNumber = 1;
const messageId = `<!-- dotnet-outdated-comment:${commentKey} -->`;
const messageId = `<!-- .net-outdated-comment:${commentKey} -->`;
const owner = "owner";
const repo = "repo";

Expand Down Expand Up @@ -605,7 +605,7 @@ describe("addComment", () => {
const body = null;
const commentKey = "key";
const issueNumber = 1;
const messageId = `<!-- dotnet-outdated-comment:${commentKey} -->`;
const messageId = `<!-- .net-outdated-comment:${commentKey} -->`;
const owner = "owner";
const repo = "repo";

Expand Down
4 changes: 2 additions & 2 deletions __tests__/services/outdatedService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ describe("run", () => {
listOutdatedPackagesMock.mockReturnValue(Promise.resolve(configuration));
jest.doMock("../../src/services/dotnetService", () => ({ listOutdatedPackages: listOutdatedPackagesMock }));

const detailedBody = "# Dotnet Outdated";
const detailedBody = "# .Net Outdated";
const getDetailedBodyMock = jest.fn();
getDetailedBodyMock.mockReturnValue(detailedBody);
const summaryBody = "# Dotnet Outdated";
const summaryBody = "# .Net Outdated";
const getSummaryBodyMock = jest.fn();
getSummaryBodyMock.mockReturnValue(summaryBody);
jest.doMock("../../src/services/summaryService", () => ({ getDetailedBody: getDetailedBodyMock, getSummaryBody: getSummaryBodyMock }));
Expand Down
4 changes: 2 additions & 2 deletions src/services/githubService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async function createCheckRun(
const repo = context.repo.repo;
debug(`repo: ${repo}`);

const name = getStringInput('check-run-name') ?? 'Dotnet Outdated';
const name = getStringInput('check-run-name') ?? '.Net Outdated';
debug(`name: ${name}`);

const headSha = context.payload.pull_request?.head.sha ?? context.sha;
Expand Down Expand Up @@ -148,7 +148,7 @@ async function addComment(
const suffix = getStringInput('pr-comment-name') ?? pullRequest.head.ref;
debug(`suffix: ${suffix}`);

const messageId = `<!-- dotnet-outdated-comment:${suffix} -->`;
const messageId = `<!-- .net-outdated-comment:${suffix} -->`;
debug(`messageId: ${messageId}`);

const commentId = await getCommentId(
Expand Down

0 comments on commit 5aa77de

Please sign in to comment.