Skip to content

Commit

Permalink
Switch to @octokit/openapi-types.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Dec 6, 2020
1 parent 46b7808 commit 9743522
Show file tree
Hide file tree
Showing 7 changed files with 859 additions and 1,024 deletions.
12 changes: 6 additions & 6 deletions __tests__/helpers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('isDoNotMergeLabel', () => {
})
})

const reviews = [
const reviews: Review[] = [
{
state: 'APPROVED',
author_association: 'NONE',
Expand Down Expand Up @@ -73,7 +73,7 @@ const reviews = [
submitted_at: '2020-09-05T18:15:02Z',
commit_id: 'deadbeefcafebabedeadbeefffffffffffffffff',
},
]
] as any

const reviewAuthorAssociations = ['MEMBER', 'OWNER']

Expand All @@ -99,7 +99,7 @@ describe('commitHasMinimumApprovals', () => {
})

it('returns true if the last n relevent reviews are approved', () => {
const reviewsIncluding1Approval = [
const reviewsIncluding1Approval: Review[] = [
...reviews,
{
state: 'APPROVED',
Expand All @@ -109,7 +109,7 @@ describe('commitHasMinimumApprovals', () => {
submitted_at: '2020-09-05T19:15:02Z',
commit_id: 'deadbeefcafebabedeadbeefcafebabedeadbeef',
},
]
] as any

expect(commitHasMinimumApprovals(reviewsIncluding1Approval, reviewAuthorAssociations, commit, 0)).toBe(
true
Expand All @@ -126,7 +126,7 @@ describe('commitHasMinimumApprovals', () => {
})

it('returns true if the last n relevent reviews are approved', () => {
const reviewsIncluding2Approvals = [
const reviewsIncluding2Approvals: Review[] = [
...reviews,
{
state: 'APPROVED',
Expand All @@ -144,7 +144,7 @@ describe('commitHasMinimumApprovals', () => {
submitted_at: '2020-09-05T22:15:02Z',
commit_id: 'deadbeefcafebabedeadbeefcafebabedeadbeef',
},
]
] as any

expect(commitHasMinimumApprovals(reviewsIncluding2Approvals, reviewAuthorAssociations, commit, 0)).toBe(
true
Expand Down
10 changes: 7 additions & 3 deletions dist/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/index.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 9743522

Please sign in to comment.