Skip to content

Github action to label pull requests with lerna package names

License

Notifications You must be signed in to change notification settings

donmahallem/lerna-label

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

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

-----------------------------------------------------

@donmahallem/lerna-label

Test codecov GitHub license GitHub contributors

Tags Github Pull Requests with affected Lerna packages


-----------------------------------------------------

➤ Details

This action labels your pull requests based on modified files within the pull request. It takes the package name and adds an optional prefix to it before setting it as a label. Other labels should not be touched by this action.

-----------------------------------------------------

➤ Security Considerations

This action should be run on 'pull_request_target' events BUT consider to not checkout the target commit. For information about this read here. Additionally this prevents malicious actors to spam your repository with new tags!

-----------------------------------------------------

➤ Example Projects

This action is used for example by donmahallem/js-libs

-----------------------------------------------------

➤ Example Config

This config show cases a simple workflow to label pull requests with already known packages.

name: Workspace Package Labeler
on:
    pull_request_target:
        types: [opened, edited, synchronize]

jobs:
    label:
        name: Label Package Pull Requests
        runs-on: ubuntu-latest
        steps:
            - name: 'Checkout code'
              uses: actions/checkout@v2.3.4
            - name: Label the PR
              uses: donmahallem/lerna-label@0.1.16
              with:
                  github_secret: '${ { secrets.GITHUB_TOKEN } }'
                  prefix: 'pkg'

-----------------------------------------------------

➤ Contributors

donmahallem
donmahallem
💻
🐛