OpenCollective
Publish release updates to your OpenCollective collective
Config
announce:
opencollective:
enabled: true
slug: "my-project"
title_template: "{{ .Tag }}"
message_template: "{{ .ProjectName }} {{ .Tag }} is out!<br/>Check it out at <a href=\"{{ .ReleaseURL }}\">{{ .ReleaseURL }}</a>"| Field | Type | Description |
|---|---|---|
enabled | bool | Enable OpenCollective announcements |
slug | string | The collective slug from your OpenCollective URL (e.g. my-project from opencollective.com/my-project) |
title_template | string | Update title (templates supported). Default: {{ .Tag }} |
message_template | string | Update body as HTML (templates supported). Default: {{ .ProjectName }} {{ .Tag }} is out!<br/>Check it out at <a href="{{ .ReleaseURL }}">{{ .ReleaseURL }}</a> |
Environment variables
| Variable | Required | Description |
|---|---|---|
OPENCOLLECTIVE_TOKEN | Yes | Personal API token from your OpenCollective account |
How it works
Anodizer uses the OpenCollective GraphQL v2 API at
https://api.opencollective.com/graphql/v2 with your personal token in the
Personal-Token header. Each run performs a two-step flow:
- Creates a draft update using the
createUpdatemutation, associating it with your collective via theslugand providing the rendered title and HTML body. - Publishes the update immediately using the
publishUpdatemutation withnotificationAudience: ALL, sending email notifications to all collective backers and followers.
Empty slug handling
If slug renders to an empty string, anodizer logs a warning and skips the
OpenCollective announcement without failing the pipeline.
HTML in message body
The message_template is sent as HTML to OpenCollective. You can use standard
HTML tags (<br/>, <a>, <strong>, etc.) in your template. Plain text
without tags is also accepted.
Obtaining a personal token
- Log in to https://opencollective.com.
- Go to Settings → For Developers → Personal Tokens.
- Create a new token with at least Account Updates write access.
- Copy the token into
OPENCOLLECTIVE_TOKEN.
Example
announce:
opencollective:
enabled: true
slug: "my-rust-project"
title_template: "{{ .ProjectName }} {{ .Tag }} released"
message_template: |
<p>{{ .ProjectName }} {{ .Tag }} is now available.</p>
<p>See the full release notes at <a href="{{ .ReleaseURL }}">{{ .ReleaseURL }}</a>.</p>OPENCOLLECTIVE_TOKEN=your_personal_token_here