sawchengling66/getting-started-github-apps

blank issue

Closed this issue · 2 comments

blank issue

Thanks, We would appreciate it if you could provide us with more info about this issue/pr!

Well done!

Congratulations @sawchengling66, you've completed the Introduction to GitHub Apps course!

congratulations

During this course you successfully:

  • Learned what GitHub Apps are and how they're useful
  • Understood their place in the SDLC and the greater ecosystem
  • Were introduced to GitHub's APIs and their role with Apps
  • Understood the basic functions of webhooks and how you can interact with them
  • Installed two GitHub Probot Apps on our repository

Probot & GitHub Apps

Probot is the basis of some of the coolest GitHub Apps out there. Most Probot Apps are already hosted, easy to install, and easy to discover. Probot is a framework to help you build GitHub Apps while using Node.js.

Want to learn more about Probot and GitHub Apps? Below are a few resources that will help you along your journey:

Here are some great examples of other Probot Apps:

  • Stale: Closes issues and pull requests that have been around for a bit too long without activity
  • Delete merged branch: After a merge, deletes the branch
  • First timers: Creates an issue to help onboard new open source contributors to your community

More detail

If you're curious about exactly why this worked, and what webhooks were used under the surface, click the detailed breakdown below.

A detailed breakdown
  • As we dig into the documentation, we should see that the issues and pull_request events are the webhooks that trigger the GitHub API, since those look for "opened" GitHub actions.
  • This code snippet shows that our app is looking for two specific webhooks, pull_request.opened and issues.opened.
  • Each event, when triggered, will return a specific payload, which basically just hands you a bunch of data that GitHub requested in the background through its API, for your specific event. Each webhook event has it's own payload example that you can reference in the documentation.
  • In our case, we're looking for title, body, and user.
  • The rest is mostly coding logic, which is beyond the scope of our course, but you can see an example of what the app does with that information here. In this case, it looks to check if the content exists, or if it's equal to the existing default templates without any changes.

Keep learning

Want to keep learning? Feel free to check out our other courses?


I won't respond to this issue, go ahead and close it when finished!