{"id":20169914,"url":"https://github.com/birthdayresearch/oss-governance-bot","last_synced_at":"2025-03-31T08:09:29.316Z","repository":{"id":38819106,"uuid":"335007294","full_name":"BirthdayResearch/oss-governance-bot","owner":"BirthdayResearch","description":"Speed up issue triaging with automated chat-bot and chat-ops operations. Increased code review agility by moving quality control hierarchy from requirements to educational steps.","archived":false,"fork":false,"pushed_at":"2025-03-21T22:34:02.000Z","size":2785,"stargazers_count":50,"open_issues_count":19,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T18:57:25.150Z","etag":null,"topics":["bot","chatops","github-actions","governance","oss","project-management","review"],"latest_commit_sha":null,"homepage":"","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/BirthdayResearch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":".github/governance.yml","roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-01T16:11:21.000Z","updated_at":"2024-06-23T07:29:01.000Z","dependencies_parsed_at":"2024-12-06T07:30:46.785Z","dependency_job_id":"10fc70c7-6abd-4e3f-902c-a60842cdb0a5","html_url":"https://github.com/BirthdayResearch/oss-governance-bot","commit_stats":{"total_commits":133,"total_committers":4,"mean_commits":33.25,"dds":0.5338345864661654,"last_synced_commit":"c3dc330b28d745bd82a43b64274bb76ad41b24c7"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BirthdayResearch%2Foss-governance-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BirthdayResearch%2Foss-governance-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BirthdayResearch%2Foss-governance-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BirthdayResearch%2Foss-governance-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BirthdayResearch","download_url":"https://codeload.github.com/BirthdayResearch/oss-governance-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246436393,"owners_count":20776995,"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":["bot","chatops","github-actions","governance","oss","project-management","review"],"created_at":"2024-11-14T01:14:20.026Z","updated_at":"2025-03-31T08:09:29.292Z","avatar_url":"https://github.com/BirthdayResearch.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"icon.png\" width=\"120\" height=\"120\" align=\"right\" style=\"margin-left:32px\"/\u003e\n\n# OSS Governance Bot\n\n[![codecov](https://codecov.io/gh/BirthdayResearch/oss-governance-bot/branch/main/graph/badge.svg?token=RJI65RZH2F)](https://codecov.io/gh/BirthdayResearch/oss-governance-bot)\n![Codacy Badge](https://app.codacy.com/project/badge/Grade/a43f22b8c3c74fe9b6b58935a01fff4e)\n[![Release](https://img.shields.io/github/v/release/BirthdayResearch/oss-governance-bot)](https://github.com/BirthdayResearch/oss-governance-bot/releases)\n[![License MIT](https://img.shields.io/github/license/BirthdayResearch/oss-governance-bot)](https://github.com/BirthdayResearch/oss-governance-bot/blob/main/LICENSE)\n\n\u003c!-- 3 Arc: Context - Problem - Solution --\u003e\n\nAlthough putting our project on GitHub makes it transparent and visible for public contributions, it's far from making\nit maintainable. For new contributors, creating an issue or pull request and successfully sending it is a mountainous\njourney in itself. Quality control hierarchy such as 'Triage', 'Conventional Commits', 'CI steps' and 'Code review'\noften deter contributors from contributing due to the complex nature of each OSS governance policy.\n\nA healthy open source projects must be able to scale to thousands of contributors. This project is an attempt to bring\nefficacy to the process by lowering the barrier of entry for community participation. The onus should be on the\nreviewers or ChatBot/ChatOp to guide the contributor through a series of education (governance/triage requirements) or\nadjustment (code review changes).\n\nThis project is created to fully utilize the GitHub generous open source policy. It runs on GitHub Actions workflow\nhooks and deeply integrate with many GitHub offerings. In addition to providing a chat-bot experience when contributor\ninteract with your project, `oss-governance-bot` also provide automation in the form of policy enforcement. Community\ncontributors can trigger chat-ops via /slash style commands.\n\n## What can OSS Governance Bot do for you?\n\n* Speed up issue triaging with automated chat-bot and chat-ops operations.\n* Increased code review agility by moving quality control hierarchy from requirements to educational steps.\n* Scale to thousands of contributors without alienating community participation with complex quality control hierarchy.\n* A GitHub Action that lives natively and integrate well with the GitHub action/workflow product offering. You can view\n  the source directly and modify it to your needs.\n* See it in action at [DeFiCh/jellyfish](https://github.com/DeFiCh/jellyfish/issues)\n  or [DeFiCh/scan](https://github.com/DeFiCh/scan/issues).\n\n[![preview](preview.png)](https://github.com/DeFiCh/scan/issues/1034)\n\n## Usage\n\n#### `.github/workflow/governance.yml`\n\n```yml\n# .github/workflow/governance.yml\n\non:\n  pull_request_target:\n    types: [ synchronize, opened, labeled, unlabeled ]\n  issues:\n    types: [ opened, labeled, unlabeled ]\n  issue_comment:\n    types: [ created ]\n\n# You can use permissions to modify the default permissions granted to the GITHUB_TOKEN, \n# adding or removing access as required, so that you only allow the minimum required access. \npermissions:\n  contents: read\n  issues: write\n  pull-requests: write\n  statuses: write\n  checks: write\n\njobs:\n  governance:\n    name: Governance\n    runs-on: ubuntu-latest\n    steps:\n      # Semantic versioning, lock to different version: v2, v2.0 or a commit hash.\n      - uses: BirthdayResearch/oss-governance-bot@v2\n        with:\n          # You can use a PAT to post a comment/label/status so that it shows up as a user instead of github-actions\n          github-token: ${{secrets.GITHUB_TOKEN}} # optional, default to '${{ github.token }}'\n          config-path: .github/governance.yml # optional, default to '.github/governance.yml'\n```\n\n#### `.github/governance.yml`\n\n```yml\n# .github/governance.yml\n\nversion: v1\n\nissue:\n  labels:\n    - prefix: triage\n      list: [ \"accepted\" ]\n      multiple: false\n      author_association:\n        collaborator: true\n        member: true\n        owner: true\n      needs:\n        comment: |\n          @$AUTHOR: This issue is currently awaiting triage.\n\n          The triage/accepted label can be added by org members by writing /triage accepted in a comment.\n\n    - prefix: kind\n      list: [ \"feature\", \"bug\", \"question\" ]\n      multiple: false\n      needs:\n        comment: |\n          @$AUTHOR: There are no 'kind' label on this PR. You need a 'kind' label to generate the release note automatically.\n\n          * `/kind feature`\n          * `/kind bug`\n          * `/kind question`\n\n    - prefix: area\n      list: [ \"ui-ux\", \"semantics\", \"translation\", \"security\" ]\n      multiple: true\n      needs:\n        comment: |\n          @$AUTHOR: There are no area labels on this issue. Adding an appropriate label will greatly expedite the process for us. You can add as many area as you see fit. **If you are unsure what to do you can ignore this!**\n\n          * `/area ui-ux`\n          * `/area semantics`\n          * `/area translation`\n          * `/area security`\n\n    - prefix: os\n      list: [ \"mac\", \"win\", \"linux\" ]\n      multiple: true\n\n    - prefix: priority\n      multiple: false\n      list: [ \"urgent-now\", \"important-soon\" ]\n      author_association:\n        collaborator: true\n        member: true\n        owner: true\n\n  chat_ops:\n    - cmd: /close\n      type: close\n      author_association:\n        author: true\n        collaborator: true\n        member: true\n        owner: true\n\n    - cmd: /cc\n      type: none\n\n    - cmd: /assign\n      type: assign\n      author_association:\n        collaborator: true\n        member: true\n        owner: true\n\n    - cmd: /comment issue\n      type: comment\n      comment: |\n        @$ISSUE_AUTHOR: Hey this is comment issue example for issue/pr author.\n        @$AUTHOR: Hey this is comment issue example for sender author.\n\npull_request:\n  labels:\n    - prefix: kind\n      multiple: false\n      list: [ \"feature\", \"fix\", \"chore\", \"docs\", \"refactor\", \"dependencies\" ]\n      needs:\n        comment: |\n          @$AUTHOR: There are no 'kind' label on this PR. You need a 'kind' label to generate the release automatically.\n\n          * `/kind feature`\n          * `/kind fix`\n          * `/kind chore`\n          * `/kind docs`\n          * `/kind refactor`\n          * `/kind dependencies`\n        status:\n          context: \"Kind Label\"\n          description:\n            success: Ready for review \u0026 merge.\n            failure: Missing kind label to generate release automatically.\n\n    - prefix: priority\n      multiple: false\n      list: [ \"urgent-now\", \"important-soon\" ]\n      author_association:\n        collaborator: true\n        member: true\n        owner: true\n\n  chat_ops:\n    - cmd: /close\n      type: close\n      author_association:\n        author: true\n        collaborator: true\n        member: true\n        owner: true\n\n    - cmd: /cc\n      type: none # does not trigger anything\n\n    - cmd: /request\n      type: review\n      author_association:\n        collaborator: true\n        member: true\n        owner: true\n\n    - cmd: /comment pr\n      type: comment\n      comment: |\n        @$AUTHOR: Hey this is comment pr example.\n```\n\n## Configuration\n\nYou can target `pull_request` or `issue` with `labels` and/or `chat_ops`.\n\n```yml\nversion: v1\n\nissue:\n  labels:\n  chat_ops:\n\npull_request:\n  labels:\n  chat_ops:\n```\n\n### Author Association\n\nAuthor association to restrict who can trigger the operation. You can use this for both `labels` and `chat_ops`\nin `issue` or `pull_request`.\n\n```yml\nversion: v1\n\nissue:\n  labels:\n    - prefix: triage\n      list: [ \"accepted\" ]\n      author_association:\n        author: false\n        collaborator: true\n        contributor: true\n        first_timer: false\n        first_time_contributor: false\n        mannequin: false\n        member: true\n        none: false\n        owner: true\n```\n\n### Labels\n\n```yml\nversion: v1\n\npull_request:\n  labels:\n    - prefix: kind\n      multiple: false\n      list: [ \"feature\", \"fix\", \"chore\", \"docs\", \"refactor\", \"dependencies\" ]\n      needs:\n        comment: |\n          @$AUTHOR: There are no 'kind' label on this PR. You need a 'kind' label to generate the release automatically.\n\n          * `/kind feature`\n          * `/kind ...`\n        status:\n          context: \"Governance/Kind\"\n          description:\n            success: Ready for review \u0026 merge.\n            failure: Missing kind label to generate release automatically.\n```\n\n### ChatOps: close\n\n```yml\nversion: v1\n\nissue:\n  chat_ops:\n    - cmd: /close\n      type: close\n```\n\n### ChatOps: review\n\nReview is only available for pull_request.\n\n```yml\nversion: v1\n\npull_request:\n  chat_ops:\n    # /request-review @john @ben @more\n    - cmd: /request-review\n      type: review\n```\n\n### ChatOps: assign\n\n```yml\nversion: v1\n\nissue:\n  chat_ops:\n    # /assign @john @ben @more\n    - cmd: /assign\n      type: assign\n```\n\n### ChatOps: none\n\nDoes nothing, might be useful to show it in governance.\n\n```yml\nversion: v1\n\nissue:\n  chat_ops:\n    - cmd: /cc\n      type: none\n```\n\n### ChatOps: comment\n\n* `$AUTHOR` is the user that send the /chat-ops, comment/issue/pull_request.\n* `$ISSUE_AUTHOR` is the user that owns the current issue/pull_request.\n\n```yml\nversion: v1\n\nissue:\n  chat_ops:\n    - cmd: /comment me\n      type: comment\n      comment: |\n        @$ISSUE_AUTHOR: Hey this is comment issue example for issue/pr author.\n        @$AUTHOR: Hey this is comment issue example for sender author.\n```\n\n### ChatOps: label\n\nAdd or remove labels via chat ops.\n\n```yml\nversion: v1\n\nissue:\n  chat_ops:\n    - cmd: /label me\n      type: label\n      label:\n        add: kind/me\n        remove: [ 'label/remove', 'label/that' ]\n```\n\n### Captures: Regex\n\nCapture labels based on regex, optionally validate them against github_release.\n\n```yml\nversion: v1\n\nissue:\n  captures:\n    - regex: \"- Version: *(.+)\"\n      github_release: true # validate against github_release\n      label: 'version/$CAPTURED'\n```\n\n## Development \u0026 Contribution\n\n\u003e IntelliJ IDEA is the IDE of choice for writing and maintaining this code library. IntelliJ's files are included for\n\u003e convenience with toolchain setup but usage of IntelliJ is optional.\n\n```shell\nnpm i # npm 7 is used\nnpm run all # to build/check/lint/package\n```\n\n* For any question please feel free to create an issue.\n* Pull request for non-breaking features are welcomed too!\n* Although all features were created specifically for [Birthday Research](https://github.com/BirthdayResearch) needs;\n  you should not limit yourself to our offering. Feel free to fork the project. Appreciate if you mention us!\n\n## Prior art\n\n* [Open Source Governance Models](https://gist.github.com/calebamiles/c578f88403b2fcb203deb5c9ef941d98)\n* [Kubernetes Prow](https://github.com/kubernetes/test-infra)\n* [jpmcb/prow-github-actions](https://github.com/jpmcb/prow-github-actions)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbirthdayresearch%2Foss-governance-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbirthdayresearch%2Foss-governance-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbirthdayresearch%2Foss-governance-bot/lists"}