Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Make require relative to GitHub workspace#116

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

robyoung
Copy link
Contributor

Change to theGITHUB_WORKSPACE directory before running the script so that callers do not have to explicitly use theGITHUB_WORKSPACE environment variable when requiring script files.

Workflow run steps are run within the GITHUB_WORKSPACE so this seems like the expected default.

@robyoungrobyoung requested a review froma teamFebruary 22, 2021 11:08
@robyoungrobyoungforce-pushed themake-require-relative-to-github-workspace branch from78916ad to076d4a8CompareMarch 2, 2021 07:16
@joshmgross
Copy link
Contributor

@robyoung could this break existing uses of this action that assume the requireisn't relative?

@robyoung
Copy link
ContributorAuthor

Not that I can think of if they assume the require isn't relative. If an absolute path is provided it still works as expected because in those cases the current working directory is irrelevant.

Uses that depend on whatever the current working directory is now would break (assuming that is different toGITHUB_WORKSPACE) but I think that's ok as it's explicitly unsupported in the README.

@robyoung
Copy link
ContributorAuthor

@joshmgross is there anything else you need before this can be merged?

@joshmgross
Copy link
Contributor

👋 Hey@robyoung, sorry for the delay. I'll try to test this out next week and get it merged.

Change to the GITHUB_WORKSPACE directory before running the script sothat callers do not have to exlicitly use the GITHUB_WORKSPACEenvironment variable when requiring script files.Workflow run steps are run within the GITHUB_WORKSPACE so this seemslike the expected default.
This is a non breaking change as the documented approach still works asexpected.
@robyoungrobyoungforce-pushed themake-require-relative-to-github-workspace branch from076d4a8 to3d4b500CompareApril 8, 2021 13:18
@robyoung
Copy link
ContributorAuthor

Just rebased to resolve a conflict with the updated version. Any idea when this may get reviewed@joshmgross

@joshmgrossjoshmgross self-assigned thisApr 20, 2021
@joshmgross
Copy link
Contributor

👋 Hey@robyoung, apologies again for the delay. The changes look good to me but I need to run through a few test scenarios to make sure we're not breaking any existing uses.

@jclem
Copy link
Contributor

jclem commentedApr 21, 2021
edited
Loading

Unfortunately, relative requires not working isn't because of the working directory (actions run by default in theGITHUB_WORKSPACE, as it is). Instead, it's becauserequire resolves paths relative to the module—in this case, the module location is where theactions/github-script action was downloaded to on the runner.

This is why although tests pass in this fork, calls torequire relative to the workspace still will not function. We're still searching for a way to resolve this.

I'm going to close this issue, but@robyoung please feel free to follow up if you have any other questions!

@jclemjclem closed thisApr 21, 2021
@joshmgross
Copy link
Contributor

joshmgross commentedApr 21, 2021
edited
Loading

#135 should fix this

Edit: Published in V4https://github.com/actions/github-script/releases/tag/v4.0.0

robyoung reacted with hooray emoji

@robyoungrobyoung deleted the make-require-relative-to-github-workspace branchApril 28, 2021 14:26
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees

@joshmgrossjoshmgross

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@robyoung@joshmgross@jclem

[8]ページ先頭

©2009-2025 Movatter.jp