Coder Social home page Coder Social logo

fvictorio / auto-assign-issue Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pozil/auto-assign-issue

0.0 1.0 0.0 25.83 MB

GitHub action that auto-assigns issues to a user or users

License: Creative Commons Zero v1.0 Universal

JavaScript 99.38% Shell 0.62%

auto-assign-issue's Introduction

GitHub action that auto-assigns issues to users or team members

CI Workflow codecov GitHub Marketplace

Inputs

Parameter Required Description
assignees only if teams is not specified Comma separated list of user names. Issue will be assigned to those users.
teams only if assignees is not specified Comma separated list of teams. Issue will be assigned to the team members.

Important Requirement: if using the teams input parameter, you need to use a personal access token with read:org scope (the default GITHUB_TOKEN is not enough).
numOfAssignee false Number of assignees that will be randomly picked from the teams or assignees. If not specified, assigns all users.

Examples

Here's an example flow that auto-assigns all new issues to two users randomly chosen from octocat, cat and dog :

name: Issue assignment

on:
    issues:
        types: [opened]

jobs:
    auto-assign:
        runs-on: ubuntu-latest
        steps:
            - name: 'Auto-assign issue'
              uses: pozil/[email protected]
              with:
                  assignees: octocat,cat,dog
                  numOfAssignee: 2

This other configuration assigns issues to a random member of the support team:

- name: 'Auto-assign issue'
    uses: pozil/[email protected]
    with:
        repo-token: ${{ secrets.MY_PERSONAL_ACCESS_TOKEN }}
        teams: support
        numOfAssignee: 1

Specifying a dynamic user

Instead of hardcoding the user name in the workflow, you can use a secret:

  • create a GitHub secret named DEFAULT_ISSUE_ASSIGNEE with the name of the user
  • use this value ${{ secrets.DEFAULT_ISSUE_ASSIGNEE }} instead of the username in the workflow.

auto-assign-issue's People

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.