Skip to content

Commit

Permalink
Merge pull request #48 from mongodb/DOP-4003
Browse files Browse the repository at this point in the history
[DOP-4003]: Refactor GitHub commenter to custom action
  • Loading branch information
branberry authored Nov 29, 2023
2 parents 1ded23f + 1ef8ba3 commit 406c964
Show file tree
Hide file tree
Showing 16 changed files with 10,573 additions and 3,265 deletions.
4 changes: 2 additions & 2 deletions .github/linters/.eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ rules:
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-namespace': 'error',
'@typescript-eslint/no-non-null-assertion': 'warn',
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-unnecessary-qualifier': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-unused-vars': 'error',
Expand All @@ -76,7 +76,7 @@ rules:
'@typescript-eslint/promise-function-async': 'error',
'@typescript-eslint/require-array-sort-compare': 'error',
'@typescript-eslint/restrict-plus-operands': 'error',
'@typescript-eslint/semi': ['error', 'never'],
'@typescript-eslint/semi': ['off'],
'@typescript-eslint/space-before-function-paren': 'off',
'@typescript-eslint/type-annotation-spacing': 'error',
'@typescript-eslint/unbound-method': 'error'
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,3 @@ jobs:
- name: Test
id: npm-ci-test
run: npm run ci-test

test-action:
name: GitHub Actions Test
runs-on: ubuntu-latest

steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4

- name: Test Local Action
id: test-action
uses: ./comment-pr
44 changes: 0 additions & 44 deletions .github/workflows/linter.yml

This file was deleted.

14 changes: 14 additions & 0 deletions __tests__/comment-pr.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { run } from '../src/comment-pr/run';

// Mock the action's entrypoint
jest.mock('../src/comment-pr/run', () => ({
run: jest.fn()
}));

describe('index', () => {
it('calls run when imported', async () => {
require('../src/comment-pr');

expect(run).toHaveBeenCalled();
});
});
83 changes: 0 additions & 83 deletions __tests__/index.test.ts

This file was deleted.

25 changes: 0 additions & 25 deletions __tests__/wait.test.ts

This file was deleted.

2 changes: 1 addition & 1 deletion badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 406c964

Please sign in to comment.