https://github.com/nodejs/node-pr-labeler
GitHub Action used by the nodejs/node repository to automatically label pull requests
https://github.com/nodejs/node-pr-labeler
Last synced: 9 months ago
JSON representation
GitHub Action used by the nodejs/node repository to automatically label pull requests
- Host: GitHub
- URL: https://github.com/nodejs/node-pr-labeler
- Owner: nodejs
- License: mit
- Created: 2021-02-28T20:55:11.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-12-21T07:52:49.000Z (over 1 year ago)
- Last Synced: 2025-09-24T00:34:14.297Z (10 months ago)
- Language: JavaScript
- Homepage: https://github.com/nodejs/node
- Size: 212 KB
- Stars: 3
- Watchers: 3
- Forks: 5
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# node-pr-labeler
GitHub Action applying labels to [nodejs/node pull requests](https://github.com/nodejs/node/pulls) based off of files have been changed.
_Previously part of the [nodejs-github-bot](https://github.com/nodejs/github-bot). Extracted to make it easier for Node.js collaborators to maintain the label rules themselves._
## Usage
Two parts are needed to make use of this Action:
1. GitHub Action Workflow triggered by pull requests opened in the target repository
2. A `.yml` configuration file declaring the rules for filepath -> labels
### 1. GitHub Action Workflow
```yml
name: Label PRs
on:
pull_request_target:
types: [opened]
jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: nodejs/node-pr-labeler@v1
with:
configuration-path: .github/pr-labels.yml
```
### 2. `.yml` configuration with filepath -> label rules
[`.github/pr-labels.yml`](.github/pr-labels.yml) acts as an example and used in the test suite of this GitHub Action.
This configuration file is part of the using repository, allowing its collaborators to maintain the labelling rules, close to the source code they relate to.
## License
[MIT](https://opensource.org/licenses/MIT)