Skip to content

Commit

Permalink
Revert "rename constant to match error described in value"
Browse files Browse the repository at this point in the history
This reverts commit b5bf9d8.
  • Loading branch information
despairblue committed Feb 5, 2024
1 parent b5bf9d8 commit 23c11cc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const ERRORS = {
TYPE_NOT_FOUND: `Failed to find \`type\` in PR title. Expected one of ${displayTypes}`,
INVALID_TYPE: `Unknown \`type\` in PR title. Expected one of ${displayTypes}`,
INVALID_SCOPE: `Unknown \`scope\` in PR title. Expected one of ${displayScopes} or \`<displayName> Node\``,
UPPERCASE_INITIAL_IN_SUBJECT: "First char of subject must be uppercase",
LOWERCASE_INITIAL_IN_SUBJECT: "First char of subject must be uppercase",
FINAL_PERIOD_IN_SUBJECT: "Subject must not end with a period",
NO_PRESENT_TENSE_IN_SUBJECT: "Subject must use present tense",
SKIP_CHANGELOG_NOT_IN_FINAL_POSITION: `\`${NO_CHANGELOG}\` must be located at the end of the subject`,
Expand Down
2 changes: 1 addition & 1 deletion src/validatePrTitle.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ async function validatePrTitle(title) {
const { subject } = match.groups;

if (startsWithLowerCase(subject)) {
issues.push(ERRORS.UPPERCASE_INITIAL_IN_SUBJECT);
issues.push(ERRORS.LOWERCASE_INITIAL_IN_SUBJECT);
}

if (endsWithPeriod(subject)) {
Expand Down
2 changes: 1 addition & 1 deletion src/validatePrTitle.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ describe("subject", () => {
const issues = await validate("feat(core): implement feature");
expect(issues)
.toHaveLength(1)
.toContain(ERRORS.UPPERCASE_INITIAL_IN_SUBJECT);
.toContain(ERRORS.LOWERCASE_INITIAL_IN_SUBJECT);
});

test("Validation should fail for final period in subject", async () => {
Expand Down

0 comments on commit 23c11cc

Please sign in to comment.