{"id":20573312,"url":"https://github.com/joaocarmo/pr-labeler","last_synced_at":"2025-04-14T17:23:53.190Z","repository":{"id":38996288,"uuid":"405403684","full_name":"joaocarmo/pr-labeler","owner":"joaocarmo","description":"A GitHub bot to label PRs automatically based on title and body against list of defined labels.","archived":false,"fork":false,"pushed_at":"2025-01-27T03:10:18.000Z","size":368,"stargazers_count":4,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T06:04:24.442Z","etag":null,"topics":["automation","bot","github","github-app","github-bot","label","labeler","pr","probot","probot-app","tag","tags"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/pull-request-auto-labeler","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joaocarmo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-11T14:42:18.000Z","updated_at":"2025-03-23T11:36:14.000Z","dependencies_parsed_at":"2024-11-16T05:27:04.172Z","dependency_job_id":"2b7e63ef-6f7a-42a4-bce5-8aa4a0bfca6d","html_url":"https://github.com/joaocarmo/pr-labeler","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaocarmo%2Fpr-labeler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaocarmo%2Fpr-labeler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaocarmo%2Fpr-labeler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaocarmo%2Fpr-labeler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joaocarmo","download_url":"https://codeload.github.com/joaocarmo/pr-labeler/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248924492,"owners_count":21184090,"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":["automation","bot","github","github-app","github-bot","label","labeler","pr","probot","probot-app","tag","tags"],"created_at":"2024-11-16T05:26:53.135Z","updated_at":"2025-04-14T17:23:53.175Z","avatar_url":"https://github.com/joaocarmo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"https://raw.githubusercontent.com/joaocarmo/pr-labeler/master/assets/pr-labeler.svg?sanitize=true\" width=\"256px\" alt=\"pr-labeler\"\u003e\n\u003c/p\u003e\n\n# PR Labeler\n\n![tests](https://github.com/joaocarmo/pr-labeler/workflows/Tests/badge.svg)\n![ql](https://github.com/joaocarmo/pr-labeler/workflows/CodeQL/badge.svg)\n\nA GitHub App built with [Probot](https://github.com/probot/probot) that enables\na GitHub bot to label PRs automatically based on title and body against a list\nof defined labels.\n\n## Config\n\nAdd a `pr-labeler.yml` configuration file to your repository's `.github`\ndirectory with the following content:\n\n```yaml\n# .github/pr-labeler.yml\n# The bot always updates the labels, add/remove as necessary [default: false]\nalwaysReplace: false\n# Treats the text and labels as case sensitive [default: true]\ncaseSensitive: true\n# Array of labels to be applied to the PR [default: []]\ncustomLabels:\n  # Finds the `text` within the PR title and body and applies the `label`\n  - text: '#bug'\n    label: 'bug'\n  - text: '#test'\n    label: 'test'\n  - text: '#feature'\n    label: 'feature'\n# Search the body of the PR for the `text` [default: true]\nsearchBody: true\n# Search the title of the PR for the `text` [default: true]\nsearchTitle: true\n# Search for whole words only [default: false]\nwholeWords: false\n```\n\n## Development\n\nIf you want to work on the bot, you can follow the instructions below.\n\n### Setup\n\n```sh\n# Install dependencies\npnpm install\n\n# Build the bot (we need to transpile TypeScript into JavaScript)\npnpm build\n\n# Run the bot\npnpm start\n```\n\n### Docker\n\n```sh\n# 1. Build container\ndocker build -t pr-labeler .\n\n# 2. Start container\ndocker run -e APP_ID=\u003capp-id\u003e -e PRIVATE_KEY=\u003cpem-value\u003e pr-labeler\n```\n\n### Deployment\n\nA few environment variables need to be set in order to deploy the bot:\n\n```sh\n# The APP_ID and PRIVATE_KEY are required to authenticate the GitHub App\nexport APP_ID=\u003capp-id\u003e\nexport PRIVATE_KEY=\u003cpem-value\u003e\n# Alternatively, you can set the PRIVATE_KEY_PATH to the path of the private key\n# export PRIVATE_KEY_PATH=\u003cpath-to-pem-file\u003e\n\n# The WEBHOOK_SECRET is used to verify incoming webhooks from GitHub\nexport WEBHOOK_SECRET=\u003cwebhook-secret\u003e\n```\n\n### Contributing\n\nIf you have suggestions for how pr-labeler could be improved, or want to report\na bug, open an issue! We'd love all and any contributions.\n\nFor more, check out the [Contributing Guide](CONTRIBUTING.md).\n\n## License\n\n[MIT](LICENSE) © 2021 João Carmo\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoaocarmo%2Fpr-labeler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoaocarmo%2Fpr-labeler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoaocarmo%2Fpr-labeler/lists"}