-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Using env.runner_temp instead of home directory to write json file #59
Using env.runner_temp instead of home directory to write json file #59
Conversation
Ahh, it breaks a 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.
I think you have to also update mocks of ENV in tests
github-issue-parser/test.spec.js
Lines 14 to 17 in 2ac1a18
// mock ENV | |
const env = { | |
HOME: "<home path>", | |
}; |
correct |
9223fb4
to
3be98d8
Compare
@gr2m do you know if it's still running my old commit? It seems so. I removed but still seeing in the action failure:
When I run it locally:
So I think this PR is good to go, but unsure why it's running the old test code in the action. |
hmm yeah I don't see the error locally either. Pushing a new commit or sending the same PR from a branch doesn't seem to trigger the CI right now: #73. Not sure what's going on, but I'm tempted to just merge it in since CI is passing locally |
🎉 This PR is included in version 3.2.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
we missed one |
Ahh, weird! Good find though @gr2m. Interesting that my local copy of the branch had 0 instances of Is it possible that because the branch was so old, it didn't have that particular line for me to change in my branch? And the Actions workflow is running the tests based on the code that is in Either way, thank you for fixing the last remaining test and merging this in 🎉 |
yeah it might be that it was a test that was added after you started your pull request, so the CI build triggered on the merge commit failed |
It seems that it also confused the semantic-release bot - #71 (comment) |
@@ -12,7 +12,7 @@ Use this action to convert issues into a unified JSON structure. Read the [Codel | |||
with: | |||
template-path: .github/ISSUE_TEMPLATE/bug-report.yml # optional but recommended | |||
|
|||
- run: cat ${HOME}/issue-parser-result.json | |||
- run: cat ${{ runner.temp }}/issue-parser-result.json |
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.
I think this should be considered a breaking change (v4
) since it changes the behavior of the action.
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.
I could definitely see that. Maybe there should have been an output variable instead of a hardcoded path. And the implications of changing that path might have affected some people. Apologies!
I was wondering what the issue parser json file was doing in my home directory with a self-hosted runner:
Changing this to use
${env.RUNNER_TEMP}
as a more GitHub-native way to store temporary files.For Linux, it stores it under
<runner-dir>/_work/_temp
, and it's deleted after the job completes. The file is no longer needed since the output var is being set.