Skip to content

Commit 4e9e9fe

Browse files
committed
Add documentation for the new predicates
1 parent 72741e5 commit 4e9e9fe

File tree

1 file changed

+43
-1
lines changed

1 file changed

+43
-1
lines changed

README.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,14 +324,15 @@ if:
324324
deletions: "> 100"
325325
total: "> 200"
326326

327-
# DEPRECATED: Use "has_status" below instead, which is more flexible.
327+
# DEPRECATED: Use "has_status_check" below instead, which is more flexible.
328328
# "has_successful_status" is satisfied if the status checks that are specified
329329
# are marked successful on the head commit of the pull request.
330330
has_successful_status:
331331
- "status-name-1"
332332
- "status-name-2"
333333
- "status-name-3"
334334

335+
# DEPRECATED: Use "has_status_check" below instead, which is more flexible.
335336
# "has_status" is satisfied if the status checks that are specified are
336337
# finished and concluded with one of the conclusions specified.
337338
# "conclusions" is optional and defaults to ["success"].
@@ -342,6 +343,29 @@ if:
342343
- "status-name-2"
343344
- "status-name-3"
344345

346+
# "has_status_check" is satisfied if the status checks that are specified are
347+
# in one of the statuses specified. If statuses includes "completed" and the status check
348+
# is in that state it must also concluded with one of the conclusions specified additionally to statify has_status_check.
349+
# > "checks" are required and are evaluated as regular expressions.
350+
# > "statuses" is optional and defaults to ["completed", "success"].
351+
# Possible values are: ["completed", "expected", "failure", "in_progress", "pending", "queued", "requested", "startup_failure", "waiting", "error", "success"].
352+
# If the value "any" is included in "statuses", the statuses will be expanded to all possible values listed above.
353+
# While ["completed", "expected", "failure", "in_progress", "pending", "queued", "requested", "startup_failure", "waiting]
354+
# represent possible statuses for a 'check',
355+
# the statuses ["error", "failing", "pending", "success"] represent possible statuses for 'commit statuses'
356+
# see https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks#types-of-status-checks-on-github
357+
# > "conclusions" is optional and defaults to ["success"].
358+
# Possible values are ["action_required", "cancelled", "failure", "neutral", "skipped", "stale", "success", "timed_out"].
359+
# If the value "any" is included in "conclusions", the statuses will be expanded to all possible values listed above.
360+
# Conclustions are only evaluated if the status is in the "completed" state so this must be included in the "statuses" list.
361+
# Also it has no effect on 'commit statuses' since they do not have conclusions.
362+
has_status_check:
363+
statuses: ["any"]
364+
conclusions: ["any"]
365+
checks:
366+
- status-name-[0-9]
367+
368+
# DEPRECATED: Use "has_workflow" below instead, which is more flexible.
345369
# "has_workflow_result" is satisfied if the GitHub Actions workflow runs that
346370
# are specified all finished and concluded with one of the conclusions
347371
# specified. "conclusions" is optional and defaults to ["success"].
@@ -355,6 +379,24 @@ if:
355379
- ".github/workflows/a.yml"
356380
- ".github/workflows/b.yml"
357381

382+
# "has_workflow" is satisfied if the workflows that are specified are
383+
# in one of the statuses specified. If statuses includes "completed" and the workflow
384+
# is in that state it must also concluded with one of the conclusions specified additionally to statify has_workflow.
385+
# "workflows" are required and are evaluated as regular expressions.
386+
# "statuses" is optional and defaults to ["completed"].
387+
# Possible values are: ["completed", "expected", "failure", "in_progress", "pending", "queued", "requested", "startup_failure", "waiting"].
388+
# If the value "any" is included in "statuses", the statuses will be expanded to all possible values listed above.
389+
# "conclusions" is optional and defaults to ["success"].
390+
# Possible values are ["action_required", "cancelled", "failure", "neutral", "skipped", "stale", "success", "timed_out"].
391+
# If the value "any" is included in "conclusions", the statuses will be expanded to all possible values listed above.
392+
# Conclustions are only evaluated if the status is in the "completed" state so this must be included in the "statuses" list.
393+
has_workflow:
394+
statuses: ["any"]
395+
conclusions: ["any"]
396+
workflows:
397+
- '\.github/workflows/test-dependencies\.yml'
398+
- 'check.*\.yml'
399+
358400
# "has_labels" is satisfied if the pull request has the specified labels
359401
# applied
360402
has_labels:

0 commit comments

Comments
 (0)