You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,9 @@ This repository and project is based on the work performed for [MITODL](https://
17
17
18
18
-`repo`: _required_ The Github repository with the issue tracker in which to read and/or write issues.
19
19
20
-
-`skip_check`: _optional_ A boolean that signifies whether to skip the `check` step or not. This is primarily useful for situations where it is known that a specified issue does not exist, and instead must be created during `out`.
20
+
-`skip_check`: _optional_ A boolean that signifies whether to skip the `check` step or not. This is primarily useful for situations where it is known that a specified issue does not exist, and instead must be created during `out`. The default value is `false`.
21
+
22
+
-`trigger`: _optional_ The issue state that causes a trigger during the `check` step. This can be either `open` or `closed`. The default value is `closed`.
21
23
22
24
-`number`: _optional/required_ The issue number to read during the `check` step for triggering Concourse pipelines based on the issue state, or for updating during the `out` step. If this is omitted then instead a list operation with filters (i.e. "search") occurs to determine the issue during the `check` step, and a create operation during the `out` step. Therefore this is implicitly required if an issue update is desired as a new issue creation attempt will occur during `out` otherwise.
23
25
@@ -29,7 +31,7 @@ The following parameters are for filtering from a list of issues to one issue (i
29
31
30
32
-`assignee`: _optional_ The user name of the assignee for the searched issue.
31
33
32
-
-`labels`: _optional_(value currently ignored) The list of labels for the searched issue.
34
+
-`labels`: _optional_ The list of labels for the searched issue.
33
35
34
36
### `version`: designates the Github issue state
35
37
@@ -43,14 +45,14 @@ version:
43
45
44
46
### `check`: returns size two list for closed Github issues and size one list for open Github issues
45
47
46
-
The `check` step determines the state of the specified Github issue. If the state is `closed` then the returned list of versions is size two. If the state is `open` then the returned list of versions is size one. This is specifically to trigger pipelines based on the issue state (`closed` triggers and `open` does not trigger) because it simulates a delta of versions for `closed` and not `open`. The actual returns are the following (note the states' serialization is implemented by Octocrab to be lowercase strings):
48
+
The `check` step determines the state of the specified Github issue. If the state is `closed` (default behavior; otherwise `trigger` source parameter value) then the returned list of versions is size two. If the state is `open` (default behavior; otherwise NOT `trigger` source parameter value) then the returned list of versions is size one. This is specifically to trigger pipelines based on the issue state (`closed` triggers and `open` does not trigger by default; otherwise customized by `trigger` source parameter value) because it simulates a delta of versions for `closed` and not `open` (default). The actual returns are the following (note the states' serialization is implemented by Octocrab to be lowercase strings):
47
49
48
-
closed:
50
+
trigger:
49
51
```json
50
52
[{"state":"open"},{"state":"closed"}]
51
53
```
52
54
53
-
open:
55
+
no trigger:
54
56
```json
55
57
[{"state":"open"}]
56
58
```
@@ -59,21 +61,21 @@ open:
59
61
60
62
This ignores any inputs and quickly dummies outputs, and therefore is primarily useful for executing an efficient `check` step with minimal overhead.
61
63
62
-
### `out`: creates a Github issue
64
+
### `out`: creates or updates a Github issue
63
65
64
66
The `out` step updates or creates a Github issue according to the input parameters below. The number of the created Github issue is written to a file at `/opt/resource/issue_number.txt` so that it can be re-used later in the build (especially for a subsequent `check` step to trigger Concourse steps based on the status of the Github issue created during this step).
65
67
66
-
Recall that the parameter which determines whether a create or update operation occurs during this step is `source.number`.
68
+
Recall that the parameter which determines whether a create or update operation occurs during this step is `source.number` (update when a specific existing issue number is specified; otherwise create).
67
69
68
70
The metadata output from this step contains the number, url, title, state, labels, assignees, milestone, created time, and last updated time for the issue.
69
71
70
72
- `title`: _optional/required_ The title of the written Github issue (required for new issue).
71
73
72
74
- `body`: _optional_ The body of the written Github issue.
73
75
74
-
- `labels`: _optional_ (value currently ignored for update) The list of labels for the written Github issue.
76
+
- `labels`: _optional_ The list of labels for the written Github issue.
75
77
76
-
- `assignees`: _optional_ (value currently ignored for update) The list of assignees for the written Github issue.
78
+
- `assignees`: _optional_ The list of assignees for the written Github issue.
77
79
78
80
- `milestone`: _optional_ The milestone numeric ID to associate with the written Github issue.
79
81
@@ -97,7 +99,7 @@ Below is the general structure of the generated Concourse metadata. Note that th
0 commit comments