Suvraneel / Automated-assign-labeler

MIT License
10 stars 6 forks source link

Automated-assign-labeler

Automated Self-assign + Key Labeler + Contributors workflow

This repository is a collection of numerous existing actions on marketplace bunched together to function ultra-efficiently.
All links to marketplace & usage here have been provided. This helps keep the repo clean, concise & out of chaos moderating the process right from the beginning (issue creation) to the end (PR merge/close)

Special Custom Action

Issue Manager

Avoids misuse of self-assigns by limiting the no. of issues that can be claimed by assignees


Featured Workflow Examples

1. Controlled Issue Self-Assigns

"More power to contributors, more power to the maintainers"

name: Assigner

on:
  issue_comment:
    types: [created]

jobs:
  slash_assign:
    # If the acton was triggered by a new comment that starts with `/assign`
    # or a on a schedule
    if: >
      (github.event_name == 'issue_comment' && startsWith(github.event.comment.body, '/assign')) || github.event_name == 'workflow_dispatch'
    runs-on: ubuntu-latest
    steps:
      - name: Assign the user or unassign stale assignments
        uses: JasonEtco/slash-assign-action@v0.0.3
        with:
          assigned_label: Assigned
          days_until_warning: 5
          days_until_unassign: 7
          stale_assignment_label: Stale
          assigned_comment: "This issue [has been assigned]({{ comment.html_url }}) to {{ comment.user.login }}!\nIt will become unassigned if it is nott closed within {{ totalDays }} days. A maintainer can also add the **{{ inputs.pin_label }}** label to prevent it from being unassigned."
          fail_comment: "This issue is already assigned to a contributor."

      - name: Message failure
        if: ${{ failure() }}
        uses: actions/github-script@v4
        with:
          script: |
            github.issues.createComment({
              issue_number: context.issue.number,
              owner: context.repo.owner,
              repo: context.repo.repo,
              body: 'The issue is already assigned!\nPlease find/create a new issue to contribute to.\nYou can safely disregard the failed workflow notification for this issue. ❌',
            });          
      - name: Checkout code
        uses: actions/checkout@main
      - name: Run Action
        uses: Suvraneel/Issue_Watcher@main
        with:
          token: "${{ secrets.GITHUB_TOKEN }}"
          author: "${{github.actor}}"
          repo: Suvraneel/Automated-assign-labeler #Change the Repo name
          maxIssue: 3

2. Generating dynamic formatted Contributors.md file

"Reward the contributors with an attribution"

jobs: contrib-readme-job: runs-on: ubuntu-latest name: A job to automate contrib in readme steps:


Features

Note- Issue Form (Beta) has been utilised here for keylabeler to work super-efficently


This repository is a collection of ALL features a large-scale opensource project maintainer could wish for... Based off actions already in the marketplace.

Open source project that is using this cool workflow :

GirlScript Winter of Contributing '21 Project repository with over 6000 participants, 1k stars & 1.7k forks. This actions combo has has helped the maintainers review & attend to issues & PRs in a very efficient & orderly fashion.