label_exists: A label exists#
A label exists on a pull request.
Holds when the pull request has the label of the input label, such as
needs review; its case does not matter.
It is checked on pull requests only. While the data of a pull request is not complete, the condition cannot be assessed yet.
Inputs#
Name |
Type |
Required |
What it is |
|---|---|---|---|
|
|
yes |
The name of a label of the repository. |
The type string-label is the name of a label of the repository: the
configuration is refused with
ConditionLabelUnknown for a name
the repository does not have; its case does not matter.
The inputs as JSON:
{"label": "needs review"}
Data#
The update of the repository reads in the background:
labelsThe labels of the repository and of the pull request. Permissions of the GitHub App:
metadata: read,issues: read; webhooks:label,issues,pull_request.
API reference#
- class pycal_dashboard.conditions.condition.label_exists.LabelExists#
Bases:
ConditionA label exists on a pull request.
Holds when the pull request has the label of the input
label, such asneeds review; its case does not matter.- classmethod assess(issue, values)#
Whether the pull request has the label.
- Parameters:
issue – The pull request.
values –
label.
- Returns:
True if it has the label.