{"id":14973085,"url":"https://github.com/firebase/oss-bot","last_synced_at":"2025-07-20T08:05:59.772Z","repository":{"id":20749322,"uuid":"89745914","full_name":"firebase/oss-bot","owner":"firebase","description":"Robot friend for open source repositories","archived":false,"fork":false,"pushed_at":"2025-07-10T20:54:28.000Z","size":5544,"stargazers_count":36,"open_issues_count":37,"forks_count":31,"subscribers_count":62,"default_branch":"master","last_synced_at":"2025-07-11T01:16:17.747Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://ossbot.computer","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/firebase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"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,"zenodo":null}},"created_at":"2017-04-28T21:24:49.000Z","updated_at":"2025-07-10T20:53:20.000Z","dependencies_parsed_at":"2023-01-13T21:07:56.521Z","dependency_job_id":"2afc076d-a6fd-4581-bf3b-54fe875d9ec9","html_url":"https://github.com/firebase/oss-bot","commit_stats":{"total_commits":260,"total_committers":13,"mean_commits":20.0,"dds":"0.25769230769230766","last_synced_commit":"de53b253e2dc38c25be899f488e8c2837b62de2e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/firebase/oss-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firebase%2Foss-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firebase%2Foss-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firebase%2Foss-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firebase%2Foss-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firebase","download_url":"https://codeload.github.com/firebase/oss-bot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firebase%2Foss-bot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266087790,"owners_count":23874519,"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-09-24T13:48:05.547Z","updated_at":"2025-07-20T08:05:59.749Z","avatar_url":"https://github.com/firebase.png","language":"TypeScript","readme":"# Firebase OSS Robot\n\n## Introduction\n\nA robot to make open source easy for Firebasers.  The robot has multiple\ndistinct features which can be enabled individually.\n\n### Custom Emails\n\nIn shared repos you may only want to receive email notifications for a subset\nof the events that are fired. The bot allows you to specify a specific email\naddress for each label and then you will only receive emails for issues/PRs\nwith that label:\n\n```javascript\n// In this example, the engineers on the 'foo' team will get emails\n// about issues labeled 'foo' and the engineers on the 'bar' team\n// will get emails about issues labeled 'bar'\n\"my-repo\": {\n  \"labels\": {\n    \"foo\": {\n      \"email\":\"foo-engineers@googlegroups.com\"\n    },\n    \"bar\":{\n      \"email\":\"bar-engineers@googlegroups.com\"\n    }\n  }\n}\n```\n\n### Issue Labeling\n\nThe bot can automatically label incoming issues based on regex matching:\n\n```javascript\n\"my-repo\": {\n  \"labels\": {\n    \"foo\": {\n      \"regex\":\"Component:[\\\\s]+?[Ff]oo\",\n      \"email\": // ...\n    },\n  }\n}\n```\n\nIn the example above, an issue that contains \"Component: foo\" or \"Component: Foo\" or\nany variation would automatically get the \"foo\" label.  When combined with the custom\nemails configuration above, this means the bot can auto-label and then auto-notify the Foo\nengineering team about new issues or issue events.\n\nIf bot can't find a label for an issue, it will add the label `needs-triage` and then\nadd a comment explaining to the developer that a human will come to help.\n \n### Template Matching\n\nIf you use issue templates on your GitHub repo, the bot can enforce that new issues\nmatch the template.\n\nIssue templates are considered in \"sections\" where each section is a third-level header,\ndenoted in markdown by `###`.  For example:\n\n```md\n### Are you in the right place?\n\nAre you using FooBar Engineering products?  If not, go away!\n\n### [REQUIRED] Describe your environment\n\n  * FooBar SDK Version: ____\n  * Operating System: ____\n\n### [REQUIRED] Describe your problem\n\n  * What are the steps to reproduce?\n  * What do the logs say?\n```\n\nThe bot does checks at two levels:\n\n  * **Template Integrity** - did the developer filling out the template leave all the\n    headers in place?  If not, we can't easily parse the content.\n  * **Required Sections** - for any section marked with `[REQUIRED]` did the developer\n    make at least _some_ change to the content of the section?\n\nIf the user violates either of the above checks, the bot will leave a comment\ntelling them what they may have done wrong.\n\nIf your issue template is located at `ISSUE_TEMPLATE.md` then the bot will\nknow where to find it without any configuration. If you want to specify a different\nlocation for your template, add it to the config:\n\n```javascript\n\"my-repo\": {\n  // ...\n  \"templates\":{\n    \"issue\":\".github/ISSUE_TEMPLATE.md\"\n  }\n}\n```\n\nIf your repo has multiple templates (like one for bugs and one for features) you must\nadd a markdown comment to the template to let the robot know how to locate it:\n\n```md\n\u003c!-- DO NOT DELETE \nvalidate_template=true\ntemplate_path=.github/ISSUE_TEMPLATE/bug.md\n--\u003e\n\n### My first section\n...\n```\n\n#### Template validation\n\nYou can configure how the required sections of an issue template are validated and whether/which label is added to the issue in case of a violation:\n\n```\n\"validation\": {\n  \"templates\": {\n    \".github/ISSUE_TEMPLATE/bug.md\": {\n      \"validation_failed_label\": \"need more info\",\n      \"required_section_validation\": \"relaxed\"\n    },\n    ...\n  }\n}\n```\nThere are three different levels of required section validation:\n\n- `strict`: Any empty required section is a violation\n- `relaxed`: As long as one required section is filled, it's ok\n- `none`: No validation of required sections\n\n### Stale Issue Cleanup\n\nThe bot can help you clean up issues that have gone \"stale\", meaning that\nmore information is needed but has not been provided.\n\nThe flow is described in this chart:\n\n\u003cimg src=\"docs/issues-flow.jpg\" /\u003e\n\nThe names of the labels and the length of certain time periods can\nbe configured in your repo config:\n\n```javascript\n\"my-repo\": {\n  // ...\n  \"cleanup\": {\n    \"issue\": {\n      // [REQUIRED] Label manually applied for issues that need more information.\n      \"label_needs_info\": \"Needs Info\",\n\n      // [OPTIONAL] Label to be applied for issues that need Googler attention.\n      // If unspecified, this state will not have a visible label.\n      \"label_needs_attention\": \"Needs Attention\",\n \n      // [REQUIRED] Label to be applied for issues that don't have recent activity\n      \"label_stale\": \"Stale\",\n\n      // [OPTIONAL] Label(s) that can be applied to issues to exempt them from the stale\n      // checker.\n      \"ignore_labels\": [\"Feature Request\", \"Internal\"],\n\n      // [REQUIRED] Time, in days, to stay in the needs_info state before becoming stale\n      // stale.  These issues transition from label_needs_info to label_stale.\n      \"needs_info_days\": 7,\n\n      // [REQUIRED] Time, in days, to close an issue after the warning message is posted\n      // if there is no recent activity.  These issues will transition from\n      // label_stale to closed.\n      \"stale_days\": 3,\n\n      // [OPTIONAL] Time, in days, to lock an issue after it has been closed.\n      \"lock_days\": 60\n    }\n  }\n}\n```\n\n### Old Issue Locking\n\nThe bot can lock issues that have been closed for a while to prevent new discussion. \nTo enable this, add the `lock_days` key to your \"stale issue config\" (see above).\n\n### Repo Reports\n\nThe bot can send you a weekly report of how healthy your repo is. To receive this\nreport, just add a reporting config:\n\n```javascript\n\"my-repo\": {\n  // ...\n  \"reports\": {\n    \"email\": \"foo-engineering@googlegroups.com\"\n  }\n}\n```\n\nYou will then receive a weekly email with:\n\n  * Change in open issues, stars, and forks.\n  * List of which issues were opened in the past week.\n  * List of which issues were closed in the past week.\n\n## Monitoring\n\nThe bot keeps a log of visible actions it takes on GitHub, which you can view on\na per-repo basis:\n\nhttps://ossbot.computer/audit.html?org=ORG_NAME\u0026repo=REPO_NAME\n\n## Deployment\n\n### Deploy Functions, Configuration, and Cron Jobs\n\nAfter completing all configuration below, run `make deploy`.\n\n### Customize Configuration\n\nEdit the `functions/config/config.json` file to have configuration in the following form:\n\n```javascript\n{\n  \"\u003cORG_NAME\u003e\": {\n    \"\u003cREPO_NAME\u003e\": {\n      // .. REPO CONFIGURATION ...\n    }\n  }\n}\n```\n\nSee the feature sections above for the different properties that can be added to the\nrepo configuration.\n\n### Configure Secrets\n\n#### GitHub:\n\nGo to the [github token page](https://github.com/settings/tokens/new) and\ncreate a new personal access token for the bot account with the following\npermissions:\n\n  * `public_repo` - access public repositories.\n  * `admin:repo_hook` - read and write repository hooks.\n\n```\nfirebase functions:config:set github.token=\"\u003cYOUR_GITHUB_TOKEN\u003e\"\n```\n\n#### Mailgun:\n\n```\nfirebase functions:config:set mailgun.key=\"\u003cYOUR_MAILGUN_KEY\u003e\"\nfirebase functions:config:set mailgun.domain=\"\u003cYOUR_MAILGUN_DOMAIN\u003e\"\n```\n\n### Email\n\nIn order to use the `SendWeeklyEmail` endpoint you need to configure the\nrecipient to some public group.\n\n```\nfirebase functions:config:set email.recipient=\"\u003cGROUP_TO_GET_EMAILS\u003e\"\n```\n\n#### Configure GitHub Webhook\n\nIn GitHub add a webhook with the following configuration:\n\n  * Payload URL - your cloud functions HTTP URL. Which should be\n    `https://\u003cYOURPROJECT\u003e.cloudfunctions.net/githubWebhook`.\n  * Content type - application/json\n  * Secret - N/A\n  * Select individual events:\n    * Issues\n    * Pull request\n    * Issue comment\n\n## Development\n\n### Test\n\nTo run basic tests, use `make test-functions` which runs the mocha tests the `functions`\ndirectory. These tests are mostly a sanity check, used to verify basic behavior without\nneeding an end-to-end deploy.\n\n### Formatting\n\nCode is formatted using `prettier` so no bikeshedding allowed. Run\n`npm run build` in the `functions` directory before committing.\n\n## Build Status\n\n[![Actions Status][gh-actions-badge]][gh-actions]\n\n[gh-actions]: https://github.com/firebase/oss-bot/actions\n[gh-actions-badge]: https://github.com/firebase/oss-bot/workflows/CI%20Tests/badge.svg\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirebase%2Foss-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirebase%2Foss-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirebase%2Foss-bot/lists"}