Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/philip-gai/announcement-drafter
A bot for drafting and publishing GitHub discussions using pull requests.
https://github.com/philip-gai/announcement-drafter
announcements automation bot discussions drafts github github-app probot-app pull-requests
Last synced: 3 months ago
JSON representation
A bot for drafting and publishing GitHub discussions using pull requests.
- Host: GitHub
- URL: https://github.com/philip-gai/announcement-drafter
- Owner: philip-gai
- License: isc
- Created: 2021-10-12T02:37:08.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-28T14:19:29.000Z (almost 2 years ago)
- Last Synced: 2024-05-01T16:34:25.429Z (9 months ago)
- Topics: announcements, automation, bot, discussions, drafts, github, github-app, probot-app, pull-requests
- Language: TypeScript
- Homepage: https://github.com/apps/announcement-drafter
- Size: 30.9 MB
- Stars: 11
- Watchers: 2
- Forks: 2
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Announcement Drafter
[![Web App CI / CD](https://github.com/philip-gai/announcement-drafter/actions/workflows/web-app-ci-cd.yml/badge.svg)](https://github.com/philip-gai/announcement-drafter/actions/workflows/web-app-ci-cd.yml)
[![App Service CI / CD](https://github.com/philip-gai/announcement-drafter/actions/workflows/infrastructure-ci-cd.yml/badge.svg)](https://github.com/philip-gai/announcement-drafter/actions/workflows/infrastructure-ci-cd.yml)
![Language Count](https://img.shields.io/github/languages/count/philip-gai/announcement-drafter?label=Languages)
![Top Language](https://img.shields.io/github/languages/top/philip-gai/announcement-drafter)
![GitHub Repo stars](https://img.shields.io/github/stars/philip-gai/announcement-drafter?style=social)A 🤖 for drafting and publishing new GitHub discussions using pull requests.
Do you use GitHub discussions? Do you create announcements for your open-source projects or team posts? How do you get feedback or peer reviews on your post before creating it?
Now you can:
1️⃣ Create a pull request to get feedback from your teammates on your announcement\
2️⃣ Merge the pull request to have your announcement posted!You can even use private repos to draft announcements and get feedback privately, and on merge have the announcement created in your public repo.
No more copy/pasting your post content into Google Docs. No more rewriting the markdown. Write the markdown once, get feedback and merge 🚀 This works on repository discussions, organization discussions, and legacy team posts.
## Getting Started
1. Install the [GitHub App](https://github.com/apps/announcement-drafter) and authorize it for any repositories or orgs you would like it to watch or post to.
2. Add a `.github/announcement-drafter.yml` (not `.yaml`) configuration file to any repositories you want the bot to watch.1. Provide what folders you want the `announcement-drafter` bot to watch and (optionally) what folders you would like it to ignore when new pull requests are open.
```yml
watch_folders:
- docs/discussions/
```3. Create a markdown (`*.md`) file with some metadata at the top - see [Draft an Org or Repository Discussion](#draft-an-org-or-repository-discussion) or [Draft a team post](#draft-a-team-post)
4. Write your discussion in the body of the markdown file
5. Create a pull request
6. `announcement-drafter` will pick it up
7. When the pull request is merged, it will create the discussion for you### Draft an Org or Repository Discussion
A note on org discussions: Org discussions are backed by repository discussions, so just point to the repository used by your org discussions and 🪄 it will work!
```markdown
# Hello World! 👋
Hello beautiful world! 🌎
```
### Draft a Team Post
```markdown
# Hello World! 👋
Hello beautiful world! 🌎
```
## Demos
Demo repo: [announcement-drafter demo]
## Markdown Metadata
| Name | Description | Required | Example |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | --------------------------------------------------------- |
| `repository` or `repo` | The full url to the repository to create the discussion in
**Prerequisites:**
1. Discussions are enabled
2. The app is installed on the repo | **Conditional**: Required if no `team` is provided | `https://github.com/philip-gai/announcement-drafter-demo` |
| `team` | The full url to the team to create the discussion in
**Prerequisites:**
1. The app is installed on the team organization | **Conditional**: Required if no `repository` is provided | `https://github.com/orgs/elastico-group/teams/everyone` |
| `category` | The name of the discussion category | **Conditional**: Required if `repository` is provided | `announcements` |
| Discussion Title | The title of your discussion should be the first top-level header (i.e. `# Discussion Title`) | Yes | See [Example](#draft-an-org-or-repository-discussion) |
| Discussion Body | The body of your discussion is everything after the top-level header | Yes | See [Example](#draft-an-org-or-repository-discussion) |## App Configuration Options
These options should go in your repository's `.github/announcement-drafter.yml` file.
| Name | Description | Required | Example |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | --------------------------------------------------- |
| `watch_folders` | A list of what folders (relative paths) `announcement-drafter` should watch when new pull requests are open
1. It is recommened to include the final `/` in the path
2. `announcement-drafter` will also watch all subfolders unless you ignore them in `ignore_folders` | Yes | [See demo config][announcement-drafter demo config] |
| `ignore_folders` | A list of what folders (relative paths) `announcement-drafter` should _ignore_ when new pull requests are open | No | [See demo config][announcement-drafter demo config] |Example announcement-drafter.yml:
```yml
watch_folders:
- docs/discussions/
ignore_folders:
- docs/discussions/ignore/
```## FAQ
### I opened a pull request, but I never received a comment on the pull request from Announcement Drafter. What did I do wrong?
Make sure that you:
1. Installed the app on the repository you created the pull request from
2. Added a `.github/announcement-drafter.yml` file to the repository with `watch_folders`
3. Created a new `*.md` file inside one of the `watch_folders` from a branch
1. Announcement Drafter will *only* process files that were added. It will not process files that were removed, modified, renamed, copied, changed or unchanged.
4. Opened a pull request targeting the repository's default branch (i.e. `main`)
1. Announcement Drafter will ignore draft pull requestsAlso, try closing and re-opening your PR after making any changes to the announcement drafter configuration to trigger the flow again.
If you followed all of the above steps and are still experiencing issues, please [open an issue](https://github.com/philip-gai/announcement-drafter/issues/new?assignees=&labels=bug&template=bug_report.md&title=) :slightly_smiling_face:
## Contributing
If you have suggestions for how announcement-drafter could be improved, or want to report a bug, open an issue! We'd love all and any contributions.
For more, check out the [Contributing Guide](CONTRIBUTING.md).
[announcement-drafter demo]: https://github.com/philip-gai/announcement-drafter-demo
[announcement-drafter demo config]: https://github.com/philip-gai/announcement-drafter-demo/blob/main/.github/announcement-drafter.yml