Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spelling #1073

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions __tests__/main.spec.ts
Expand Up @@ -30,7 +30,7 @@ test('processing an issue with no label will make it stale and close it, if it i
expect(processor.closedIssues).toHaveLength(1);
});

test('processing an issue with no label and a start date as ECMAScript epoch in seconds being before the issue creation date will not make it stale nor close it when it is old enough and days-before-close is set to 0', async () => {
test('processing an issue with no label and a start date as ECMAScript epoch in seconds being before the issue creation date will neither make it stale nor close it when it is old enough and days-before-close is set to 0', async () => {
expect.assertions(2);
const january2000 = 946681200000;
const opts: IIssuesProcessorOptions = {
Expand Down Expand Up @@ -62,7 +62,7 @@ test('processing an issue with no label and a start date as ECMAScript epoch in
expect(processor.closedIssues.length).toStrictEqual(0);
});

test('processing an issue with no label and a start date as ECMAScript epoch in seconds being after the issue creation date will not make it stale nor close it when it is old enough and days-before-close is set to 0', async () => {
test('processing an issue with no label and a start date as ECMAScript epoch in seconds being after the issue creation date will neither make it stale nor close it when it is old enough and days-before-close is set to 0', async () => {
expect.assertions(2);
const january2021 = 1609455600000;
const opts: IIssuesProcessorOptions = {
Expand Down Expand Up @@ -94,7 +94,7 @@ test('processing an issue with no label and a start date as ECMAScript epoch in
expect(processor.closedIssues.length).toStrictEqual(0);
});

test('processing an issue with no label and a start date as ECMAScript epoch in milliseconds being before the issue creation date will not make it stale nor close it when it is old enough and days-before-close is set to 0', async () => {
test('processing an issue with no label and a start date as ECMAScript epoch in milliseconds being before the issue creation date will neither make it stale nor close it when it is old enough and days-before-close is set to 0', async () => {
expect.assertions(2);
const january2000 = 946681200000000;
const opts: IIssuesProcessorOptions = {
Expand Down Expand Up @@ -126,7 +126,7 @@ test('processing an issue with no label and a start date as ECMAScript epoch in
expect(processor.closedIssues.length).toStrictEqual(0);
});

test('processing an issue with no label and a start date as ECMAScript epoch in milliseconds being after the issue creation date will not make it stale nor close it when it is old enough and days-before-close is set to 0', async () => {
test('processing an issue with no label and a start date as ECMAScript epoch in milliseconds being after the issue creation date will neither make it stale nor close it when it is old enough and days-before-close is set to 0', async () => {
expect.assertions(2);
const january2021 = 1609455600000;
const opts: IIssuesProcessorOptions = {
Expand Down Expand Up @@ -190,7 +190,7 @@ test('processing an issue with no label and a start date as ISO 8601 being befor
expect(processor.closedIssues.length).toStrictEqual(1);
});

test('processing an issue with no label and a start date as ISO 8601 being after the issue creation date will not make it stale nor close it when it is old enough and days-before-close is set to 0', async () => {
test('processing an issue with no label and a start date as ISO 8601 being after the issue creation date will neither make it stale nor close it when it is old enough and days-before-close is set to 0', async () => {
expect.assertions(2);
const january2021 = '2021-01-01T00:00:00Z';
const opts: IIssuesProcessorOptions = {
Expand Down Expand Up @@ -254,7 +254,7 @@ test('processing an issue with no label and a start date as RFC 2822 being befor
expect(processor.closedIssues.length).toStrictEqual(1);
});

test('processing an issue with no label and a start date as RFC 2822 being after the issue creation date will not make it stale nor close it when it is old enough and days-before-close is set to 0', async () => {
test('processing an issue with no label and a start date as RFC 2822 being after the issue creation date will neither make it stale nor close it when it is old enough and days-before-close is set to 0', async () => {
expect.assertions(2);
const january2021 = 'January 1, 2021 00:00:00';
const opts: IIssuesProcessorOptions = {
Expand Down Expand Up @@ -1442,7 +1442,7 @@ test('stale issues should not be closed until after the closed number of days',
expect(processor.staleIssues).toHaveLength(1);
});

test('stale issues should be closed if the closed nubmer of days (additive) is also passed', async () => {
test('stale issues should be closed if the closed number of days (additive) is also passed', async () => {
const opts = {...DefaultProcessorOptions};
opts.daysBeforeStale = 5; // stale after 5 days
opts.daysBeforeClose = 1; // closes after 6 days
Expand Down
14 changes: 7 additions & 7 deletions dist/index.js
Expand Up @@ -592,8 +592,8 @@ class IssuesProcessor {
return; // Don't process exempt assignees
}
// Ignore draft PR
// Note that this check is so far below because it cost one read operation
// So it's simply better to do all the stale checks which don't cost more operation before this one
// Note that this check is so far below because it costs one read operation
// So it's simply better to do all the stale checks which don't cost an operation before this one
const exemptDraftPullRequest = new exempt_draft_pull_request_1.ExemptDraftPullRequest(this.options, issue);
if (yield exemptDraftPullRequest.shouldExemptDraftPullRequest(() => __awaiter(this, void 0, void 0, function* () {
return this.getPullRequest(issue);
Expand Down Expand Up @@ -1114,7 +1114,7 @@ class IssuesProcessor {
var _a;
return __awaiter(this, void 0, void 0, function* () {
const issueLogger = new issue_logger_1.IssueLogger(issue);
issueLogger.info(`The $$type is not closed nor locked. Trying to remove the close label...`);
issueLogger.info(`The $$type is neither closed nor locked. Trying to remove the close label...`);
if (!closeLabel) {
issueLogger.info(logger_service_1.LoggerService.white('├──'), `The ${issueLogger.createOptionLink(IssuesProcessor._getCloseLabelUsedOptionName(issue))} option was not set`);
issueLogger.info(logger_service_1.LoggerService.white('└──'), `Skipping the removal of the close label`);
Expand Down Expand Up @@ -2489,15 +2489,15 @@ function _run() {
const issueProcessor = new issues_processor_1.IssuesProcessor(args, state);
const rateLimitAtStart = yield issueProcessor.getRateLimit();
if (rateLimitAtStart) {
core.debug(`Github API rate status: limit=${rateLimitAtStart.limit}, used=${rateLimitAtStart.used}, remaining=${rateLimitAtStart.remaining}`);
core.debug(`GitHub API rate status: limit=${rateLimitAtStart.limit}, used=${rateLimitAtStart.used}, remaining=${rateLimitAtStart.remaining}`);
}
yield issueProcessor.processIssues();
const rateLimitAtEnd = yield issueProcessor.getRateLimit();
if (rateLimitAtEnd) {
core.debug(`Github API rate status: limit=${rateLimitAtEnd.limit}, used=${rateLimitAtEnd.used}, remaining=${rateLimitAtEnd.remaining}`);
core.debug(`GitHub API rate status: limit=${rateLimitAtEnd.limit}, used=${rateLimitAtEnd.used}, remaining=${rateLimitAtEnd.remaining}`);
if (rateLimitAtStart)
core.info(`Github API rate used: ${rateLimitAtStart.remaining - rateLimitAtEnd.remaining}`);
core.info(`Github API rate remaining: ${rateLimitAtEnd.remaining}; reset at: ${rateLimitAtEnd.reset}`);
core.info(`GitHub API rate used: ${rateLimitAtStart.remaining - rateLimitAtEnd.remaining}`);
core.info(`GitHub API rate remaining: ${rateLimitAtEnd.remaining}; reset at: ${rateLimitAtEnd.reset}`);
}
yield state.persist();
yield processOutput(issueProcessor.staleIssues, issueProcessor.closedIssues);
Expand Down
2 changes: 1 addition & 1 deletion docs/contributors.md
@@ -1,6 +1,6 @@
# Contributors

### Checkin
### Check-in

- Do check in source (src)
- Do not check in build output (lib)
Expand Down
6 changes: 3 additions & 3 deletions src/classes/issues-processor.ts
Expand Up @@ -428,8 +428,8 @@ export class IssuesProcessor {
}

// Ignore draft PR
// Note that this check is so far below because it cost one read operation
// So it's simply better to do all the stale checks which don't cost more operation before this one
// Note that this check is so far below because it costs one read operation
// So it's simply better to do all the stale checks which don't cost an operation before this one
const exemptDraftPullRequest: ExemptDraftPullRequest =
new ExemptDraftPullRequest(this.options, issue);

Expand Down Expand Up @@ -1195,7 +1195,7 @@ export class IssuesProcessor {
const issueLogger: IssueLogger = new IssueLogger(issue);

issueLogger.info(
`The $$type is not closed nor locked. Trying to remove the close label...`
`The $$type is neither closed nor locked. Trying to remove the close label...`
);

if (!closeLabel) {
Expand Down
4 changes: 2 additions & 2 deletions src/functions/is-labeled.spec.ts
Expand Up @@ -131,7 +131,7 @@ describe('isLabeled()', (): void => {
});
});

describe('when the given issue contains a label wih diacritical marks', (): void => {
describe('when the given issue contains a label with diacritical marks', (): void => {
beforeEach((): void => {
issue = {
labels: [
Expand Down Expand Up @@ -170,7 +170,7 @@ describe('isLabeled()', (): void => {
});
});

describe('when the given issue contains a label wih diacritical marks', (): void => {
describe('when the given issue contains a label with diacritical marks', (): void => {
beforeEach((): void => {
label = 'déjà vu';
});
Expand Down
8 changes: 4 additions & 4 deletions src/main.ts
Expand Up @@ -17,7 +17,7 @@ async function _run(): Promise<void> {
const rateLimitAtStart = await issueProcessor.getRateLimit();
if (rateLimitAtStart) {
core.debug(
`Github API rate status: limit=${rateLimitAtStart.limit}, used=${rateLimitAtStart.used}, remaining=${rateLimitAtStart.remaining}`
`GitHub API rate status: limit=${rateLimitAtStart.limit}, used=${rateLimitAtStart.used}, remaining=${rateLimitAtStart.remaining}`
);
}

Expand All @@ -27,18 +27,18 @@ async function _run(): Promise<void> {

if (rateLimitAtEnd) {
core.debug(
`Github API rate status: limit=${rateLimitAtEnd.limit}, used=${rateLimitAtEnd.used}, remaining=${rateLimitAtEnd.remaining}`
`GitHub API rate status: limit=${rateLimitAtEnd.limit}, used=${rateLimitAtEnd.used}, remaining=${rateLimitAtEnd.remaining}`
);

if (rateLimitAtStart)
core.info(
`Github API rate used: ${
`GitHub API rate used: ${
rateLimitAtStart.remaining - rateLimitAtEnd.remaining
}`
);

core.info(
`Github API rate remaining: ${rateLimitAtEnd.remaining}; reset at: ${rateLimitAtEnd.reset}`
`GitHub API rate remaining: ${rateLimitAtEnd.remaining}; reset at: ${rateLimitAtEnd.reset}`
);
}

Expand Down