{"id":13529796,"url":"https://github.com/Renato66/auto-label","last_synced_at":"2025-04-01T17:31:01.261Z","repository":{"id":40290668,"uuid":"230553566","full_name":"Renato66/auto-label","owner":"Renato66","description":"Auto Label Issue Based on Issue Description","archived":false,"fork":false,"pushed_at":"2024-04-06T17:41:17.000Z","size":1113,"stargazers_count":48,"open_issues_count":7,"forks_count":10,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-14T07:22:47.609Z","etag":null,"topics":["action","auto-label","hacktoberfest","label"],"latest_commit_sha":null,"homepage":"https://renato66.github.io/auto-label/","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/Renato66.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"github":"Renato66"}},"created_at":"2019-12-28T03:36:13.000Z","updated_at":"2024-07-22T07:05:35.587Z","dependencies_parsed_at":"2023-02-05T03:01:31.046Z","dependency_job_id":"3bdf30d5-f6ee-44e2-86bd-5c279797d40d","html_url":"https://github.com/Renato66/auto-label","commit_stats":{"total_commits":71,"total_committers":4,"mean_commits":17.75,"dds":0.09859154929577463,"last_synced_commit":"69b3cbe79438b2079aed0a49474275d3e572cae5"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":"actions/container-toolkit-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Renato66%2Fauto-label","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Renato66%2Fauto-label/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Renato66%2Fauto-label/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Renato66%2Fauto-label/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Renato66","download_url":"https://codeload.github.com/Renato66/auto-label/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222505607,"owners_count":16994762,"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":["action","auto-label","hacktoberfest","label"],"created_at":"2024-08-01T07:00:39.480Z","updated_at":"2024-11-02T16:31:12.613Z","avatar_url":"https://github.com/Renato66.png","language":"TypeScript","funding_links":["https://github.com/sponsors/Renato66"],"categories":["Community Resources"],"sub_categories":["GitHub Tools and Management"],"readme":"# Auto-label\n\n[![GitHub Checks Workflow Status](https://img.shields.io/github/actions/workflow/status/Renato66/auto-label/checks.yml?logo=github\u0026label=Build)](https://github.com/Renato66/auto-label/actions/workflows/checks.yml)\n[![Auto Label](https://img.shields.io/github/actions/workflow/status/Renato66/auto-label/auto-label.yml?logo=github\u0026label=Auto%20Label)](https://github.com/Renato66/auto-label/actions/workflows/auto-label.yml)\n[![Codecov](https://img.shields.io/codecov/c/github/renato66/auto-label?logo=codecov)](https://codecov.io/gh/Renato66/auto-label)\n[![Usage](https://img.shields.io/badge/used_by-125-blue?logo=githubactions\u0026logoColor=FFF\u0026logoSize=small)](https://github.com/search?q=%22uses%3A+renato66%2Fauto-label%22+path%3A.github%2Fworkflows\u0026type=code)\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/Renato66/auto-label/assets/9284273/2913d95b-0c38-4183-9663-fb5c659fe851\"\u003e\n  \u003cimg alt=\"Example\" src=\"https://github.com/Renato66/auto-label/assets/9284273/b913689a-e1dd-4d04-85be-0d542199b7db\"\u003e\n\u003c/picture\u003e\n\nThe Auto label action will check for every new issue and automatically adds a label based on the body of the issue. This means that finding specific issues will be much easier.\n\n## Creating\n\nAdd a file to `.github/workflows/auto-label.yml`\n\n```yml\nname: Labeling new issue\non:\n  issues:\n    types: ['opened']\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n        with:\n          sparse-checkout: |\n            .github/workflows/auto-label.json5\n          sparse-checkout-cone-mode: false\n      - uses: Renato66/auto-label@v3\n        with:\n          repo-token: ${{ secrets.GITHUB_TOKEN }}\n```\n\nAdd a config file to `.github/workflows/auto-label.json5`\n\n```json5\n// see inputs for more examples\n{\n  labelsSynonyms: {\n    bug: ['error', 'need fix', 'not working'],\n    enhancement: ['upgrade'],\n    question: ['help', 'how can i']\n  },\n  labelsNotAllowed: [\n    'documentation',\n    'duplicate',\n    'good first issue',\n    'help wanted',\n    'invalid'\n  ],\n  defaultLabels: ['triage'],\n  ignoreComments: true\n}\n```\n\n## Inputs\n\n| Name               | Description                         | Required | Default                            |          Examples          |\n| ------------------ | ----------------------------------- | -------- | ---------------------------------- | :------------------------: |\n| repo-token         | GitHub token for the repository     | true     | -                                  | [...](#repo-token)         |\n| configuration-file | Configuration file path             | false    | .github/workflows/auto-label.json5 | [...](#configuration-file) |\n| ignore-comments    | Ignore labels inside issue comments | false    | true                               | [...](#ignore-comments)    |\n| labels-synonyms    | Text synonyms for labels            | false    | -                                  | [...](#labels-synonyms)    |\n| labels-not-allowed | Labels to ignore                    | false    | -                                  | [...](#labels-not-allowed) |\n| include-title      | Include title in labels search      | false    | true                               | [...](#include-title)      |\n| default-labels     | Labels that will always be set      | false    | -                                  | [...](#default-labels)     |\n| failover-labels    | Labels to set when no labels found  | false    | -                                  | [...](#failover-labels)    |\n\n### Repo Token\n\nRepo token is provided automatically by GitHub; just need to add\n\n```\nrepo-token: ${{ secrets.GITHUB_TOKEN }}\n```\n\n### Configuration File\n\nConfiguration file can be created at any place at your repository, it will need another [action](https://github.com/actions/checkout?tab=readme-ov-file#fetch-only-a-single-file) to get the file like:\n\n```yml\n      - uses: actions/checkout@v4\n        with:\n          sparse-checkout: |\n            .github/workflows\n```\n\nand it will look for any file named `auto-label` with the extension `JSON` or `JSON5` or `JSONC` but you can also define a specific extension\n\n```yml\n      - uses: actions/checkout@v4\n        with:\n          sparse-checkout: |\n            .github/workflows/auto-label.json5\n          sparse-checkout-cone-mode: false\n```\n\nto set another place to store your configuration file, you should checkout and point with `configuration-file` input:\n\n```yml\n      - uses: actions/checkout@v4\n        with:\n          sparse-checkout: |\n            src/actions/configuration.json\n          sparse-checkout-cone-mode: false\n      - uses: Renato66/auto-label@v3\n        with:\n          configuration-file: 'src/actions/configuration.json'\n```\n\n#### Change bot appearance\n\nIf you want to change who added the labels, you can provide a user token\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/Renato66/auto-label/assets/9284273/775b53f3-356d-4b7c-8c71-ed007beb6bf1\"\u003e\n  \u003cimg alt=\"Example\" src=\"https://github.com/Renato66/auto-label/assets/9284273/ab29c070-e511-4a25-ac34-784842b93d77\"\u003e\n\u003c/picture\u003e\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/Renato66/auto-label/assets/9284273/edc852c3-4962-475b-8da7-ac61bd340a2b\"\u003e\n  \u003cimg alt=\"Example\" src=\"https://github.com/Renato66/auto-label/assets/9284273/aedcdd0b-c538-437f-96cc-c4331a7c328c\"\u003e\n\u003c/picture\u003e\n\nThe [token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) will only need the `public_repo` scope\n\nYou will need to provide it as [secret](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) `GITHUB_USER_TOKEN`\nand update the issue.yml repo-token with:\n`repo-token: ${{ secrets.GITHUB_USER_TOKEN }}`\n\n### Ignore Comments\n\nIf you prefer to leave as default (true) You can provide a list of labels in a [template](https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser) for the author to choose which labels are available to pick\nBut if you prefer to set it as false, the author can set the labels inside a comment so it doesn't appear on issue body\n\n```json5\n// .github/workflows/auto-label.json5\n{\n  \"ignoreComments\": true\n}\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003eyml (deprecating)\u003c/summary\u003e\n\n  ```yml\n  ignore-comments: true\n  ```\n\u003c/details\u003e\n\n\n#### Scoped blocks\n\nYou can set a custom part of your issue/pr to be labeled using this structure:\n\n```\nSome text that could have a label that wouldn't be set\n\u003c!-- AUTO-LABEL:START --\u003e\nAnother text that could have a label and will be set as a label\n\u003c!-- AUTO-LABEL:END --\u003e\n```\n\nthanks to [@dielduarte](https://github.com/dielduarte) and [@PauloGoncalvesBH](https://github.com/PauloGoncalvesBH)\n\n### Labels Synonyms\n\nSometimes labels can be set upon other texts, as an example, if you have a label like `C: VCombobox` it would be hard to match the label in a normal issue, but you can provide a JSON to set it synonyms:\n\n```json5\n// .github/workflows/auto-label.json5\n{\n  \"labelsSynonyms\": {\"C: VCombobox\": [\"combobox\", \"v-combobox\", \"combo box\"]}\n}\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003eyml (deprecating)\u003c/summary\u003e\n\n  ```yml\n  labels-synonyms: '{\"C: VCombobox\":[\"combobox\",\"v-combobox\",\"combo box\"]}'\n  ```\n\u003c/details\u003e\n\n### Labels Not Allowed\n\nSome labels are restricted to repo owners such as `needs priority` `testing` `won't fix` they can be set in an Array form:\n\n```json5\n// .github/workflows/auto-label.json5\n{\n  \"labelsNotAllowed\": [\"needs priority\", \"testing\", \"won't fix\"]\n}\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003eyml (deprecating)\u003c/summary\u003e\n\n  ```yml\n  labels-not-allowed: '[\"needs priority\",\"testing\",\"won't fix\"]'\n  ```\n\u003c/details\u003e\n\n### Default Labels\n\nLabels that will always be set when an issue is created/updated such as `triage`, they can be set in an Array form:\n\n```json5\n// .github/workflows/auto-label.json5\n{\n  \"defaultLabels\": [\"needs priority\", \"testing\", \"won't fix\"]\n}\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003eyml (deprecating)\u003c/summary\u003e\n\n  ```yml\n  default-labels: '[\"triage\"]'\n  ```\n\u003c/details\u003e\n\n### Include Title\n\nIf you want to exclude the title in the labels search, you can set it as false:\n\n```json5\n// .github/workflows/auto-label.json5\n{\n  \"includeTitle\": false\n}\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003eyml (deprecating)\u003c/summary\u003e\n\n  ```yml\n  include-title: false\n  ```\n\u003c/details\u003e\n\n### Failover Labels\n\nLabels that will be set when an issue is created/updated they no labels found in the text, they will be set even if default labels are set\nthey can be set in an Array form:\n\n```json5\n// .github/workflows/auto-label.json5\n{\n  \"failoverLabels\": [\"need more information\"]\n}\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003eyml (deprecating)\u003c/summary\u003e\n\n  ```yml\n  failover-labels: '[\"need more information\"]'\n  ```\n\u003c/details\u003e\n\n\n## Badge\n\nTo add a badge simple replace \u003cOWNER\u003e, \u003cREPOSITORY\u003e and \u003cFILE-NAME\u003e name:\n\n```markdown\n[![Auto Label](https://img.shields.io/github/actions/workflow/status/\u003cOWNER\u003e/\u003cREPOSITORY\u003e/\u003cFILE-NAME\u003e.yml?logo=github\u0026label=Auto%20Label)](https://github.com/Renato66/auto-label)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRenato66%2Fauto-label","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRenato66%2Fauto-label","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRenato66%2Fauto-label/lists"}