Coder Social home page Coder Social logo

calcom / team-label-action Goto Github PK

View Code? Open in Web Editor NEW

This project forked from equitybee/team-label-action

2.0 1.0 0.0 774 KB

โšก๏ธ Auto-label PRs based on the author's team memberships ๐Ÿ‘ฅ

License: Apache License 2.0

Shell 1.09% JavaScript 3.46% TypeScript 95.45%

team-label-action's Introduction

Warning Fork to only use the Root Organisation, not subteams

Auto-label PRs based on teams ๐Ÿท๐Ÿ‘ฅ

Use this Github action to automatically add a label to PRs based on the teams the PR author belongs to.

Why did we build this?

At EquityBee, we use a large monorepo where multiple teams/squads collaborate. Due to Github's PR filtering limitations, we built this action to easily filter PRs based on the author's team membership.

For the action to work, the author must be a member of a team on Github.

How to use

Under .github/workflows create a new .yml file to run the action on every PR:

name: Assign PR team labels
on:
  pull_request:
    branches:
      - main

jobs:
  team-labels:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: equitybee/team-label-action@main
        with:
          repo-token: ${{ secrets.TOKEN }}
          organization-name: YOUR_ORGANIZATION_NAME

Make sure to add the relevant inputs:

  • repo-token is your ${{ secrets.GITHUB_TOKEN }}. You may encounter an error where this token does not have the necessary permissions to access an organization or teams. At EquityBee, we use PATs (Personal Access Token) instead. Create a personal access token with the repo or public_repo scopes enabled, and add the token as an encrypted secret for the repository or organization
  • organization-name is the name/slug of your Github organization (it comes right after https://github.com/)
  • ignore-labels is an optional, comma-separated list of labels to ignore

Internal use

You may wonder why Husky is running a pre-commit script: we are copying its contents directly in our monorepo. Husky makes sure the dist/ directory always contains the latest, built action.

Next steps

  • add tests

License

Apache-2 ยฉ EquityBee

team-label-action's People

Contributors

dependabot[bot] avatar drummerjolev avatar namoscato avatar peerrich avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.