-
Notifications
You must be signed in to change notification settings - Fork 82
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
Add a dispatchable workflow to run yarn fix
#2403
Conversation
This reverts commit 53eee40.
git config user.name github-actions | ||
git config user.email github-actions@github.com |
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.
No easy way to get the Git of the user triggering the workflow?
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.
We can't find anything, the best guess we found is either from getting the most recent commit (might be a different person), or by just getting the name (but then the name is going to be associated with the github-actions email address which seems.. strange).
This seems fine for now
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.
Actually just found something else 😅
We do have access to the GITHUB_ACTOR
env-var, and could recreate a no-reply email like so:
Note: If you created your account on GitHub.com after July 18, 2017, your noreply email address for GitHub is an ID number and your username in the form of ID+USERNAME@users.noreply.github.com. If you created your account on GitHub.com prior to July 18, 2017, your noreply email address from GitHub is USERNAME@users.noreply.github.com. You can get an ID-based noreply email address for GitHub by selecting (or deselecting and reselecting) Keep my email address private in your email settings.
But I'm not sure if there's a reliable way for us to find which email to use, (i.e. the ID+USERNAME
format or just the USERNAME
one), and I can't find an API to get a public email from a user. While it may work by just guessing at the email, (who knows how GitHub actually associates these things to accounts) it feels like we'd be depending on internal implementation details and it's not really important to know who triggered a yarn fix
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.
Let's try it out
🌟 What is the purpose of this PR?
This adds a workflow which is dispatchable and should be able to fix any auto-fixable lints (like prettier).
🔗 Related links
🚫 Blocked by
🚀 Has this modified a publishable library?
This PR:
I'm currently not able to test it as
🐾 Next steps
Test this workflow when this PR has been merged