-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
export async function run(): Promise<void> { | ||
const githubToken = process.env.GITHUB_TOKEN; | ||
|
||
if (!githubToken) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
main functionality here
There was a problem hiding this comment.
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)
There was a problem hiding this 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", |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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 | |||
|
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
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.