-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Pusher Email Address hidden in action context #27133
Comments
Is there any other way to get the users email address in a job or to notify him of the result? |
Maybe it should be an internal feature of Gitea to balance privacy and usage. |
Moving the delivery notification of the action result to Gitea itself would be the best solution. |
Hi there, |
@lunny How should we proceed on this? |
Warning workaround, it's not known if this will be disabled by a security fix I don't like that Gitea Actions needs security workarounds for the email, but here we are. You can still get your email, asking rest to give you the mail (at least if it is visible for other users). Tested with latest 1.20.5 and nightly agent on:
push:
jobs:
comment:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
id: get-mail
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
return (await github.rest.users.getByUsername({
username: ${{ tojson(github.event.sender.login) }}
})).data.email;
result-encoding: string
- name: Print Email
run: |
echo ${{ steps.get-mail.outputs.result }} edit: encode result as string instead of json I'm very creative in writing workarounds in the Actions Ecosystem I'm not shure why this should be needed to get the mail, but what does I know |
I can confirm this workaround does return the actual email. |
Description
Since Version 1.20.3 or 1.20.4, the email address of the pusher is no longer available in the context of a running action.
Instead it is replaced by the hidden [email protected] placeholder.
We were using the pushers email address in order to notify him about the results of tests running in actions.
This is now broken as i can't find another way to get the email address of the user in the context of a action.
The Issue might be related to this: #26350
Gitea Version
1.20.4
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
2.40.1
Operating System
Rootless Gitea image
How are you running Gitea?
Rootless Gitea image in Kubernetes (repackaged to include custom root-ca certs)
Database
PostgreSQL
The text was updated successfully, but these errors were encountered: