summaryrefslogtreecommitdiff
path: root/doc/source/drivers/github.rst
diff options
context:
space:
mode:
authorJames E. Blair <jim@acmegating.com>2023-02-21 14:54:10 -0800
committerJames E. Blair <jim@acmegating.com>2023-04-28 11:46:33 -0700
commit1a4ec7e9266989207f879786a1c19b6d18180eb2 (patch)
treea7fa200ab9d55a643c8408df157380f5c64502b3 /doc/source/drivers/github.rst
parentf653eecb97edfcb78ba8951eaa9576141ddc452e (diff)
downloadzuul-1a4ec7e9266989207f879786a1c19b6d18180eb2.tar.gz
Add GitHub pipeline trigger requirements
This mimics a useful feature of the Gerrit driver and allows users to configure pipelines that trigger on events but only if certain conditions of the PR are met. Unlike the Gerrit driver, this embeds the entire require/reject filter within the trigger filter (the trigger filter has-a require or reject filter). This makes the code simpler and is easier for users to configure. If we like this approach, we should migrate the gerrit driver as well, and perhaps the other drivers. The "require-status" attribute already existed, but was undocumented. This documents it, adds backwards-compat handling for it, and deprecates it. Some documentation typos are also corrected. Change-Id: I4b6dd8c970691b1e74ffd5a96c2be4b8075f1a87
Diffstat (limited to 'doc/source/drivers/github.rst')
-rw-r--r--doc/source/drivers/github.rst36
1 files changed, 35 insertions, 1 deletions
diff --git a/doc/source/drivers/github.rst b/doc/source/drivers/github.rst
index 148c6f976..7cacf45ac 100644
--- a/doc/source/drivers/github.rst
+++ b/doc/source/drivers/github.rst
@@ -339,7 +339,7 @@ the following options.
format of ``user:context:status``. For example,
``zuul_github_ci_bot:check_pipeline:success``.
- .. attr: check
+ .. attr:: check
This is only used for ``check_run`` events. It works similar to
the ``status`` attribute and accepts a list of strings each of
@@ -363,6 +363,38 @@ the following options.
always sends full ref name, eg. ``refs/tags/bar`` and this
string is matched against the regular expression.
+ .. attr:: require-status
+
+ .. warning:: This is deprecated and will be removed in a future
+ version. Use :attr:`pipeline.trigger.<github
+ source>.require` instead.
+
+ This may be used for any event. It requires that a certain kind
+ of status be present for the PR (the status could be added by
+ the event in question). It follows the same syntax as
+ :attr:`pipeline.require.<github source>.status`. For each
+ specified criteria there must exist a matching status.
+
+ This is ignored if the :attr:`pipeline.trigger.<github
+ source>.require` attribute is present.
+
+ .. attr:: require
+
+ This may be used for any event. It describes conditions that
+ must be met by the PR in order for the trigger event to match.
+ Those conditions may be satisfied by the event in question. It
+ follows the same syntax as :ref:`github_requirements`.
+
+ .. attr:: reject
+
+ This may be used for any event and is the mirror of
+ :attr:`pipeline.trigger.<github source>.require`. It describes
+ conditions that when met by the PR cause the trigger event not
+ to match. Those conditions may be satisfied by the event in
+ question. It follows the same syntax as
+ :ref:`github_requirements`.
+
+
Reporter Configuration
----------------------
Zuul reports back to GitHub via GitHub API. Available reports include a PR
@@ -462,6 +494,8 @@ itself. Status name, description, and context is taken from the pipeline.
.. _Github App: https://developer.github.com/apps/
+.. _github_requirements:
+
Requirements Configuration
--------------------------