{"id":13596203,"url":"https://github.com/github/issue-labeler","last_synced_at":"2025-05-15T09:05:02.362Z","repository":{"id":37544429,"uuid":"233953071","full_name":"github/issue-labeler","owner":"github","description":"An action for automatically labelling issues","archived":false,"fork":false,"pushed_at":"2024-12-24T08:48:27.000Z","size":2536,"stargazers_count":212,"open_issues_count":11,"forks_count":54,"subscribers_count":70,"default_branch":"master","last_synced_at":"2025-04-07T04:11:42.590Z","etag":null,"topics":[],"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/github.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-14T23:03:36.000Z","updated_at":"2025-04-03T03:08:30.000Z","dependencies_parsed_at":"2024-01-16T20:54:29.685Z","dependency_job_id":"62ace837-79a6-4532-a82d-44c76f22740a","html_url":"https://github.com/github/issue-labeler","commit_stats":{"total_commits":46,"total_committers":19,"mean_commits":"2.4210526315789473","dds":0.5869565217391304,"last_synced_commit":"98b5412841f6c4b0b3d9c29d53c13fad16bd7de2"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fissue-labeler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fissue-labeler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fissue-labeler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fissue-labeler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github","download_url":"https://codeload.github.com/github/issue-labeler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248602275,"owners_count":21131613,"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-01T16:02:11.947Z","updated_at":"2025-04-14T13:51:11.629Z","avatar_url":"https://github.com/github.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Issue Labeler\n\nIssue labeler will label issues based on the body content of the issue.\n\n## Usage\n\n### Create `.github/labeler.yml`\n\nCreate a `.github/labeler.yml` file with a list of labels and regex to match to apply the label.\n\nThe key is the name of the label in your repository that you want to add (eg: \"merge conflict\", \"needs-updating\") and the value is the regular expression for when to apply the label. Should the regular expression not match, the label will be removed.\n\n#### Basic Examples\n\n```yml\n# Add/remove 'critical' label if issue contains the words 'urgent' or 'critical'\ncritical:\n    - '(critical|urgent)'\n```\n\n#### Label All Issues\n\n```yml\n# Add 'critical' label to any issue that gets opened\ncritical:\n    - '/.*/'\n```\n\n### Create Workflow\n\nCreate a workflow (eg: `.github/workflows/labeler.yml` see [Creating a Workflow file](https://docs.github.com/en/actions/use-cases-and-examples/creating-an-example-workflow) ) to utilize the labeler action with content:\n\n```yml\nname: \"Issue Labeler\"\non:\n  issues:\n    types: [opened, edited]\n\npermissions:\n  issues: write\n  contents: read\n\njobs:\n  triage:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: github/issue-labeler@v3.3 #May not be the latest version\n      with:\n        configuration-path: .github/labeler.yml\n        not-before: 2020-01-15T02:54:32Z\n        enable-versioned-regex: 0\n        repo-token: ${{ github.token }}\n```\n\n`not-before` is optional and will result in any issues prior to this timestamp to be ignored.\n\n### Example using versioned issue templates\n\nAs you iterate on your regular expressions, since maybe your issue template gets updated, this can have an impact on existing issues. The below allows you to version your regular expression definitions and pair them with issue templates.\n\nBelow is the body of an example issue which has the version identifier `issue_labeler_regex_version` embedded.\n\n```md\n\u003c!--\nissue_labeler_regex_version=1\n--!\u003e\n\nI have an urgent issue that requires someone's attention.\n```\n\nBelow is the workflow file\n\n```yml\nname: \"Issue Labeler\"\non:\n  issues:\n    types: [opened, edited]\n\npermissions:\n  issues: write\n  contents: read\n\njobs:\n  triage:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: github/issue-labeler@v3.3 #May not be the latest version\n      with:\n        configuration-path: .github/labeler.yml\n        not-before: 2020-01-15T02:54:32Z\n        enable-versioned-regex: 1\n        versioned-regex: 'issue_labeler_regex_version=(\\d+)'\n        body-missing-regex-label: 'broken-template'\n        repo-token: ${{ github.token }}\n```\n\nWhen the issue is evaluated it'll look for `.github/labeler-v1.yml` based on the `configuration-path` and the version number set in the issue.\n\nWhen you reach a point where you'd like to update your labels and regular expressions and it could cause a conflict with historic issues, simply update your issue template to include `issue_labeler_regex_version=2` and create the file `.github/labeler-v2.yml`. The issue will automatically be matched to the correct set of regular expressions.\n\nSet `versioned-regex` to any valid regular expression that should be used to capture the version number from the issue. The first match will be used should multiple be found.\n\nSet `body-missing-regex-label` to the name of the label that should be added to an issue where the specified `version-regex` can't be found. This is useful for when your users accidentally delete this value. Leave this blank if you don't want to use this functionality.\n\n### Pull request support\n\nThe labeler action is also available for pull requests. Make sure the workflow is triggered by pull requests.\n\n```yml\non:\n  pull_request:\n    types: [opened, edited]\n```\n\n### Example including the issue title in the regex target\n\nSet `include-title` to `1` to include the issue title in addition to the body in the regular expression target.\n\n```yml\nname: \"Issue Labeler\"\non:\n  issues:\n    types: [opened, edited]\n\npermissions:\n  issues: write\n  contents: read\n\njobs:\n  triage:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: github/issue-labeler@v3.3 #May not be the latest version\n      with:\n        configuration-path: .github/labeler.yml\n        enable-versioned-regex: 0\n        include-title: 1\n        repo-token: ${{ github.token }}\n```\n\n### Example of *only* including the issue title, but not the body in the regex target\n\nSet `include-title: 1` and `include-body: 0`.\n\n```yml\nname: \"Issue Labeler\"\non:\n  issues:\n    types: [opened, edited]\n\npermissions:\n  issues: write\n  contents: read\n\njobs:\n  triage:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: github/issue-labeler@v3.3 #May not be the latest version\n      with:\n        configuration-path: .github/labeler.yml\n        include-title: 1\n        include-body: 0\n```\n\n### Syncing Labels\n\nBy default, labels that no longer match are not removed from the issue. To enable this functionality, explicity\nset `sync-labels` to `1`.\n\n```yml\njobs:\n  triage:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: github/issue-labeler@v3.3\n      with:\n        configuration-path: .github/labeler.yml\n        enable-versioned-regex: 0\n        sync-labels: 1\n        repo-token: ${{ github.token }}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fissue-labeler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub%2Fissue-labeler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fissue-labeler/lists"}