AutoPub plugins maintained by Strawberry GraphQL
Project description
strawberry-autopub-plugins
AutoPub plugins maintained by Strawberry GraphQL.
Included plugins
InviteContributorsPlugin(strawberry_autopub_plugins.invite_contributors:InviteContributorsPlugin)- Invites pull request contributors to a GitHub organization after
autopub publish. - Can also add invited users to a GitHub team.
- Invites pull request contributors to a GitHub organization after
TypefullyPlugin(strawberry_autopub_plugins.typefully:TypefullyPlugin)- Creates Typefully drafts or scheduled posts for release announcements.
- Supports per-platform templates for
x,linkedin,threads,bluesky, andmastodon.
Installation
pip install strawberry-autopub-plugins
Usage
Add one or more plugin paths to your AutoPub config:
[tool.autopub]
plugins = [
"poetry",
"github",
"strawberry_autopub_plugins.invite_contributors:InviteContributorsPlugin",
"strawberry_autopub_plugins.typefully:TypefullyPlugin",
]
Plugin config is keyed by each plugin's id:
invite_contributorstypefully
InviteContributorsPlugin
Plugin path:
strawberry_autopub_plugins.invite_contributors:InviteContributorsPlugin
Required environment variables:
GITHUB_TOKENGITHUB_REPOSITORY
Optional environment variables:
GITHUB_EVENT_PATH
GITHUB_TOKEN must be able to invite users to the target organization.
Example config:
[tool.autopub.plugin_config.invite_contributors]
organization = "strawberry-graphql"
team-slug = "strawberry-contributors"
role = "direct_member"
skip-bots = true
include-co-authors = true
exclude-users = ["renovate[bot]"]
dry-run = false
Options:
organization: Target GitHub organization. If omitted, the plugin falls back to the repository organization.team-slug: Optional team slug to add invited contributors to.role: One ofdirect_member,admin, orbilling_manager. Default:direct_member.skip-bots: Skip logins ending in[bot]. Default:true.include-co-authors: IncludeCo-authored-by:trailers found in commit messages. Default:true.exclude-users: Additional usernames to skip. Defaults todependabot-preview[bot],dependabot-preview,dependabot, anddependabot[bot].dry-run: Print which users would be invited without sending invitations. Default:false.
TypefullyPlugin
Plugin path:
strawberry_autopub_plugins.typefully:TypefullyPlugin
Required environment variables:
TYPEFULLY_API_KEY
Optional environment variables:
TYPEFULLY_SOCIAL_SET_ID
You can provide the social set ID either through social-set-id in config or TYPEFULLY_SOCIAL_SET_ID.
Example config:
[tool.autopub.plugin_config.typefully]
social-set-id = "abc-123"
platforms = ["x", "linkedin", "bluesky"]
project-name = "Strawberry"
message-template = "{project_name} {version} has been released!\n\n{release_notes}"
publish-mode = "draft"
tags = ["release", "python"]
max-length = 280
truncation-suffix = "..."
dry-run = false
[tool.autopub.plugin_config.typefully.platform-templates]
x = "{project_name} {version} is out now.\n\n{release_notes}"
linkedin = "{project_name} {version} has been released.\n\n{release_notes}"
Options:
social-set-id: Typefully social set to post into. Required unlessTYPEFULLY_SOCIAL_SET_IDis set.platforms: Platforms to enable. Supported values:x,linkedin,threads,bluesky,mastodon. Default:["x"].message-template: Default template for all platforms. Default:{project_name} {version} has been released!\n\n{release_notes}.platform-templates: Per-platform template overrides.project-name: Value exposed to templates as{project_name}.publish-mode: One ofdraft,now,next-free-slot, orscheduled. Default:draft.publish-at: Required whenpublish-mode = "scheduled".tags: Optional Typefully tags to attach to the draft.max-length: Maximum post length before truncation. Default:280.truncation-suffix: Suffix appended after truncation. Default:....dry-run: Print the request body without calling the Typefully API. Default:false.
Template variables:
{project_name}{version}{release_type}{release_notes}{previous_version}
Release-specific override from RELEASE.md frontmatter:
---
release type: patch
social_message: |
Strawberry {version} is out now.
Highlights:
{release_notes}
---
- Fixed X
- Added Y
When social_message is present in AutoPub frontmatter, the plugin uses it as the message template for all configured platforms and still expands the same template variables listed above.
Development
uv sync
uv run pytest
When changing dependencies, update the lockfile:
uv lock
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file strawberry_autopub_plugins-0.1.1.tar.gz.
File metadata
- Download URL: strawberry_autopub_plugins-0.1.1.tar.gz
- Upload date:
- Size: 61.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2df003a62a32e1b388a3d44c6d7eb416fbb3dcca3c9afcb60d2ee160d10528b2
|
|
| MD5 |
1241e4026869131a438acd92620d693e
|
|
| BLAKE2b-256 |
c71cf94c5d9f5071d8a80bce03ed6ec7e238a7787cc4d4463333bc8c4bf881b1
|
File details
Details for the file strawberry_autopub_plugins-0.1.1-py3-none-any.whl.
File metadata
- Download URL: strawberry_autopub_plugins-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2b6c1872f7a5850ed4ce732edb73fe93c4824c526d65db15de47e0848cfb53a
|
|
| MD5 |
d83dfd3a3059b392fd9d2cbc9cdebbd9
|
|
| BLAKE2b-256 |
70398c41e206b4e4ef42acb586102adf434099f3375b6565089439fa6c355879
|