GitHub apps are basically integrations that can get installed on GitHub repositories (repos). GitHub Apps subscribe to "events" that happen in GitHub, such as:
A new issue is created
A pull request is opened
A discussion comment is created
When these events happen, GitHub sends a POST web request to the GitHub App, and the GitHub App receives that request and can do whatever it wants with it.
Here's a simple example of a what a GitHub app can do:
Subscribe to "issue assigned" events on a GitHub repo
When an issue is assigned in that repo, GitHub sends the POST request to the GitHub App API server
The GitHub App receives the request, which includes all the information about the event - what repo it happened on, what issue it relates to, and who was assigned
The app then writes a comment on the issue the event came from: @<user-who-was-assigned>, you have been assigned to this issue!
As you can imagine, you can go crazy and make the GitHub App do almost anything you want it to do.
So what does Announcement Drafter do?
GitHub has something called Discussions. It's basically where developers can discuss any topic related to the repository the discussion takes place in.
People use discussions to make announcements of new releases, features, etc. But there's one problem - you can't draft a discussion. So there's no way to privately share your discussion post for a teammate to review it.
Enter Announcement Drafter 🙂
GitHub has the concept of pull requests (PRs). A pull request is basically the way a developer submits code to be merged into the main branch of the repository. A developer makes a change to the code, and proposes that it makes it into the main version of the code via a pull request. Others on the project then see the pull request and review the code. They make comments, suggestions, and discuss ways to improve the code. After several reviews and iterations, once everyone agrees the code acceptable, the reviewers approve the PR and it gets merged into the main branch.
So GitHub uses pull requests to gather feedback on code from teammates. Why can't we use them for gathering feedback on discussions? After all, a discussion is written in markdown, which is essentially code for documentation. (This issue is actually written in markdown!)
That's what announcement drafter is. You write your discussion (announcement) in a markdown file in the repo and create a pull request to get it reviewed. Once it's reviewed and approved, you merge it and announcement drafter automatically copies the markdown and creates the discussion where you tell it to.
Things to Know
There are some technologies and concepts that are helpful to know to be effective working on this project.
This GitHub App is written in Typescript and is deployed as an Azure Web App.
Here's a checklist of things to get familiar with, you can just go down the list in order and read the linked material.
Once you've read and done those tutorials, explore the code in this repo.
[ ] Read the README (repo landing page). This has the instructions for users on how to install and configure the app on their repo. It's good to understand because you may change some of the behavior.
[ ] Explore the web-app/src folder. This is where the code is for the GitHub App.
Now, when you're ready, I can help you get your development environment setup and give you a good first issue to work on!
Onboarding for @Cameron-Gai.
Context
What is Announcement Drafter?
Announcement Drafter is a GitHub App.
GitHub Apps
GitHub apps are basically integrations that can get installed on GitHub repositories (repos). GitHub Apps subscribe to "events" that happen in GitHub, such as:
When these events happen, GitHub sends a POST web request to the GitHub App, and the GitHub App receives that request and can do whatever it wants with it.
Here's a simple example of a what a GitHub app can do:
@<user-who-was-assigned>, you have been assigned to this issue!
As you can imagine, you can go crazy and make the GitHub App do almost anything you want it to do.
So what does Announcement Drafter do?
GitHub has something called Discussions. It's basically where developers can discuss any topic related to the repository the discussion takes place in.
People use discussions to make announcements of new releases, features, etc. But there's one problem - you can't draft a discussion. So there's no way to privately share your discussion post for a teammate to review it.
Enter Announcement Drafter 🙂
GitHub has the concept of pull requests (PRs). A pull request is basically the way a developer submits code to be merged into the main branch of the repository. A developer makes a change to the code, and proposes that it makes it into the main version of the code via a pull request. Others on the project then see the pull request and review the code. They make comments, suggestions, and discuss ways to improve the code. After several reviews and iterations, once everyone agrees the code acceptable, the reviewers approve the PR and it gets merged into the main branch.
So GitHub uses pull requests to gather feedback on code from teammates. Why can't we use them for gathering feedback on discussions? After all, a discussion is written in markdown, which is essentially code for documentation. (This issue is actually written in markdown!)
That's what announcement drafter is. You write your discussion (announcement) in a markdown file in the repo and create a pull request to get it reviewed. Once it's reviewed and approved, you merge it and announcement drafter automatically copies the markdown and creates the discussion where you tell it to.
Things to Know
There are some technologies and concepts that are helpful to know to be effective working on this project.
This GitHub App is written in Typescript and is deployed as an Azure Web App.
Here's a checklist of things to get familiar with, you can just go down the list in order and read the linked material.
Once you've read and done those tutorials, explore the code in this repo.
web-app/src
folder. This is where the code is for the GitHub App.Now, when you're ready, I can help you get your development environment setup and give you a good first issue to work on!