Skip to content

Commit 860f265

Browse files
committed
preparing v1.2.1 release
1 parent e62eabc commit 860f265

3 files changed

Lines changed: 14 additions & 12 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
### 1.2.1 (Next)
1+
### 1.2.1
22
- Enable Github issue state `check` step trigger customization.
33
- Convert Concourse model struct types to Octocrab models.
44
- Enable `labels` in issue update and list.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "concourse-github-issue"
3-
version = "1.2.0"
3+
version = "1.2.1"
44
edition = "2024"
55
authors = ["Matthew Schuchard"]
66
description = "A Concourse resource for Github Issues"

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ This repository and project is based on the work performed for [MITODL](https://
1717

1818
- `repo`: _required_ The Github repository with the issue tracker in which to read and/or write issues.
1919

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`.
2123

2224
- `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.
2325

@@ -29,7 +31,7 @@ The following parameters are for filtering from a list of issues to one issue (i
2931

3032
- `assignee`: _optional_ The user name of the assignee for the searched issue.
3133

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.
3335

3436
### `version`: designates the Github issue state
3537

@@ -43,14 +45,14 @@ version:
4345
4446
### `check`: returns size two list for closed Github issues and size one list for open Github issues
4547

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):
4749

48-
closed:
50+
trigger:
4951
```json
5052
[{"state":"open"},{"state":"closed"}]
5153
```
5254

53-
open:
55+
no trigger:
5456
```json
5557
[{"state":"open"}]
5658
```
@@ -59,21 +61,21 @@ open:
5961

6062
This ignores any inputs and quickly dummies outputs, and therefore is primarily useful for executing an efficient `check` step with minimal overhead.
6163

62-
### `out`: creates a Github issue
64+
### `out`: creates or updates a Github issue
6365

6466
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).
6567

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).
6769

6870
The metadata output from this step contains the number, url, title, state, labels, assignees, milestone, created time, and last updated time for the issue.
6971

7072
- `title`: _optional/required_ The title of the written Github issue (required for new issue).
7173

7274
- `body`: _optional_ The body of the written Github issue.
7375

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.
7577

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.
7779

7880
- `milestone`: _optional_ The milestone numeric ID to associate with the written Github issue.
7981

@@ -97,7 +99,7 @@ Below is the general structure of the generated Concourse metadata. Note that th
9799
}
98100
```
99101

100-
Octocrab doc links:
102+
Octocrab doc links for model serialization:
101103
[Label](https://docs.rs/octocrab/latest/octocrab/models/struct.Label.html)
102104
[Assignee](https://docs.rs/octocrab/latest/octocrab/models/struct.Author.html)
103105
[Milestone](https://docs.rs/octocrab/latest/octocrab/models/struct.Milestone.html)

0 commit comments

Comments
 (0)