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

Conversation

branberry
Copy link
Collaborator

@branberry branberry commented Nov 22, 2023

Ticket

DOP-4003

Notes

GitHub Actions require that the built files be included as a part of the commit, that is why this PR looks absolutely massive. In reality, it's not too big.

I updated some linting rules with this PR as well. I also temporarily removed some of the workflows as they aren't super relevant at this time, and would take a bit of work to get it working correctly. The successful output of the custom action can be found here.

export async function run(): Promise<void> {
const githubToken = process.env.GITHUB_TOKEN;

if (!githubToken) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

main functionality here

Copy link
Contributor

Choose a reason for hiding this comment

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

functionality LGTM.

not familiar with this github.context but see that this is included in @actions/github lib (🙌 typescript)

Copy link
Contributor

@seungpark seungpark left a comment

Choose a reason for hiding this comment

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

minor comment on exporting nonexistant file. besides that LGTM!

TIL about custom github actions

@@ -18,7 +18,8 @@
"setup"
],
"exports": {
".": "./dist/index.js"
".": "./dist/index.js",
Copy link
Contributor

Choose a reason for hiding this comment

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

this file is DNE. do we want to remove this line?

export async function run(): Promise<void> {
const githubToken = process.env.GITHUB_TOKEN;

if (!githubToken) {
Copy link
Contributor

Choose a reason for hiding this comment

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

functionality LGTM.

not familiar with this github.context but see that this is included in @actions/github lib (🙌 typescript)

@@ -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.

@branberry branberry merged commit 406c964 into main Nov 29, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants