Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
November 24, 2021 07:59 am GMT

Automated Self-assigns Labeler Contributors list

My Workflow

This workflow 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 repository clean, concise & out of chaos, moderating the process right from the beginning (issue creation) to the end (PR merge/close)

Special Custom Action integrated

Issue Watcher

Avoids misuse of self-assigns by limiting the no. of issues that can be claimed by assignees (Unassigns after 3 by default)

Featured Workflow Examples

1. Controlled Issue Self-Assigns

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

name: Assigneron:  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/[email protected]        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 }}!
It 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!
Please find/create a new issue to contribute to.
You 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"

  • Sorted according to their contributions in the project
name: Contribute Liston:    push:        branches:            - main    workflow_dispatch:jobs:    contrib-readme-job:        runs-on: ubuntu-latest        name: A job to automate contrib in readme        steps:            - name: Contribute List              uses: akhilmhdh/[email protected]              with:                  readme_path: "contributors.md"              env:                  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Features

Here is a complete list of example workflows including several other automation tasks a maintainer might want to integrate in a large-scale opensource project.

  • Issue/PR Creation Actions

    • Greeting Action greets contributor
      • Example Workflow :Find the workflow file here
    • Self-assign using /assign and prevent rogue issue spammers by limiting number of self-assigns (by default, 3)
    • Example Workflow :Find the workflow file here
  • Issue/PR Auto Labeler

    Note - There are numerous labelers present in the marketplace. So, maintainers are requested to choose in accordance to project requirements. Consequently, a combination has been used here, in order to capture the best of both worlds.

    Types :

    • Labels issues based on keywords found in Issue/PR
      • Action deprecated, so Bot here (Recommended)
      • Configuration file here
    • Labels PRs based on extension of file changed
    • Labels PRs based on branch
    • Action here
  • On PR close

    • Finds & closes any linked issues to the PR
      • Example Workflow :Find the workflow file here
  • Close Stale Issues

  • Auto-updates Contributors list

    • Fetches top contributors & adds them to CONTRIBUTORS.md
      • Example Workflow :Find the workflow file here

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

Submission Category:

Maintainer Must-Haves

Link to Code Repo

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 providedThis 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 Watcher

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: Assigneron:  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

Additional Resources / Info

Hence, 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.

GitHub logo girlscript / winter-of-contributing

GirlScript Winter of Contributing is a three-month-long Open-Source Program organized byGirlScript Foundation to create the world's largest multilingual content repository that will be available to everyone.

GirlScript Winter of Contributing
Open Source Love GitHub license Contributor Covenant PRs Welcome



GirlScript Winter of Contributing is a three-month newly established initiative by GirlScript Foundation that will take place over the winter months. GWOC invites people to contribute their expertise and ideas in order to improve their technical abilities and obtain significant experience in the field of tech education.Throughout the program, the participants can contribute to a range of themes while being guided by an expert facilitator.The goal of GWOC is to develop the world's largest multilingual repository.

Contributing Guidelines

Please follow the contributing guidelines to contribute to the project.

Code of Conduct

This project and everyone participating in it is governed by the GirlScript Code of Conduct. By participating, you are expected to uphold this code





Original Link: https://dev.to/suvraneel/automated-self-assigns-labeler-contributors-list-51j4

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To