lab132 / buildbot-gitea

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

Feat: add support for secret provider for webhook #20

Closed PeterSurda closed 3 years ago

PeterSurda commented 3 years ago

Webhook secret can how use buildbot's secret management interface.

e.g.

c['www']['change_hook_dialects'] = {
    'gitea': {
        'secret': util.Secret('my_gitea_webhook_secret'),
        'class': GiteaHandler,
        'onlyIncludePushCommit': True,
    }
|

Used GitHub buildbot plugin as a reference.

PeterSurda commented 3 years ago

any feedback?

pampersrocker commented 3 years ago

Sorry, I'm quite busy at the moment. You can verify it by running the trial Unit tests against it and if you feel comfortable create a unit test with an active secret as well.

PeterSurda commented 3 years ago

Don't know how to run the tests. travis-ci gets stuck in a loop and times out: https://travis-ci.org/github/PeterSurda/buildbot-gitea . The code works on my system.

pampersrocker commented 3 years ago

Thank you for the contribution! I've added unit tests for a secret provider. This will be part of the next minor release, but I want another feature done first before making another release.

I know the travis-ci gets stuck in some dependency setup but was not able to figure out how to solve it.