Skip to content

Automatically add labels depending on Jekyll front matter attributes

License

Notifications You must be signed in to change notification settings

Pandapip1/jekyll-label-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

jekyll-label-action

Automatically adds labels depending on what files are modified in a pull request.

Usage

This action is meant to be used as a standalone workflow:

# File name: jekyll-label-action.yml
on:
  pull_request_target:

jobs:
  jekyll-label-action:
    name: Automatic Label Bot
    runs-on: ubuntu-latest
    
    steps:
      - uses: Pandapip1/jekyll-label-action@bfc2f4c2e738017a20b4822c229f02d1db79c59b
        with:
          token: ${{ secrets.GITHUB_TOKEN }}  # Valid GitHub token
          config-path: .jekyll-labels.yml          # Path to config file

Configuration

This action uses a configuration file (default: .jekyll-labels.yml). The format is simple:

label-to-apply: this?.new?.property == 'value'
"other-label-to-apply-that-requires-quotes": this?.old?.property2 == 'value2'
  • this.old refers to the parsed front matter of the pre-existing file in the repository that is changed or removed in the Pull Request.
  • this.new refers to the parsed front matter of the new file that is changed or added in the Pull Request.

See ethereum/EIPs for a proper example.

About

Automatically add labels depending on Jekyll front matter attributes

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project