Skip to content

Github action to dynamically label pull requests affecting packages in a monorepo / workspace

License

Notifications You must be signed in to change notification settings

csi-lk/package-labeler

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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

package-labeler

Github action to dynamically label pull requests affecting packages in a monorepo / workspace

Usage

name: Workspace Package Labeler
on: [pull_request]

jobs:
  label:
    runs-on: ubuntu-latest
    steps:
      - uses: csi-lk/package-labeler
        with:
          repo-token: "${{ secrets.GITHUB_TOKEN }}"
          workspace: "packages" # (default)
          name: "folder" # (default) / 'package.json'
          prefix: "pkg: "

If any pull request code changes match ./packages/**/* they will be labeled per decendent folder with prefix of pkg:

For example if I have a folder structure of

packages/
    core/
        core.js
    tools/
        tools.js

And I make a code change to core.js the PR will be labelled with pkg: core

Example

csi-lk/test-labeler#1

You can see the changed files and how the github-actions bot as added the labels to the PR


Work inspired by the actions/labeler project from Github

About

Github action to dynamically label pull requests affecting packages in a monorepo / workspace

Resources

License

Stars

Watchers

Forks

Packages

No packages published