Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrating a bot to close stale issues and assign reviewers #1854

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/ci-assign-reviewers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Review Assign

on:
pull_request:
types: [opened]

jobs:
assign:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Extract reviewers from CODEOWNERS
id: extract_reviewers
run: |
# Extract reviewers from CODEOWNERS
reviewers=$(grep -Eo '@\w+' CODEOWNERS | tr '\n' ',' | sed 's/,$//')
echo "REVIEWERS=$reviewers" >> $GITHUB_ENV

- name: Assign Reviewers
uses: hkusu/review-assign-action@v1
with:
reviewers: ${{ env.REVIEWERS }}
max-num-of-reviewers: 5
23 changes: 23 additions & 0 deletions .github/workflows/ci-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Issues Workflow
on:
issues:
types: ['opened']
jobs:
Opened-issue-label:
name: Adding Issue Label
runs-on: ubuntu-latest
steps:
- uses: Renato66/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
ignore-comments: true
default-labels: '["needs-triage"]'

Issue-Greeting:
name: Greeting Message to User
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: "Congratulations on making your first Issue! :confetti_ball: If you haven't already, check out our [Contributing Guidelines](https://github.com/kubearmor/KubeArmor/blob/main/contribution/contribution_guide.md) and [Issue Reporting Guidelines](https://github.com/kubearmor/KubeArmor/blob/main/contribution/issue_guide.md) to ensure that you are following our guidelines for contributing and making issues."
Manik2708 marked this conversation as resolved.
Show resolved Hide resolved
32 changes: 32 additions & 0 deletions .github/workflows/ci-stale-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Mark stale issues and pull requests

on:
schedule:
- cron: "0 0 * * *"

permissions:
issues: write
pull-requests: write

jobs:
stale:

runs-on: ubuntu-latest

steps:
- uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.'
stale-pr-message: 'This pull request did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please verify it has no conflicts with the develop branch and rebase if needed. Mention it now if you need help or give permission to other people to finish your work.'
close-issue-message: 'This issue did not get any activity in the past 180 days and thus has been closed. Please check if the newest release or develop branch has it fixed. Please, create a new issue if the issue is not fixed.'
close-pr-message: 'This pull request did not get any activity in the past 180 days and thus has been closed.'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
days-before-stale: 10
days-before-close: 180
remove-stale-when-updated: true
exempt-all-milestones: true
exempt-pr-labels: 'wip'
exempt-issue-labels: 'wip'
operations-per-run: 30
11 changes: 10 additions & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
#Kubearmor default reviewers
@Ankurk99 @achrefbensaad @PrimalPimmy
@Ankurk99
@achrefbensaad
@PrimalPimmy
@achrefbensaad
@kranurag7
@daemon1024
@nam-jaehyun
@nyrahul
@rksharma95
@DelusionalOptimist
Manik2708 marked this conversation as resolved.
Show resolved Hide resolved
25 changes: 25 additions & 0 deletions contribution/issue_guide.md
Manik2708 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Issue Report Guidelines

Thanks a lot for taking your time and contribute to KubeArmor! KubeArmor has some guidelines and template for raising the issue, we would appreceate if you will follow every guideline.

# Raising a new issue
1. Your issue may have already been created. Search for duplicate open issues before submitting yours.
2. Verify whether the issue has been fixed by trying to reproduce it using the latest main branch in the repository.
3. Click on the [`New Issue`](https://github.com/kubearmor/KubeArmor/issues/new/choose) button.
4. Use the templates to create a standardized report of what needs to be done and why.
5. Initially it will be added with a `needs-triage` label which will be removed once approved.
6. If you want to fix that issue or have a solution then ask to get assigned in the comments.

# Bug Report
This is crucial for making KubeArmor increasingly reliable. If you have encountered any bugs, please provide the steps to reproduce them and details about your environment (OS, cloud provider, etc.) so that they can be reviewed by the maintainers. If you are encountering any errors, kindly include the terminal output as well.

# Feature Request/Enhancement
Feature requests are welcome. But take a moment to find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the mentors of the merits of this feature. Please provide as much detail and context as possible.

# Security Vulnerability
This is the core of KubeArmor! There may be some security issues or vulnerabilities in the current approach, and we would be very grateful if you could identify and report them. A comprehensive template for reporting vulnerabilities is available; please ensure it is filled out thoroughly so that the issue can be addressed and resolved as quickly as possible.

# General Guidelines
1. Discuss issues in our various slack channels when necessary
2. Please do not derail or troll issues.
3. Keep the discussion on topic and respect the opinions of others.