Skip to content

πŸ‘©β€πŸ‘§β€πŸ‘¦ A GitHub action that mirrors a parent issue's labels to a child issue.

License

Notifications You must be signed in to change notification settings

TinkurLab/mirror-labels-to-child-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

πŸ‘©β€πŸ‘§β€πŸ‘¦ Mirror Labels to Child - GitHub Action

A GitHub Action that mirrors labels from a parent issue to it's children issues πŸ‘©β€πŸ‘§β€πŸ‘¦. The action supports the child keywords supported by actions-playground - child #<issue_number>, child to #<issue_number>, child of #<issue_number>. The child <owner>/<repo>#<issue_number> syntax is also supported for cross repo relationships.

How It Works

This GitHub Action runs when an issues event webhook is fired in your GitHub repo. The action checks if there is a parent / child relationship between the issue and another issue. If so, the action mirrors labels from the parent issue to the child issue.

Notes:

  • If a label is removed from a parent issue, the label is is not removed from the child issue.
  • If a label is added to the parent issue, it will be applied to the child issue the next time the child is edited.
  • If a child has multiple parents, only the lables from the child's first parent are mirrored to the child.

Examples

Example of parent issue with labels: GitHub Logo

Example of child issue of parent issue with labels mirrored from parent issue: GitHub Logo

Installation

To use this GitHub Action, you must have access to GitHub Actions. GitHub Actions are currently only available in private beta (you must apply for access) and only work in private repos.

To setup this action:

  1. Create a .github/worksflows/main.yml in your GitHub repo (more info).
  2. Add the following code to the main.yml file and commit it to the repo's master branch.
name: Mirror Labels to Child Issue

on: issues

jobs:
  mirrorLabels:
    name: Mirror Labels to Child Issue
    runs-on: ubuntu-latest
    steps:
      - name: Label PRs
        uses: tinkurlab/mirror-labels-to-child-action@master
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  1. Whenever you create, update, close, or reopen an issue, the action will run!

Contributing

If you have suggestions for how this GitHub Action could be improved, or want to report a bug, open an issue! Or pull request! We'd love all and any contributions. For more, check out the Contributing Guide.

License

ISC Β© 2022 Adam Zolyak [email protected] (www.tinkurlab.com)

analytics

About

πŸ‘©β€πŸ‘§β€πŸ‘¦ A GitHub action that mirrors a parent issue's labels to a child issue.

Resources

License

Stars

Watchers

Forks

Packages

No packages published