anw984 / getting-started-github-apps

https://lab.github.com/githubtraining/getting-started-with-github-apps
0 stars 0 forks source link

Trigger the app #2

Closed github-learning-lab[bot] closed 5 years ago

github-learning-lab[bot] commented 5 years ago

Triggering GitHub Apps

Actions that a person or tool takes on GitHub can be used to trigger events. Creating an issue, making a commit, or leaving a comment, to name a few, are logged on GitHub. If GitHub doesn't use it, it can still be useful to other applications.

When you install an app, you give the app permission to receive some of this data from GitHub. That data allows the apps to react in ways that are useful to you. You can also allow the app to send information back, or change information completely.

It's important to mention that GitHub Apps are not people. You can't interact with them by doing things like using an @mention, or assigning them to review your work. On the other hand, they can do things that humans can't - like crunch big data, piece together networks of information and find bugs or errors that people wouldn't.

App components

An app is like a home security system. It's equipped to watch your house at all times, but only notifies you for specific criteria. When you install a home security system, you need to worry about a few components:

Just like a home security system, a GitHub App only watches for specific actions, and then responds in predetermined ways.

Step 2: Trigger the WIP app

WIP is a common abbreviation to mean work in progress.

The app you've just installed is concerned with one action: changing the title of a pull request. Let's test it out and see what the result is by updating the title of this pull request.

:keyboard: Activity: Test the app by editing the pull request title

  1. To the right of the pull request title, click the Edit button
  2. Add WIP to the beginning of the title
  3. Click Save

After changing the title, look for my response in this pull request

github-learning-lab[bot] commented 5 years ago

Nice job! Something changed on this repo when you added the "WIP" command. Let's try to get more insight into our app before we look at those changes.

Breaking down the WIP app components

GitHub Apps will then process this data in the background, responding to the repository with their expected default actions.

Step 3: Looking under the hood

For the next exercise, let's add our own notification service to get a better idea of what apps are receiving behind the scenes.

:keyboard: Activity: Adding a webhook payload delivery service

  1. Navigate to https://smee.io/ in another tab or window (keep this tab open for the rest of the course).
  2. Click Start a new channel
  3. Copy your unique "Webhook Proxy URL"
  4. In your webhooks settings, click Add webhook
  5. Paste your unique smee.io URL in the "Payload URL" field
  6. Choose application/json in the Content type dropdown
  7. Leave the "Secret" field blank
  8. For "Which events would you like to trigger this webhook?", select Send me everything
  9. Click Add webhook
  10. Return to this PR and paste your smee.io URL as a comment

Look for my response in a comment on this pull request

Sometimes I respond too fast for the page to update! If you perform an expected action and don't see a response from me, wait a few seconds and refresh the page for your next steps.

anw984 commented 5 years ago

https://smee.io/dMiGdnfIL3aKKxlS

github-learning-lab[bot] commented 5 years ago

Nice work adding smee.io!

WIP on the surface

When you added "WIP" to the title of this pull request, something changed. Do you see that the pull request's status is "pending" with a yellow dot? This is to block merging while the title includes "WIP".

Let's breakdown how WIP works:

  1. The app listens specifically for a change to a pull request title
  2. When a pull request title changes, the app searches for the key-word, "WIP"
  3. If the search finds "WIP", the app sends a request to GitHub's API to block merging in that pull request

Step 4: Watching for webhooks

Let's use this next activity to find out what's happening behind the scenes.

:keyboard: Activity: Remove WIP from pull request title

When you made this pull request a work in progress, I took it as a cue to add some good content to this repository! Now that we've got some real work, let's remove the WIP label so that we can merge.

  1. To the right of the pull request title, click the Edit button
  2. Remove WIP from the title
  3. Click Save

Look for my response in a comment on this pull request

github-learning-lab[bot] commented 5 years ago

WIP below the surface

