GithubHelp home page GithubHelp logo

workflows's Introduction

workflows

Bunch of re-useable workflows

Auto labeler

.github/workflows/auto_label.yml

This workflow will automatically label a PR with the appropriate labels based on the number of files changed within the PR.

You must define the labels to use and these labels must exist in your repo for adding to PRs

Three break points are defined:

  • Less than 10 files changed: Small
  • Between 10 and 50 files changed: Medium
  • More than 50 files changed: Large

TODO:

  • Make the breakpoints configurable
  • Determine label based off combination of files changed and number of lines changed
  • Better error handling
  • Handle more PR states than opened.

Example use:

name: Auto label PRs with size

# Run only when PR opened
on:
  pull_request:
    types: [ opened ]

jobs:
   call-label-workflow:
    uses: saasaTom/workflows/.github/workflows/auto-label.yml@1c8c328091c41934f3907894481b40d2b65cffb2 #main
    with:
      small_label: ๐Ÿคฉ small pr
      medium_label: ๐Ÿ˜… medium pr
      large_label: ๐Ÿ™ƒ large pr

workflows's People

Contributors

saasatom avatar renrutsirhc avatar

Watchers

James Cloos avatar  avatar

Forkers

renrutsirhc

workflows's Issues

Medium PR and Large PR label are the wrong way round

I just saw Jim's PR for Supplier Management - like the largest feature ever and it was labelled medium PR which I thought was weird! Just had a look at the code for this action and it's adding the label Large PR when between 11 and 50 files changed and medium PR when greater than 50 files changed. Large and Medium Labels need swapping in the if statement at the bottom.

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.