Skip to content

Commit bddce58

Browse files
NdpntMattiSG
andauthored
Improve phrasing
Co-authored-by: Matti Schneider <[email protected]>
1 parent b63d613 commit bddce58

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/reporter/github.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export default class GitHub {
6969
onlyIssues.forEach(issue => {
7070
const cachedIssue = this.issuesCache.get(issue.title);
7171

72-
if (!cachedIssue || new Date(issue.created_at) < new Date(cachedIssue.created_at)) { // Only cache the oldest issue if there are duplicates
72+
if (!cachedIssue || new Date(issue.created_at) < new Date(cachedIssue.created_at)) { // Only work on the oldest issue if there are duplicates, in order to consolidate the longest history possible
7373
this.issuesCache.set(issue.title, issue);
7474
}
7575
});

src/reporter/github.test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ describe('GitHub', function () {
9191
expect(scope.isDone()).to.be.true;
9292
});
9393

94-
it('throws error when creating label fails', async () => {
94+
it('throws an error when creating a label fails', async () => {
9595
nock('https://api.github.com')
9696
.post('/repos/owner/repo/labels')
9797
.reply(400, { message: 'Bad Request' });
@@ -175,7 +175,7 @@ describe('GitHub', function () {
175175
expect(scope.isDone()).to.be.true;
176176
});
177177

178-
it('throws error when adding comment fails', async () => {
178+
it('throws an error when adding a comment fails', async () => {
179179
nock('https://api.github.com')
180180
.post(`/repos/owner/repo/issues/${ISSUE_NUMBER}/comments`)
181181
.reply(400, { message: 'Bad Request' });
@@ -354,11 +354,11 @@ describe('GitHub', function () {
354354
expect(updateIssueScope.isDone()).to.be.true;
355355
});
356356

357-
it('adds comment to the issue', () => {
357+
it('adds a comment to the issue', () => {
358358
expect(addCommentScope.isDone()).to.be.true;
359359
});
360360
});
361-
context('when the reason unchanged', () => {
361+
context('when the reason did not change', () => {
362362
let addCommentScope;
363363
let updateIssueScope;
364364

@@ -379,11 +379,11 @@ describe('GitHub', function () {
379379
github.issuesCache.set(EXISTING_OPEN_ISSUE.title, EXISTING_OPEN_ISSUE);
380380
});
381381

382-
it("does not attempt to updates the issue's labels", () => {
382+
it('does not attempt to updates the issues labels', () => {
383383
expect(updateIssueScope.isDone()).to.be.false;
384384
});
385385

386-
it('does not attempt to add comment to the issue', () => {
386+
it('does not attempt to add any comment to the issue', () => {
387387
expect(addCommentScope.isDone()).to.be.false;
388388
});
389389
});

0 commit comments

Comments
 (0)