attach-labels

🏷️ A GitHub Action that attach label(s) to a PR or an Issue.

MIT License

Stars
2

Attach Labels

A GitHub Action that attach label(s) to a PR or an Issue. This action extract the number from a pull request or issue by default. You don't need to specify the pull request number by ${{ github.event.pull_request.number }} or ${{ github.event.issue.number }} by your own. Very simple!

Usage

1. With comma seperated labels list

      - name: Add labels
        uses: KeisukeYamashita/attach-labels@v1
        with:
          labels: hello,bye

2. With line break seperated labels list

This is just an example to show one way in which this action can be used.

on: pull_request
jobs:
  auto-merge:
    - name: Merge
      uses: KeisukeYamashita/attach-labels@v1
      with: |
        hello
        bye

Action inputs

Name Description Default
labels Label to attach. Either line break seperated of comma seperated -(Required)
repostiory The GitHub repository containing the pull request Current repository
number The number of the pull request. github.event.pull_request.number or github.event.issue.number
token GITHUB_TOKEN or a repo scoped PAT. GITHUB_TOKEN

Action outputs

Nothing.

License

MIT