Skip to content

Commit

Permalink
Integrating Auto-assigner/labeler bot (girlscript#717)
Browse files Browse the repository at this point in the history
add bot to auto-assign labels and issues
  • Loading branch information
Suvraneel authored Sep 19, 2021
1 parent aa17a29 commit 7573cab
Show file tree
Hide file tree
Showing 9 changed files with 199 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<hr>

## Description 📜

<!-- Please describe the issue in brief. -->

<hr>

## Domain of Contribution 📊

<!----Please delete options that are not relevant.And in order to tick the check box just but x inside them for example [x] like this----->

- [ ] Android Dev (Flutter, Java, Kotlin)
- [ ] Backend Dev (Java, .NET, Python)
- [ ] C/CPP
- [ ] Competitive Programming
- [ ] Cyber Security
- [ ] DSA
- [ ] Database
- [ ] Datascience with Python
- [ ] Datascience with R
- [ ] Frontend Dev (HTML, CSS, JS)
- [ ] Frontend Dev (React, Angular, Vue)
- [ ] Golang
- [ ] Interview Prep
- [ ] Java
- [ ] JavaScript
- [ ] MERN
- [ ] Machine Learning
- [ ] Open Source
- [ ] Python
- [ ] Rust
- [ ] Statistics
- [ ] UI/UX

<hr>
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Fixes # <issue_number_here>
- [ ] UI/UX

<hr>

## Checklist ✅

<!----Please delete options that are not relevant.And in order to tick the check box just but x inside them for example [x] like this----->
Expand All @@ -63,4 +63,4 @@ Fixes # <issue_number_here>

## Screenshots / Gif (Optional) 📸

<hr>
<hr>
36 changes: 36 additions & 0 deletions .github/keylabeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Determines if we search the title (optional). Defaults to true.
matchTitle: true

# Determines if we search the body (optional). Defaults to true.
matchBody: true

# Determines if label matching is case sensitive (optional). Defaults to true.
caseSensitive: false

# Explicit keyword mappings to labels. Form of match:label. Required.
labelMappings:
Audio : Audio
Video : Video
Documentation : Documentation
Android Dev (Flutter, Java, Kotlin) : Android Dev (Flutter, Java, Kotlin)
Backend Dev (Java, .NET, Python) : Backend Dev (Java, .NET, Python)
C/CPP : C/CPP
Competitive Programming : Competitive Programming
Cyber Security : Cyber Security
DSA : DSA
Database : Database
Datascience with Python : Datascience with Python
Datascience with R : Datascience with R
Frontend Dev (HTML, CSS, JS) : Frontend Dev (HTML, CSS, JS)
Frontend Dev (React, Angular, Vue) : Frontend Dev (React, Angular, Vue)
Golang : Golang
Interview Prep : Interview Prep
Java : Java
JavaScript : JavaScript
MERN : MERN
Machine Learning : Machine Learning
Open Source : Open Source
Python : Python
Rust : Rust
Statistics : Statistics
UI/UX : UI/UX
22 changes: 22 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 7
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 8
# Issues with these labels will never be considered stale
exemptLabels:
- bug
- do not merge yet
- help wanted
- high priority
- pinned
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: >
Please reopen this issue once you commit the changes requested or
make improvements on the code. Thank you for your contributions.
20 changes: 20 additions & 0 deletions .github/workflows/Auto_Issue_Closer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Written By XZANATOL
name: Auto Issue Closer on Merge

on:
pull_request:
# Will trigger on closed PRs
types: [closed]

jobs:
Close_Issue:

runs-on: ubuntu-latest
# Checks if PR is merged (subflag)
if: ${{ github.event.pull_request.merged == true }}

steps:
- name: Closes issues related to a merged pull request.
uses: ldez/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19 changes: 19 additions & 0 deletions .github/workflows/Issue_watcher.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Issue_watcher

on:
issues:
types: [opened]

jobs:
first-job:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@main
- name: Run Action
uses: Suvraneel/Issue_Watcher@main
with:
token: "${{ secrets.GITHUB_TOKEN }}"
author: "${{github.actor}}"
repo: girlscript/winter-of-contributing #Change the Repo name
maxIssue: 3
22 changes: 22 additions & 0 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Greetings

on:
issues:
types: [opened]
pull_request:
types: [opened]

jobs:
greeting:
runs-on: ubuntu-latest
steps:
- uses: Saviour1001/Greeting-action@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
issue_message: 'Hello @${{github.actor}}, <br>
Thank you for opening an issue. :octocat: <br>
To get assigned to this particular issue please use <b>/assign</b><br>
<i> Check this <a href="https://github.com/girlscript/winter-of-contributing/blob/main/.github/CONTRIBUTING.md">guide</a> before contributing.'
PR_message:
'<h1> :fleur_de_lis: Congratulations </h1> :octocat:
Thank you @${{github.actor}} for taking out your time and contributing to GWOC21. Our team will review this soon and if everything looks good it will be merged. :heavy_check_mark:'
24 changes: 24 additions & 0 deletions .github/workflows/issue-assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Assigner

on:
schedule:
- cron: '*/2 * * * *'
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 == 'schedule' || 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: Open
18 changes: 18 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Mark Stale Issues and Pull Requests
on:
schedule:
- cron: "0 0 * * *"
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: >
Please reopen this issue once you add more information and updates here.
stale-pr-message: >
Please reopen this pull request once you commit the changes requested
or make improvements on the code.Thank you for your contributions!
stale-issue-label: "no-issue-activity"
stale-pr-label: "no-pr-activity"

0 comments on commit 7573cab

Please sign in to comment.