Skip to content

Commit 23f2e9d

Browse files
Updated README: disabled for built-in integration, added comment template
1 parent 0a85dde commit 23f2e9d

File tree

1 file changed

+40
-2
lines changed

1 file changed

+40
-2
lines changed

README.md

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
clubhouse-create:
2424
runs-on: ubuntu-latest
2525
steps:
26-
- uses: singingwolfboy/create-linked-clubhouse-story@v1
26+
- uses: singingwolfboy/create-linked-clubhouse-story@v1.1
2727
with:
2828
github-token: ${{ secrets.GITHUB_TOKEN }}
2929
clubhouse-token: ${{ secrets.CLUBHOUSE_TOKEN }}
@@ -33,6 +33,44 @@ jobs:
3333
The `project-name` variable should contain the name of the Clubhouse project
3434
that you want the Clubhouse story to be associated with.
3535

36+
## Disabled for Built-In Integration
37+
38+
[Clubhouse already has an integration with GitHub.](https://help.clubhouse.io/hc/en-us/articles/207540323-Using-The-Clubhouse-GitHub-Integration)
39+
It works for the opposite use-case, assuming that the Clubhouse story exists
40+
_before_ the pull request is created.
41+
42+
This Action will specifically check for branch names that follow the naming
43+
convention for this built-in integration. Any branch name that looks like
44+
`*/ch####/*` will be ignored by this Action, on the assumption that a Clubhouse
45+
story already exists for the pull request.
46+
47+
## Customizing the Pull Request Comment
48+
49+
You can customize the comment posted on pull requests using the `comment-template`
50+
variable, like this:
51+
52+
```yaml
53+
- uses: singingwolfboy/[email protected]
54+
with:
55+
github-token: ${{ secrets.GITHUB_TOKEN }}
56+
clubhouse-token: ${{ secrets.CLUBHOUSE_TOKEN }}
57+
project-name: Engineering
58+
comment-template: >-
59+
Thanks for the pull request! [I've created a Clubhouse story
60+
for you.]({{{ story.app_url }}})
61+
```
62+
63+
This comment template is processed using the [Mustache](https://mustache.github.io/)
64+
templating system. It receives [the Story object returned from the Clubhouse API](https://clubhouse.io/api/rest/v3/#Story). Note that you may want to use the
65+
triple mustache syntax to disable HTML escaping.
66+
67+
GitHub will automatically process the comment text as [Markdown](https://guides.github.com/features/mastering-markdown/),
68+
so you can use features like links and images if you make your comment
69+
template output valid Markdown, as shown above.
70+
71+
If you don't provide a comment template, this action will use this comment template
72+
by default: `Clubhouse story: {{{ story.app_url }}}`
73+
3674
## User Map
3775

3876
This Action does its best to automatically assign the created Clubhouse story
@@ -48,7 +86,7 @@ map GitHub users to Clubhouse users. The user map should be passed in the
4886
formatted string. Here's an example:
4987

5088
```yaml
51-
- uses: singingwolfboy/create-linked-clubhouse-story@v1
89+
- uses: singingwolfboy/create-linked-clubhouse-story@v1.1
5290
with:
5391
github-token: ${{ secrets.GITHUB_TOKEN }}
5492
clubhouse-token: ${{ secrets.CLUBHOUSE_TOKEN }}

0 commit comments

Comments
 (0)