{"id":13529625,"url":"https://github.com/Decathlon/pull-request-labeler-action","last_synced_at":"2025-04-01T16:31:40.910Z","repository":{"id":49142636,"uuid":"192929672","full_name":"Decathlon/pull-request-labeler-action","owner":"Decathlon","description":":zap: Github action to label your pull requests auto-magically :sparkles:(using committed files)","archived":true,"fork":false,"pushed_at":"2023-05-15T07:28:24.000Z","size":441,"stargazers_count":95,"open_issues_count":9,"forks_count":16,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-15T22:42:28.861Z","etag":null,"topics":["github-actions","labels","project-management","projects","typescript"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/pr-label-by-files","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/Decathlon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-06-20T13:57:24.000Z","updated_at":"2024-07-31T22:57:59.000Z","dependencies_parsed_at":"2024-01-10T23:02:22.694Z","dependency_job_id":"63fe21ab-b60a-4ee8-9626-226f04a8787a","html_url":"https://github.com/Decathlon/pull-request-labeler-action","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Decathlon%2Fpull-request-labeler-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Decathlon%2Fpull-request-labeler-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Decathlon%2Fpull-request-labeler-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Decathlon%2Fpull-request-labeler-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Decathlon","download_url":"https://codeload.github.com/Decathlon/pull-request-labeler-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246670549,"owners_count":20815003,"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":["github-actions","labels","project-management","projects","typescript"],"created_at":"2024-08-01T07:00:37.968Z","updated_at":"2025-04-01T16:31:40.582Z","avatar_url":"https://github.com/Decathlon.png","language":"TypeScript","readme":"# THIS ACTION IS DEPRECATED AND ARCHIVED.\n# You should not use it anymore, A better alternative is https://github.com/actions/labeler\n\n\n## DEPRECATED, do not use anymore\n\n\n### Readme kept as archive\n\n---\n\n\n\n\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/Decathlon/pull-request-labeler-action/raw/master/assets/intro.png\" alt=\"Result illustration\"/\u003e\u003cbr\u003e\n  \u003ca href=\"https://app.fossa.io/projects/git%2Bgithub.com%2FDecathlon%2Fpull-request-labeler-action?ref=badge_shield\"\u003e\u003cimg src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2FDecathlon%2Fpull-request-labeler-action.svg?type=shield\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://circleci.com/gh/Decathlon/pull-request-labeler-action/tree/master\"\u003e\u003cimg src=\"https://circleci.com/gh/Decathlon/pull-request-labeler-action.svg?style=svg\"\u003e\u003c/a\u003e\n  \u003cbr\u003e\u003cbr\u003e\n  This repository provides a GitHub action to \u003cstrong\u003eautomatically label a pull request\u003c/strong\u003e based on committed files.\n\u003c/p\u003e\n\n**Table of Contents**\n\n- [Common usage](#common-usage)\n- [Breaking change](#breaking-change)\n- [Startup](#startup)\n  - [Configuration](#configuration)\n  - [Use GitHub action](#use-github-action)\n    - [Settings for v1.0.0+ release (deprecated)](#settings-for-v100-release-deprecated)\n    - [Settings for v2.0.0+ release](#settings-for-v200-release)\n- [Contributing](#contributing)\n  - [Commands](#commands)\n- [License](#license)\n\n## Common usage\n\nWhen pushing, the action will be triggered and will look for committed files over your branch.\nIt applies configured labels whenever it find a file whose name matches the associated regular expression.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/Decathlon/pull-request-labeler-action/raw/master/assets/screenshot.png\" alt=\"Expected result after processing\"/\u003e\n  \u003cimg src=\"https://github.com/Decathlon/pull-request-labeler-action/raw/master/assets/log.png\" alt=\"Action log messages\"/\u003e\n\u003c/p\u003e\n\n## Breaking change\n\nStarting from August 2019, GitHub switch [Actions syntax from HCL to YAML](https://help.github.com/en/articles/migrating-github-actions-from-hcl-syntax-to-yaml-syntax).\nThe previous syntax will no longer be supported by GitHub on September 30, 2019.\n\nAs a consequence, __please use v2.0.0+__ release and note that __all v1.x.x are deprecated__ and will no longer work on September 30, 2019.\n\n## Startup\n\n### Configuration\n\nCreate a file into your root project directory: `.github/label-pr.yml`:\n```yaml\n- regExp: \".*\\\\.ts+$\"\n  labels: [\"typescript\"]\n- regExp: \".*\\\\.sql+$\"\n  labels: [\"database\", \"critical\"]\n- regExp: \".*\\\\.md+$\"\n  labels: [\"documentation\"]\n- regExp: \"^(pom\\\\.xml|package\\\\.json|build\\\\.gradle)$\"\n  labels: [\"dependencies\"]\n- regExp: \".*\\\\.(zip|jar|war|ear)+$\"\n  labels: [\"artifact\", \"invalid\"]\n```\n_This is a sample to illustrate how you can customize your settings by configuring your own regex and labels_\n\nThe configuration is made of a list of `Filter` which are composed of:\n- `regExp`: a regular expression which will be tested over the filenames\n- `labels`: a list of labels to apply if the filenames match\n\nIf the labels do not exist yet in your repository configuration, they will be created anyway.\n\n### Use GitHub action\n\n#### Settings for v1.0.0+ release (deprecated)\n\nCreate a file into your root project directory (if it does not exist yet): `.github/main.workflow`:\n```\nworkflow \"New workflow\" {\n  resolves = [\"PR label by Files\"]\n  on = \"pull_request\"\n}\n\naction \"PR label by Files\" {\n  uses = \"decathlon/pull-request-labeler-action@v1.0.0\"\n  secrets = [\"GITHUB_TOKEN\"]\n}\n```\n\n#### Settings for v2.0.0+ release\n\nCreate a file into your root project directory: `.github/workflows/labeler.yml`:\n```yaml\n# Workflow to associate labels automatically\nname: labeler\n# Trigger the workflow on pull request events\non: [pull_request]\njobs:\n  label:\n    runs-on: ubuntu-18.04\n    steps:\n      # We need to checkout the repository to access the configured file (.github/label-pr.yml)\n      - uses: actions/checkout@v2\n      - name: Labeler\n        uses: docker://decathlon/pull-request-labeler-action:2.0.0\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          # Here we can override the path for the action configuration. If none is provided, default one is `.github/label-pr.yml`\n          CONFIG_PATH: ${{ secrets.GITHUB_WORKSPACE }}/.github/label-pr.yml\n```\n\n_Please note that you can move the label-pr.yml to another location, if so, then do not forget to update the above **CONFIG_PATH**_ variable.\n\n## Contributing\n\n- The project is built using [Typescript](https://www.typescriptlang.org/) # `3.5.2`\n- We use a [tslint](https://palantir.github.io/tslint/) as a linter for defining code style which configuration may change\n- We use [Jest](https://jestjs.io/) as the testing framework\n\nTo start, you just need to clone the repository and open it in your favorite IDE.\nYou may need to set it up so it uses the node configuration (`package.json`) and tslint configuration (`tslint.json`).\n\n### Commands\n- To run unit tests: `npm run test:watch`\n- To build: `npm run build:main`\n","funding_links":[],"categories":["Community Resources","TypeScript"],"sub_categories":["GitHub Tools and Management"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDecathlon%2Fpull-request-labeler-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDecathlon%2Fpull-request-labeler-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDecathlon%2Fpull-request-labeler-action/lists"}