{"id":15048420,"url":"https://github.com/actions-ecosystem/action-add-labels","last_synced_at":"2025-04-12T20:46:45.558Z","repository":{"id":36990290,"uuid":"260786220","full_name":"actions-ecosystem/action-add-labels","owner":"actions-ecosystem","description":"🏷️ GitHub Action to add labels","archived":false,"fork":false,"pushed_at":"2024-05-16T07:30:55.000Z","size":737,"stargazers_count":122,"open_issues_count":42,"forks_count":46,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-04T00:09:35.442Z","etag":null,"topics":["actions","github","labels"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/actions-ecosystem-add-labels","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/actions-ecosystem.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-02T22:26:54.000Z","updated_at":"2025-03-01T13:03:54.000Z","dependencies_parsed_at":"2024-08-17T23:48:05.683Z","dependency_job_id":null,"html_url":"https://github.com/actions-ecosystem/action-add-labels","commit_stats":{"total_commits":47,"total_committers":9,"mean_commits":5.222222222222222,"dds":0.5106382978723405,"last_synced_commit":"1a9c3715c0037e96b97bb38cb4c4b56a1f1d4871"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions-ecosystem%2Faction-add-labels","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions-ecosystem%2Faction-add-labels/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions-ecosystem%2Faction-add-labels/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions-ecosystem%2Faction-add-labels/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/actions-ecosystem","download_url":"https://codeload.github.com/actions-ecosystem/action-add-labels/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631711,"owners_count":21136559,"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":["actions","github","labels"],"created_at":"2024-09-24T21:11:36.845Z","updated_at":"2025-04-12T20:46:45.538Z","avatar_url":"https://github.com/actions-ecosystem.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Action Add Labels\n\n[![actions-workflow-test][actions-workflow-test-badge]][actions-workflow-test]\n[![release][release-badge]][release]\n[![license][license-badge]][license]\n\n![screenshot](./docs/assets/screenshot.png)\n\nThis is a GitHub Action to add GitHub labels to an issue or a pull request.\n\nThis action extract the number from an issue or a pull request which has triggered this by default.\nIt means you don't need to care about something annoying like whether you should use `${{ github.event.issue.number }}` or `${{ github.event.pull_request.number }}`.\n\nIt would be more useful to use this with other GitHub Actions' outputs.\n\n## Inputs\n\n|      NAME      |                                           DESCRIPTION                                           |   TYPE   | REQUIRED |                                     DEFAULT                                     |\n| -------------- | ----------------------------------------------------------------------------------------------- | -------- | -------- | ------------------------------------------------------------------------------- |\n| `github_token` | A GitHub token.                                                                                 | `string` | `false`   | `${{ github.token }}`                                                                           |\n| `labels`       | The labels' name to be added. Must be separated with line breaks if there're multiple labels. | `string` | `true`   | `N/A`                                                                           |\n| `number`       | The number of the issue or pull request.                                                        | `number` | `false`  | `N/A`                                                                           |\n| `repo`         | The owner and repository name. e.g.) `Codertocat/Hello-World`                                   | `string` | `false`  | `${{ github.event.issue.number }}` or `${{ github.event.pull_request.number }}` |\n\n## Example\n\n### Add a single label with a comment\n\n```yaml\nname: Add Label\n\non:\n  issues:\n    types: opened\n\njobs:\n  add_label:\n    runs-on: ubuntu-latest\n    steps:\n      - name: checkout\n        uses: actions/checkout@v2\n\n      - name: add label\n        uses: actions-ecosystem/action-add-labels@v1\n        if: ${{ startsWith(github.event.comment.body, '/add-labels') }}\n        with:\n          labels: bug\n```\n\n### Add multiple labels with a comment\n\n```yaml\nname: Add Labels\n\non:\n  pull_request:\n    types: opened\n\njobs:\n  add_labels:\n    runs-on: ubuntu-latest\n    steps:\n      - name: checkout\n        uses: actions/checkout@v2\n\n      - name: add labels\n        uses: actions-ecosystem/action-add-labels@v1\n        if: ${{ startsWith(github.event.comment.body, '/add-labels') }}\n        with:\n          labels: |\n            documentation\n            changelog\n```\n\n## License\n\nCopyright 2020 The Actions Ecosystem Authors.\n\nAction Add Labels is released under the [Apache License 2.0](./LICENSE).\n\n\u003c!-- badge links --\u003e\n\n[actions-workflow-test]: https://github.com/actions-ecosystem/action-add-labels/actions?query=workflow%3ATest\n[actions-workflow-test-badge]: https://img.shields.io/github/workflow/status/actions-ecosystem/action-add-labels/Test?label=Test\u0026style=for-the-badge\u0026logo=github\n\n[release]: https://github.com/actions-ecosystem/action-add-labels/releases\n[release-badge]: https://img.shields.io/github/v/release/actions-ecosystem/action-add-labels?style=for-the-badge\u0026logo=github\n\n[license]: LICENSE\n[license-badge]: https://img.shields.io/github/license/actions-ecosystem/action-add-labels?style=for-the-badge\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factions-ecosystem%2Faction-add-labels","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factions-ecosystem%2Faction-add-labels","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factions-ecosystem%2Faction-add-labels/lists"}