Skip to content

Commit 2dbfd05

Browse files
Improve docs for iteration support
1 parent 2674dd8 commit 2dbfd05

File tree

1 file changed

+53
-16
lines changed

1 file changed

+53
-16
lines changed

README.md

Lines changed: 53 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
clubhouse:
2424
runs-on: ubuntu-latest
2525
steps:
26-
- uses: singingwolfboy/create-linked-clubhouse-story@v1.6
26+
- uses: singingwolfboy/create-linked-clubhouse-story@v1.7
2727
with:
2828
github-token: ${{ secrets.GITHUB_TOKEN }}
2929
clubhouse-token: ${{ secrets.CLUBHOUSE_TOKEN }}
@@ -59,7 +59,7 @@ You can customize the comment posted on pull requests using the `comment-templat
5959
variable, like this:
6060

6161
```yaml
62-
- uses: singingwolfboy/create-linked-clubhouse-story@v1.6
62+
- uses: singingwolfboy/create-linked-clubhouse-story@v1.7
6363
with:
6464
github-token: ${{ secrets.GITHUB_TOKEN }}
6565
clubhouse-token: ${{ secrets.CLUBHOUSE_TOKEN }}
@@ -89,7 +89,7 @@ You can customize the Clubhouse **title** and **description** when creating stor
8989
variables, like this:
9090

9191
```yaml
92-
- uses: singingwolfboy/create-linked-clubhouse-story@v1.6
92+
- uses: singingwolfboy/create-linked-clubhouse-story@v1.7
9393
with:
9494
github-token: ${{ secrets.GITHUB_TOKEN }}
9595
clubhouse-token: ${{ secrets.CLUBHOUSE_TOKEN }}
@@ -127,7 +127,7 @@ map GitHub users to Clubhouse users. The user map should be passed in the
127127
formatted string. Here's an example:
128128

129129
```yaml
130-
- uses: singingwolfboy/create-linked-clubhouse-story@v1.6
130+
- uses: singingwolfboy/create-linked-clubhouse-story@v1.7
131131
with:
132132
github-token: ${{ secrets.GITHUB_TOKEN }}
133133
clubhouse-token: ${{ secrets.CLUBHOUSE_TOKEN }}
@@ -155,7 +155,7 @@ You can also add a list of GitHub users to ignore for this integration by using
155155
Multiple users should be separated by commas.
156156

157157
```yaml
158-
- uses: singingwolfboy/create-linked-clubhouse-story@v1.6
158+
- uses: singingwolfboy/create-linked-clubhouse-story@v1.7
159159
with:
160160
github-token: ${{ secrets.GITHUB_TOKEN }}
161161
clubhouse-token: ${{ secrets.CLUBHOUSE_TOKEN }}
@@ -169,7 +169,7 @@ You can also add a list of GitHub `only-users` for this integration. This works
169169
Multiple users should be separated by commas.
170170

171171
```yaml
172-
- uses: singingwolfboy/create-linked-clubhouse-story@v1.6
172+
- uses: singingwolfboy/create-linked-clubhouse-story@v1.7
173173
with:
174174
github-token: ${{ secrets.GITHUB_TOKEN }}
175175
clubhouse-token: ${{ secrets.CLUBHOUSE_TOKEN }}
@@ -179,17 +179,46 @@ Multiple users should be separated by commas.
179179

180180
## Iteration Support
181181

182-
You can also automatically add newly created tickets to a Clubhouse Iteration.
183-
Since iterations are generally team-dependent and only relevant for a period of
184-
time, this is configured through a map that identifies the groupId of which the
185-
integration will pick the most recently updated Iteration marked as `started`
186-
to link the new ticket to. You can also specify a string that if contained in
187-
an iteration's name, will trigger the integration to exclude consideration of
188-
that iteration. For example, if a team has multiple iterations `started` but
189-
one of them is a backlog iteration for given quarter.
182+
Clubhouse supports the concept of [iterations](https://help.clubhouse.io/hc/en-us/articles/360028953452-Iterations-Overview)
183+
-- time-boxed periods of development for stories. You can configure this Action
184+
to automatically assign the Clubhouse stories it creates to Clubhouse iterations,
185+
using GitHub labels and Clubhouse groups to identify the correct iteration to use.
186+
187+
In order to use this feature, this Action makes a few assumptions about
188+
the way you use Clubhouse and GitHub:
189+
190+
- We assume that each team has an associated [Clubhouse group](https://help.clubhouse.io/hc/en-us/articles/360039328751-Groups-Group-Management),
191+
and that Clubhouse iterations are associated with this group.
192+
- We assume that the correct iteration to use is the *most recent*
193+
in-progress iteration for the group, as determined by the "last updated" time.
194+
(However, you may exclude specific iterations by name.)
195+
- We assume that each team has an associated [GitHub label](https://docs.github.com/en/free-pro-team@latest/github/managing-your-work-on-github/managing-labels),
196+
and that this label is applied to pull requests consistently.
197+
(You may do this manually, or use an automated system like the
198+
[Labeler Action](https://github.com/actions/labeler).)
199+
200+
If you want to use this feature, and you have a different workflow that
201+
does *not* match these assumptions, open a GitHub Issue on this repo
202+
and let's talk about it! Maybe we can find a way to make this Action
203+
support other workflows, as well.
204+
205+
If your workflow is compatible with these assumptions, and you want to use this feature,
206+
first you must modify the [`on` section](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#on)
207+
of your config file to include the
208+
[`labeled` activity type for the `pull_request` event](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#pull_request).
209+
For example:
190210

191211
```yaml
192-
- uses: singingwolfboy/[email protected]
212+
on:
213+
pull_request:
214+
types: [opened, closed, labeled]
215+
```
216+
217+
Next, provide a JSON-formatted string to the `label-iteration-group-map` input.
218+
This is used to map GitHub labels to Clubhouse groups. Here is an example:
219+
220+
```yaml
221+
- uses: singingwolfboy/[email protected]
193222
with:
194223
github-token: ${{ secrets.GITHUB_TOKEN }}
195224
clubhouse-token: ${{ secrets.CLUBHOUSE_TOKEN }}
@@ -198,7 +227,15 @@ one of them is a backlog iteration for given quarter.
198227
{
199228
"Team Octocat": {
200229
"groupId": "12345678-9012-3456-7890-123456789012",
201-
"excludeName": "Backlog",
230+
"excludeName": "Backlog"
231+
},
232+
"Unicorns": {
233+
"groupId": "34567890-1234-5678-9012-345678901234"
202234
}
203235
}
204236
```
237+
238+
In this example, "Team Octocat" and "Unicorns" are labels on GitHub.
239+
The "groupId" refers to the ID of the Clubhouse group that are associated
240+
with these respective teams. The "excludeName" key is optional;
241+
if provided, it is used to exclude specific iterations from consideration.

0 commit comments

Comments
 (0)