mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-10-31 22:38:58 +00:00
Fix Drone pushing commits with wrong author info (#21450)
I don't know how to test this so I'll explain my thought process: After a discussion with @techknowlogick incda2c38f4a
I saw the CI config has this block:cda2c38f4a/.drone.yml (L618-L630)
I don't know much about Drone but after looking at [appleboy/drone-git-push](https://github.com/appleboy/drone-git-push)'s source code, I think each setting becomes an environment variable (e.g. `remote` to `PLUGIN_REMOTE`, `commit_message` to `PLUGIN_COMMIT_MESSAGE` etc...). Take a look at the code block loading the author info:a69878c006/main.go (L32-L42)
Two environment variables are listed for each setting. This PR forces both to have the same value. Signed-off-by: Yarden Shoham <hrsi88@gmail.com>
This commit is contained in:
parent
6bb6a108e0
commit
94d6d93cc2
1 changed files with 6 additions and 2 deletions
|
@ -626,6 +626,8 @@ steps:
|
|||
commit_message: "[skip ci] Updated translations via Crowdin"
|
||||
remote: "git@github.com:go-gitea/gitea.git"
|
||||
environment:
|
||||
DRONE_COMMIT_AUTHOR_EMAIL: "teabot@gitea.io"
|
||||
DRONE_COMMIT_AUTHOR: GiteaBot
|
||||
GIT_PUSH_SSH_KEY:
|
||||
from_secret: git_push_ssh_key
|
||||
|
||||
|
@ -670,12 +672,14 @@ steps:
|
|||
pull: always
|
||||
settings:
|
||||
author_email: "teabot@gitea.io"
|
||||
author_name: GiteaBot
|
||||
author_name: "GiteaBot"
|
||||
branch: main
|
||||
commit: true
|
||||
commit_message: "[skip ci] Updated licenses and gitignores "
|
||||
commit_message: "[skip ci] Updated licenses and gitignores"
|
||||
remote: "git@github.com:go-gitea/gitea.git"
|
||||
environment:
|
||||
DRONE_COMMIT_AUTHOR_EMAIL: "teabot@gitea.io"
|
||||
DRONE_COMMIT_AUTHOR: "GiteaBot"
|
||||
GIT_PUSH_SSH_KEY:
|
||||
from_secret: git_push_ssh_key
|
||||
|
||||
|
|
Loading…
Reference in a new issue