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

[DOP-4003]: Refactor GitHub commenter to custom action #48

Merged
merged 23 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
12f5667
[DOP-4003]: Modify build
branberry Nov 21, 2023
6b803b4
[DOP-4003]: Run action
branberry Nov 21, 2023
9990008
[DOP-4003]: Move stuff around for testing
branberry Nov 21, 2023
4e9a904
[DOP-4003]: Move stuff around for testing
branberry Nov 21, 2023
4b8cd48
[DOP-4003]: Update dependencies
branberry Nov 21, 2023
a41665b
[DOP-4003]: Import context directly
branberry Nov 21, 2023
54a890a
[DOP-4003]: Update bundle
branberry Nov 21, 2023
8cf4b8f
[DOP-4003]: Update bundle
branberry Nov 21, 2023
dda1211
[DOP-4003]: Use correct token name
branberry Nov 21, 2023
fdccbbe
[DOP-4003]: Add bundle
branberry Nov 22, 2023
1ce4ffa
[DOP-4003]: Add logging for context and outputs
branberry Nov 22, 2023
884f646
[DOP-4003]: Add logging for context and outputs
branberry Nov 22, 2023
43ede22
[DOP-4003]: Add logging for context and outputs
branberry Nov 22, 2023
e1c5369
[DOP-4003]: Use correct environment variable for head_ref
branberry Nov 22, 2023
c296524
[DOP-4003]: Add path for the github trigger build endpoint
branberry Nov 22, 2023
f33ebfd
[DOP-4003]: Include instructions with GitHub bot message
branberry Nov 22, 2023
302ec23
[DOP-4003]: Small grammar change
branberry Nov 22, 2023
8081279
[DOP-4003]: Format the message a bit more nicely
branberry Nov 22, 2023
8d3d990
[DOP-4003]: Update linting and add simple test
branberry Nov 22, 2023
599657c
[DOP-4003]: Add run.ts
branberry Nov 22, 2023
99153b5
[DOP-4003]: Remove local test for now
branberry Nov 22, 2023
4abb9e5
[DOP-4003]: Disable linting rule
branberry Nov 22, 2023
1ef8ba3
[DOP-4003]: Remove pointless and annoying super linter
branberry Nov 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assuming this is re-inserted after this PR is merged (post creating an action as per docs)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seungpark I actually removed it because the CI will always fail here because this action depends on another step. I guess I could refactor it so that it would be easier to use the output from a previous step, but it reads a file and I am not sure of a way to do that using inputs/outputs.

I will make another story to get integration testing working again. For the time being, I am disabling this step.

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