Automating Open Source with ProbotBex Warner
#TheFuture #OrMaybeNot
https://xkcd.com/1205/
Jidokaautomation with a human touch.
Automating ProcessImproves consistency, reduces overhead,
increases your confidence
Identify repeated tasks
“We {action}every {period of time}.”
Identify repeated tasks
“We release a changelogevery two weeks.”
What does automation look like on GitHub?
OAuth Apps
github.com/dear-github/dear-github
GitHub Apps 🎉
Granular permissions
You’ve probably seen it in action
You’ve probably seen it in action
You’ve probably seen it in action
Listen on WebhooksTake action via the GitHub API
AuthenticationJWT + installation access token
Abstracted away
GitHub APIsREST, GraphQl, Octokits
Authenticated Octokit client
https://developer.github.com/v3/libraries/
Let’s build an app!
github.com/probot/create-probot-apphttps://carbon.now.sh/
LIVE DEMO???
Let’s write some code
index.jshttps://carbon.now.sh/
Identify repeated tasks
“We {action}every {period of time}.”
Identify repeated tasks
“We add a label forevery every new issue.”
`app.on` listening for webhooks
https://carbon.now.sh/
Webhookshttps://developer.github.com/webhooks/
Issues Eventhttps://developer.github.com/v3/activity/events/types/
#issuesevent
Listening on `issues.opened`https://carbon.now.sh/
https://octokit.github.io/rest.js/#api-Issues-addLabels
Probot’s Internal APIshttps://probot.github.io/api/latest/classes/context.html#issue
`context.issue()`
Add necessary paramshttps://carbon.now.sh/
Make the API callhttps://carbon.now.sh/
Watch it work!
Existing Apps
probot.github.io/apps
probot.github.io
We’re hiring!
https://github.com/about/careers