{"id":13994284,"url":"https://github.com/github-developer/using-the-github-api-in-your-app","last_synced_at":"2025-07-22T19:31:42.618Z","repository":{"id":39617158,"uuid":"144895947","full_name":"github-developer/using-the-github-api-in-your-app","owner":"github-developer","description":null,"archived":true,"fork":false,"pushed_at":"2023-06-08T15:55:57.000Z","size":23,"stargazers_count":129,"open_issues_count":26,"forks_count":136,"subscribers_count":32,"default_branch":"master","last_synced_at":"2024-07-18T20:41:33.371Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/github-developer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-08-15T19:40:23.000Z","updated_at":"2024-03-28T08:42:09.000Z","dependencies_parsed_at":"2024-01-18T04:51:48.082Z","dependency_job_id":"a0c068d0-57b7-4f4e-85c3-09210919064b","html_url":"https://github.com/github-developer/using-the-github-api-in-your-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github-developer%2Fusing-the-github-api-in-your-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github-developer%2Fusing-the-github-api-in-your-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github-developer%2Fusing-the-github-api-in-your-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github-developer%2Fusing-the-github-api-in-your-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github-developer","download_url":"https://codeload.github.com/github-developer/using-the-github-api-in-your-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":214675190,"owners_count":15768122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-09T14:02:48.213Z","updated_at":"2024-08-09T14:13:28.505Z","avatar_url":"https://github.com/github-developer.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"⚠️ Note: This repository is not maintained. For more recent guides about how to build GitHub Apps, see \"[About writing code for a GitHub App](https://docs.github.com/en/apps/creating-github-apps/writing-code-for-a-github-app/about-writing-code-for-a-github-app).\"\n\nThis is an example GitHub App that adds a label to all new issues opened in a repository. You can follow the archived \"[Using the GitHub API in your app](https://web.archive.org/web/20230604175646/https://docs.github.com/en/apps/creating-github-apps/writing-code-for-a-github-app/using-the-github-api-in-your-app)\" guide to learn how to build the app code in `server.rb`.\n\nThis project listens for webhook events and uses the Octokit.rb library to make REST API calls. This example project consists of two different servers:\n* `template_server.rb` (GitHub App template code)\n* `server.rb` (completed project)\n\nTo learn how to set up a template GitHub App, follow the archived \"[Setting up your development environment](https://web.archive.org/web/20230604175646/https://docs.github.com/en/apps/creating-github-apps/writing-code-for-a-github-app/setting-up-your-development-environment-to-create-a-github-app)\" guide.\n\n## Install\n\nTo run the code, make sure you have [Bundler](https://bundler.io/) installed; then enter `bundle install` on the command line.\n\n## Set environment variables\n\n1. Create a copy of the `.env-example` file called `.env`.\n2. Add your GitHub App's private key, app ID, and webhook secret to the `.env` file.\n\n## Run the server\n\n1. Run `ruby template_server.rb` or `ruby server.rb` on the command line.\n1. View the default Sinatra app at `localhost:3000`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub-developer%2Fusing-the-github-api-in-your-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub-developer%2Fusing-the-github-api-in-your-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub-developer%2Fusing-the-github-api-in-your-app/lists"}