Open philipkozeny opened 8 months ago
I have further investigated the issue and I can see that in the web hook gitea sends something strange.
For the commits
, head_commit
, etc. the info is correct, the pusher
data has the wrong mail though. So this might be an Gitea issue.
Example of the payload:
{
"ref": "refs/heads/main",
"before": "a930081ca449a21d4416bdeb345bc4d3181b916e",
"after": "3d6d4085e41d1a044a67c15ddb99a7ea4746ded7",
"compare_url": "xxxx/compare/a930081ca449a21d4416bdeb345bc4d3181b916e...3d6d4085e41d1a044a67c15ddb99a7ea4746ded7",
"commits": [
{
"id": "3d6d4085e41d1a044a67c15ddb99a7ea4746ded7",
"message": "Update .woodpecker.yml\n",
"url": "xxxx/commit/3d6d4085e41d1a044a67c15ddb99a7ea4746ded7",
"author": {
"name": "Philip Kozeny",
"email": "philip.kozeny@mydomain.com",
"username": "philip.kozeny"
},
"committer": {
"name": "Philip Kozeny",
"email": "philip.kozeny@mydomain.com",
"username": "philip.kozeny"
},
"verification": null,
"timestamp": "2023-12-19T10:32:26Z",
"added": [],
"removed": [],
"modified": [
".woodpecker.yml"
]
}
],
"total_commits": 1,
"head_commit": {
"id": "3d6d4085e41d1a044a67c15ddb99a7ea4746ded7",
"message": "Update .woodpecker.yml\n",
"url": "xxx/commit/3d6d4085e41d1a044a67c15ddb99a7ea4746ded7",
"author": {
"name": "Philip Kozeny",
"email": "philip.kozeny@mydomain.com",
"username": "philip.kozeny"
},
"committer": {
"name": "Philip Kozeny",
"email": "philip.kozeny@mydomain.com",
"username": "philip.kozeny"
},
"verification": null,
"timestamp": "2023-12-19T10:32:26Z",
"added": [],
"removed": [],
"modified": [
".woodpecker.yml"
]
},
...
"pusher": {
"id": 1,
"login": "philip.kozeny",
"login_name": "",
"full_name": "Philip Kozeny",
"email": "philip.kozeny@anotherdomain.com",
...
},
"sender": {
"id": 1,
"login": "philip.kozeny",
"login_name": "",
"full_name": "Philip Kozeny",
"email": "philip.kozeny@anotherdomain.com",
...
"username": "philip.kozeny"
}
}
IIRC:
More context: https://github.com/go-gitea/gitea/issues/28532
IIRC:
- commiter email: the email in your git commit
- pusher email: the user email of the Gitea user
More context: go-gitea/gitea#28532
For Woodpecker wouldn't it make more sense to set environment variables like CI_COMMITAUTHOR... to the author of the commit, not the user who did the push?
Component
server, agent
Describe the bug
I am running Gitea with Woodpecker CI. I have noticed that for some time now, the built in
CI_COMMIT_AUTHOR_EMAIL
environment variable is wrong. I have setup a sample project, with nothing more than a simple pipeline.Here is the git log from the CLI:
Here is the woodpecker.yml
Here is the output after running the pipeline:
System Info
Additional context
No response
Validations
next
version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]