summaryrefslogtreecommitdiff
path: root/tests/fixtures/zuul-pagure-driver-whitelist.conf
diff options
context:
space:
mode:
authorFabien Boucher <fboucher@redhat.com>2019-11-26 18:09:23 +0100
committerFabien Boucher <fboucher@redhat.com>2020-02-17 10:03:32 +0100
commit0a614b1a9fae71c50bac9826c03ee1dbf09aa29a (patch)
tree914be18701c6c39b13ef806df98fa1a18d80a482 /tests/fixtures/zuul-pagure-driver-whitelist.conf
parent2106a726919b4915e3f7ed55a423fe228d67a761 (diff)
downloadzuul-0a614b1a9fae71c50bac9826c03ee1dbf09aa29a.tar.gz
Pagure: remove connectors burden and simplify code
This patch removes the use of the connector system. Indeed I've figured out that user API token can be set with the needed rights: pull_request_merge, pull_request_flag, pull_request_comment. In fact, the default Pagure configuration (to be set by Pagure operators) does not allow those right. Then it is just a matter of configuration. Recently pagure.io and src.fedoraproject.org operators have allowed those rights for user API token. Thus, I think, the connectors system (to get project scoped API token) was a complex workaround to fix a configuration issue. I don't see any reason for a Pagure operator to not allow those rights in the user API token. Then, with this change, it is assumed that this driver will be used with a Pagure instance that allow those ACL rights. In addition, this patch add an optional mechanism to allow webhook payload according to the source of the events. This relies on a white list of IP addresses from which an event will be accepted. This option should only be used for testing or debugging purpose. This change has several benefit: - Less API call to Pagure - Simplify driver code base Change-Id: Ic38a6774dc4cb9798840a2c874e2d6e9ce16a067
Diffstat (limited to 'tests/fixtures/zuul-pagure-driver-whitelist.conf')
-rw-r--r--tests/fixtures/zuul-pagure-driver-whitelist.conf19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/fixtures/zuul-pagure-driver-whitelist.conf b/tests/fixtures/zuul-pagure-driver-whitelist.conf
new file mode 100644
index 000000000..1b5d55b31
--- /dev/null
+++ b/tests/fixtures/zuul-pagure-driver-whitelist.conf
@@ -0,0 +1,19 @@
+[gearman]
+server=127.0.0.1
+
+[web]
+status_url=http://zuul.example.com/status/#{change.number},{change.patchset}
+
+[merger]
+git_dir=/tmp/zuul-test/git
+git_user_email=zuul@example.com
+git_user_name=zuul
+
+[executor]
+git_dir=/tmp/zuul-test/executor-git
+
+[connection pagure]
+driver=pagure
+server=pagure
+api_token=0000000000000000000000000000000000000000
+source_whitelist=::ffff:127.0.0.1