Since installation, smee.io has been running patiently in the background and keeping a ledger of each webhook event that we've performed on the repository.

When you edited the pull request title, that triggered a specific type of event.

When that event was triggered, it sent a payload of data to our app. Each type of event delivers a different payload template to the app. When customizing or creating apps, having this knowledge becomes crucial.

Step 5: Name the event

Can you tell which type of event was sent back to the application when you changed the pull request header?

:keyboard: Activity: Connecting actions on GitHub to events and payloads

  1. Return to your unique smee.io link, accessible via your settings if you closed it
  2. Identify the webhook event that was triggered. Remember, you edited the pull request title
  3. Post the event exactly as it's written in smee.io in a comment on this pull request

Look for my response in a comment on this pull request

anw984 commented 5 years ago

{"event":"pull_request","payload":{"action":"edited","number":2,"pull_request":{"url":"https://api.github.com/repos/anw984/getting-started-github-apps/pulls/2","id":244451844,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQ0NDUxODQ0","html_url":"https://github.com/anw984/getting-started-github-apps/pull/2","diff_url":"https://github.com/anw984/getting-started-github-apps/pull/2.diff","patch_url":"https://github.com/anw984/getting-started-github-apps/pull/2.patch","issue_url":"https://api.github.com/repos/anw984/getting-started-github-apps/issues/2","number":2,"state":"open","locked":false,"title":"Trigger the app","user":{"login":"github-learning-lab[bot]","id":37936606,"node_id":"MDM6Qm90Mzc5MzY2MDY=","avatar_url":"https://avatars0.githubusercontent.com/in/10572?v=4","gravatar_id":"","url":"https://api.github.com/users/github-learning-lab%5Bbot%5D","html_url":"https://github.com/apps/github-learning-lab","followers_url":"https://api.github.com/users/github-learning-lab%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-learning-lab%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-learning-lab%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-learning-lab%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-learning-lab%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-learning-lab%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-learning-lab%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-learning-lab%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-learning-lab%5Bbot%5D/received_events","type":"Bot","site_admin":false},"body":"## Triggering GitHub Apps\n\nActions that a person or tool takes on GitHub can be used to trigger events. Creating an issue, making a commit, or leaving a comment, to name a few, are logged on GitHub. If GitHub doesn't use it, it can still be useful to other applications.\n\nWhen you install an app, you give the app permission to receive some of this data from GitHub. That data allows the apps to react in ways that are useful to you. You can also allow the app to send information back, or change information completely.\n\nIt's important to mention that GitHub Apps are not people. You can't interact with them by doing things like using an @mention, or assigning them to review your work. On the other hand, they can do things that humans can't - like crunch big data, piece together networks of information and find bugs or errors that people wouldn't.\n\n## App components\n\nAn app is like a home security system. It's equipped to watch your house at all times, but only notifies you for specific criteria.\tWhen you install a home security system, you need to worry about a few components:\n\n- Electricity to have the power to run continuously. You don't want failure when you aren't watching.\n- Standard behaviors to detect things like movement, noise, and doors opening. You don't want to have to program it to understand these actions -- you want to select how it responds to them.\n- A location that will be watched.\n- A notification delivery service -- either to your phone, a dedicated security service, or both.\n\nJust like a home security system, a GitHub App only watches for specific actions, and then responds in predetermined ways.\n\n## Step 2: Trigger the WIP app\n\nWIP is a common abbreviation to mean work in progress.\n\nThe app you've just installed is concerned with one action: changing the title of a pull request. Let's test it out and see what the result is by updating the title of this pull request.\n\n### :keyboard: Activity: Test the app by editing the pull request title\n\n1. To the right of the pull request title, click the Edit button\n1. Add WIP to the beginning of the title\n1. Click Save\n\n


\n<h3 align=\"center\">After changing the title, look for my response in this pull request\n","created_at":"2019-01-14T13:55:55Z","updated_at":"2019-01-14T13:58:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"98360194aa267fffc7f1de25acf1c9366ceca8b6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/anw984/getting-started-github-apps/pulls/2/commits","review_comments_url":"https://api.github.com/repos/anw984/getting-started-github-apps/pulls/2/comments","review_comment_url":"https://api.github.com/repos/anw984/getting-started-github-apps/pulls/comments{/number}","comments_url":"https://api.github.com/repos/anw984/getting-started-github-apps/issues/2/comments","statuses_url":"https://api.github.com/repos/anw984/getting-started-github-apps/statuses/1f626568492ca63fd7ab4f49867ec95a116ecbe1","head":{"label":"anw984:add-to-list","ref":"add-to-list","sha":"1f626568492ca63fd7ab4f49867ec95a116ecbe1","user":{"login":"anw984","id":46536455,"node_id":"MDQ6VXNlcjQ2NTM2NDU1","avatar_url":"https://avatars2.githubusercontent.com/u/46536455?v=4","gravatar_id":"","url":"https://api.github.com/users/anw984","html_url":"https://github.com/anw984","followers_url":"https://api.github.com/users/anw984/followers","following_url":"https://api.github.com/users/anw984/following{/other_user}","gists_url":"https://api.github.com/users/anw984/gists{/gist_id}","starred_url":"https://api.github.com/users/anw984/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anw984/subscriptions","organizations_url":"https://api.github.com/users/anw984/orgs","repos_url":"https://api.github.com/users/anw984/repos","events_url":"https://api.github.com/users/anw984/events{/privacy}","received_events_url":"https://api.github.com/users/anw984/received_events","type":"User","site_admin":false},"repo":{"id":165669344,"node_id":"MDEwOlJlcG9zaXRvcnkxNjU2NjkzNDQ=","name":"getting-started-github-apps","full_name":"anw984/getting-started-github-apps","private":false,"owner":{"login":"anw984","id":46536455,"node_id":"MDQ6VXNlcjQ2NTM2NDU1","avatar_url":"https://avatars2.githubusercontent.com/u/46536455?v=4","gravatar_id":"","url":"https://api.github.com/users/anw984","html_url":"https://github.com/anw984","followers_url":"https://api.github.com/users/anw984/followers","following_url":"https://api.github.com/users/anw984/following{/other_user}","gists_url":"https://api.github.com/users/anw984/gists{/gist_id}","starred_url":"https://api.github.com/users/anw984/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anw984/subscriptions","organizations_url":"https://api.github.com/users/anw984/orgs","repos_url":"https://api.github.com/users/anw984/repos","events_url":"https://api.github.com/users/anw984/events{/privacy}","received_events_url":"https://api.github.com/users/anw984/received_events","type":"User","site_admin":false},"html_url":"https://github.com/anw984/getting-started-github-apps","description":null,"fork":false,"url":"https://api.github.com/repos/anw984/getting-started-github-apps","forks_url":"https://api.github.com/repos/anw984/getting-started-github-apps/forks","keys_url":"https://api.github.com/repos/anw984/getting-started-github-apps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anw984/getting-started-github-apps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anw984/getting-started-github-apps/teams","hooks_url":"https://api.github.com/repos/anw984/getting-started-github-apps/hooks","issue_events_url":"https://api.github.com/repos/anw984/getting-started-github-apps/issues/events{/number}","events_url":"https://api.github.com/repos/anw984/getting-started-github-apps/events","assignees_url":"https://api.github.com/repos/anw984/getting-started-github-apps/assignees{/user}","branches_url":"https://api.github.com/repos/anw984/getting-started-github-apps/branches{/branch}","tags_url":"https://api.github.com/repos/anw984/getting-started-github-apps/tags","blobs_url":"https://api.github.com/repos/anw984/getting-started-github-apps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anw984/getting-started-github-apps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anw984/getting-started-github-apps/git/refs{/sha}","trees_url":"https://api.github.com/repos/anw984/getting-started-github-apps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anw984/getting-started-github-apps/statuses/{sha}","languages_url":"https://api.github.com/repos/anw984/getting-started-github-apps/languages","stargazers_url":"https://api.github.com/repos/anw984/getting-started-github-apps/stargazers","contributors_url":"https://api.github.com/repos/anw984/getting-started-github-apps/contributors","subscribers_url":"https://api.github.com/repos/anw984/getting-started-github-apps/subscribers","subscription_url":"https://api.github.com/repos/anw984/getting-started-github-apps/subscription","commits_url":"https://api.github.com/repos/anw984/getting-started-github-apps/commits{/sha}","git_commits_url":"https://api.github.com/repos/anw984/getting-started-github-apps/git/commits{/sha}","comments_url":"https://api.github.com/repos/anw984/getting-started-github-apps/comments{/number}","issue_comment_url":"https://api.github.com/repos/anw984/getting-started-github-apps/issues/comments{/number}","contents_url":"https://api.github.com/repos/anw984/getting-started-github-apps/contents/{+path}","compare_url":"https://api.github.com/repos/anw984/getting-started-github-apps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anw984/getting-started-github-apps/merges","archive_url":"https://api.github.com/repos/anw984/getting-started-github-apps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anw984/getting-started-github-apps/downloads","issues_url":"https://api.github.com/repos/anw984/getting-started-github-apps/issues{/number}","pulls_url":"https://api.github.com/repos/anw984/getting-started-github-apps/pulls{/number}","milestones_url":"https://api.github.com/repos/anw984/getting-started-github-apps/milestones{/number}","notifications_url":"https://api.github.com/repos/anw984/getting-started-github-apps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anw984/getting-started-github-apps/labels{/name}","releases_url":"https://api.github.com/repos/anw984/getting-started-github-apps/releases{/id}","deployments_url":"https://api.github.com/repos/anw984/getting-started-github-apps/deployments","created_at":"2019-01-14T13:48:24Z","updated_at":"2019-01-14T13:48:30Z","pushed_at":"2019-01-14T13:56:41Z","git_url":"git://github.com/anw984/getting-started-github-apps.git","ssh_url":"git@github.com:anw984/getting-started-github-apps.git","clone_url":"https://github.com/anw984/getting-started-github-apps.git","svn_url":"https://github.com/anw984/getting-started-github-apps","homepage":"https://lab.github.com/githubtraining/getting-started-with-github-apps","size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"anw984:master","ref":"master","sha":"c52989e058c706c743ae00cd21b57cb0ba160634","user":{"login":"anw984","id":46536455,"node_id":"MDQ6VXNlcjQ2NTM2NDU1","avatar_url":"https://avatars2.githubusercontent.com/u/46536455?v=4","gravatar_id":"","url":"https://api.github.com/users/anw984","html_url":"https://github.com/anw984","followers_url":"https://api.github.com/users/anw984/followers","following_url":"https://api.github.com/users/anw984/following{/other_user}","gists_url":"https://api.github.com/users/anw984/gists{/gist_id}","starred_url":"https://api.github.com/users/anw984/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anw984/subscriptions","organizations_url":"https://api.github.com/users/anw984/orgs","repos_url":"https://api.github.com/users/anw984/repos","events_url":"https://api.github.com/users/anw984/events{/privacy}","received_events_url":"https://api.github.com/users/anw984/received_events","type":"User","site_admin":false},"repo":{"id":165669344,"node_id":"MDEwOlJlcG9zaXRvcnkxNjU2NjkzNDQ=","name":"getting-started-github-apps","full_name":"anw984/getting-started-github-apps","private":false,"owner":{"login":"anw984","id":46536455,"node_id":"MDQ6VXNlcjQ2NTM2NDU1","avatar_url":"https://avatars2.githubusercontent.com/u/46536455?v=4","gravatar_id":"","url":"https://api.github.com/users/anw984","html_url":"https://github.com/anw984","followers_url":"https://api.github.com/users/anw984/followers","following_url":"https://api.github.com/users/anw984/following{/other_user}","gists_url":"https://api.github.com/users/anw984/gists{/gist_id}","starred_url":"https://api.github.com/users/anw984/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anw984/subscriptions","organizations_url":"https://api.github.com/users/anw984/orgs","repos_url":"https://api.github.com/users/anw984/repos","events_url":"https://api.github.com/users/anw984/events{/privacy}","received_events_url":"https://api.github.com/users/anw984/received_events","type":"User","site_admin":false},"html_url":"https://github.com/anw984/getting-started-github-apps","description":null,"fork":false,"url":"https://api.github.com/repos/anw984/getting-started-github-apps","forks_url":"https://api.github.com/repos/anw984/getting-started-github-apps/forks","keys_url":"https://api.github.com/repos/anw984/getting-started-github-apps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anw984/getting-started-github-apps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anw984/getting-started-github-apps/teams","hooks_url":"https://api.github.com/repos/anw984/getting-started-github-apps/hooks","issue_events_url":"https://api.github.com/repos/anw984/getting-started-github-apps/issues/events{/number}","events_url":"https://api.github.com/repos/anw984/getting-started-github-apps/events","assignees_url":"https://api.github.com/repos/anw984/getting-started-github-apps/assignees{/user}","branches_url":"https://api.github.com/repos/anw984/getting-started-github-apps/branches{/branch}","tags_url":"https://api.github.com/repos/anw984/getting-started-github-apps/tags","blobs_url":"https://api.github.com/repos/anw984/getting-started-github-apps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anw984/getting-started-github-apps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anw984/getting-started-github-apps/git/refs{/sha}","trees_url":"https://api.github.com/repos/anw984/getting-started-github-apps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anw984/getting-started-github-apps/statuses/{sha}","languages_url":"https://api.github.com/repos/anw984/getting-started-github-apps/languages","stargazers_url":"https://api.github.com/repos/anw984/getting-started-github-apps/stargazers","contributors_url":"https://api.github.com/repos/anw984/getting-started-github-apps/contributors","subscribers_url":"https://api.github.com/repos/anw984/getting-started-github-apps/subscribers","subscription_url":"https://api.github.com/repos/anw984/getting-started-github-apps/subscription","commits_url":"https://api.github.com/repos/anw984/getting-started-github-apps/commits{/sha}","git_commits_url":"https://api.github.com/repos/anw984/getting-started-github-apps/git/commits{/sha}","comments_url":"https://api.github.com/repos/anw984/getting-started-github-apps/comments{/number}","issue_comment_url":"https://api.github.com/repos/anw984/getting-started-github-apps/issues/comments{/number}","contents_url":"https://api.github.com/repos/anw984/getting-started-github-apps/contents/{+path}","compare_url":"https://api.github.com/repos/anw984/getting-started-github-apps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anw984/getting-started-github-apps/merges","archive_url":"https://api.github.com/repos/anw984/getting-started-github-apps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anw984/getting-started-github-apps/downloads","issues_url":"https://api.github.com/repos/anw984/getting-started-github-apps/issues{/number}","pulls_url":"https://api.github.com/repos/anw984/getting-started-github-apps/pulls{/number}","milestones_url":"https://api.github.com/repos/anw984/getting-started-github-apps/milestones{/number}","notifications_url":"https://api.github.com/repos/anw984/getting-started-github-apps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anw984/getting-started-github-apps/labels{/name}","releases_url":"https://api.github.com/repos/anw984/getting-started-github-apps/releases{/id}","deployments_url":"https://api.github.com/repos/anw984/getting-started-github-apps/deployments","created_at":"2019-01-14T13:48:24Z","updated_at":"2019-01-14T13:48:30Z","pushed_at":"2019-01-14T13:56:41Z","git_url":"git://github.com/anw984/getting-started-github-apps.git","ssh_url":"git@github.com:anw984/getting-started-github-apps.git","clone_url":"https://github.com/anw984/getting-started-github-apps.git","svn_url":"https://github.com/anw984/getting-started-github-apps","homepage":"https://lab.github.com/githubtraining/getting-started-with-github-apps","size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/anw984/getting-started-github-apps/pulls/2"},"html":{"href":"https://github.com/anw984/getting-started-github-apps/pull/2"},"issue":{"href":"https://api.github.com/repos/anw984/getting-started-github-apps/issues/2"},"comments":{"href":"https://api.github.com/repos/anw984/getting-started-github-apps/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/anw984/getting-started-github-apps/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/anw984/getting-started-github-apps/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/anw984/getting-started-github-apps/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/anw984/getting-started-github-apps/statuses/1f626568492ca63fd7ab4f49867ec95a116ecbe1"}},"author_association":"NONE","merged":false,"mergeable":true,"rebaseable":true,"mergeable_state":"unstable","merged_by":null,"comments":3,"review_comments":0,"maintainer_can_modify":false,"commits":3,"additions":400,"deletions":400,"changed_files":1},"changes":{"title":{"from":"WIP Trigger the app"}},"repository":{"id":165669344,"node_id":"MDEwOlJlcG9zaXRvcnkxNjU2NjkzNDQ=","name":"getting-started-github-apps","full_name":"anw984/getting-started-github-apps","private":false,"owner":{"login":"anw984","id":46536455,"node_id":"MDQ6VXNlcjQ2NTM2NDU1","avatar_url":"https://avatars2.githubusercontent.com/u/46536455?v=4","gravatar_id":"","url":"https://api.github.com/users/anw984","html_url":"https://github.com/anw984","followers_url":"https://api.github.com/users/anw984/followers","following_url":"https://api.github.com/users/anw984/following{/other_user}","gists_url":"https://api.github.com/users/anw984/gists{/gist_id}","starred_url":"https://api.github.com/users/anw984/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anw984/subscriptions","organizations_url":"https://api.github.com/users/anw984/orgs","repos_url":"https://api.github.com/users/anw984/repos","events_url":"https://api.github.com/users/anw984/events{/privacy}","received_events_url":"https://api.github.com/users/anw984/received_events","type":"User","site_admin":false},"html_url":"https://github.com/anw984/getting-started-github-apps","description":null,"fork":false,"url":"https://api.github.com/repos/anw984/getting-started-github-apps","forks_url":"https://api.github.com/repos/anw984/getting-started-github-apps/forks","keys_url":"https://api.github.com/repos/anw984/getting-started-github-apps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anw984/getting-started-github-apps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anw984/getting-started-github-apps/teams","hooks_url":"https://api.github.com/repos/anw984/getting-started-github-apps/hooks","issue_events_url":"https://api.github.com/repos/anw984/getting-started-github-apps/issues/events{/number}","events_url":"https://api.github.com/repos/anw984/getting-started-github-apps/events","assignees_url":"https://api.github.com/repos/anw984/getting-started-github-apps/assignees{/user}","branches_url":"https://api.github.com/repos/anw984/getting-started-github-apps/branches{/branch}","tags_url":"https://api.github.com/repos/anw984/getting-started-github-apps/tags","blobs_url":"https://api.github.com/repos/anw984/getting-started-github-apps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anw984/getting-started-github-apps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anw984/getting-started-github-apps/git/refs{/sha}","trees_url":"https://api.github.com/repos/anw984/getting-started-github-apps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anw984/getting-started-github-apps/statuses/{sha}","languages_url":"https://api.github.com/repos/anw984/getting-started-github-apps/languages","stargazers_url":"https://api.github.com/repos/anw984/getting-started-github-apps/stargazers","contributors_url":"https://api.github.com/repos/anw984/getting-started-github-apps/contributors","subscribers_url":"https://api.github.com/repos/anw984/getting-started-github-apps/subscribers","subscription_url":"https://api.github.com/repos/anw984/getting-started-github-apps/subscription","commits_url":"https://api.github.com/repos/anw984/getting-started-github-apps/commits{/sha}","git_commits_url":"https://api.github.com/repos/anw984/getting-started-github-apps/git/commits{/sha}","comments_url":"https://api.github.com/repos/anw984/getting-started-github-apps/comments{/number}","issue_comment_url":"https://api.github.com/repos/anw984/getting-started-github-apps/issues/comments{/number}","contents_url":"https://api.github.com/repos/anw984/getting-started-github-apps/contents/{+path}","compare_url":"https://api.github.com/repos/anw984/getting-started-github-apps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anw984/getting-started-github-apps/merges","archive_url":"https://api.github.com/repos/anw984/getting-started-github-apps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anw984/getting-started-github-apps/downloads","issues_url":"https://api.github.com/repos/anw984/getting-started-github-apps/issues{/number}","pulls_url":"https://api.github.com/repos/anw984/getting-started-github-apps/pulls{/number}","milestones_url":"https://api.github.com/repos/anw984/getting-started-github-apps/milestones{/number}","notifications_url":"https://api.github.com/repos/anw984/getting-started-github-apps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anw984/getting-started-github-apps/labels{/name}","releases_url":"https://api.github.com/repos/anw984/getting-started-github-apps/releases{/id}","deployments_url":"https://api.github.com/repos/anw984/getting-started-github-apps/deployments","created_at":"2019-01-14T13:48:24Z","updated_at":"2019-01-14T13:48:30Z","pushed_at":"2019-01-14T13:56:41Z","git_url":"git://github.com/anw984/getting-started-github-apps.git","ssh_url":"git@github.com:anw984/getting-started-github-apps.git","clone_url":"https://github.com/anw984/getting-started-github-apps.git","svn_url":"https://github.com/anw984/getting-started-github-apps","homepage":"https://lab.github.com/githubtraining/getting-started-with-github-apps","size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"},"sender":{"login":"anw984","id":46536455,"node_id":"MDQ6VXNlcjQ2NTM2NDU1","avatar_url":"https://avatars2.githubusercontent.com/u/46536455?v=4","gravatar_id":"","url":"https://api.github.com/users/anw984","html_url":"https://github.com/anw984","followers_url":"https://api.github.com/users/anw984/followers","following_url":"https://api.github.com/users/anw984/following{/other_user}","gists_url":"https://api.github.com/users/anw984/gists{/gist_id}","starred_url":"https://api.github.com/users/anw984/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anw984/subscriptions","organizations_url":"https://api.github.com/users/anw984/orgs","repos_url":"https://api.github.com/users/anw984/repos","events_url":"https://api.github.com/users/anw984/events{/privacy}","received_events_url":"https://api.github.com/users/anw984/received_events","type":"User","site_admin":false}}}

github-learning-lab[bot] commented 5 years ago

Perfect! As you might guess, pull_request is a broad event.

In the next exercise, we'll take a look at how apps can take general event payloads and turn those into specific responses via the API.

Step 6: Merging

After you removed WIP from the pull request title, the pull request was unblocked. Now, you're able to merge.

:keyboard: Activity: Merge

  1. Merge this pull request, and delete your branch

Sometimes I respond too fast for the page to update! If you perform an expected action and don't see a response from me, wait a few seconds and refresh the page for your next steps.

github-learning-lab[bot] commented 5 years ago

Step 7: Explore another app

Now that we've explored the WIP app, let's move onto what request info can do. We'll use request info to learn about how GitHub's API, webhooks, and configuration files can combine to give apps customized repository automation.

:keyboard: Activity: Open a pull request

  1. Open a pull request using this link, without changing the title or body

I'll respond in your new pull request