lab132 / buildbot-gitea

Buildbot plugin for integration with gitea.
MIT License
62 stars 21 forks source link

Gitea build step fails as "git config remote.pr_source.url" command has a return code of 1 #14

Closed sj-foster closed 3 years ago

sj-foster commented 3 years ago

This may be something I'm doing wrong but if a build from a builder that has a gitea step in it is triggered by a pull_request, the gitea step fails as git config remote.pr_source.url exits with 'program finished with exit code 1'.

This doesn't happen if the workdir is empty or the mode is 'full' and the method is 'clobber'

I'm using buildbot 2.8.4, python 3.6.8, git 1.8.3.1

pampersrocker commented 3 years ago

Is there some more output before program finished with exit code 1 ? Sounds like an invalid command or values are generated for git.

sj-foster commented 3 years ago

That's the only output I get from that command other than the standard buildbot environment output, I can paste that here if that's helpful? I've tried running git config remote.pr_source.url manually in the workdir and I don't get any output at all but it exits 1.

The output of the previous command (git checkout -B new_branch) is "Reset branch 'new_branch'"

pampersrocker commented 3 years ago

I do not really have a PR testing setup running at the moment, but I've fixed an issue where a missing pr_source remote could cause this issue. There is code here to add that remote just after that config lookup. I've set up the step to not fail if the config cannot be read. This may be fixed with v1.2.4, which I've just uploaded.