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

Add GitHub Workflow #182

Merged
merged 4 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
30 changes: 30 additions & 0 deletions .github/workflows/auto-comment-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Issue Opened and Closed Comment

on:
issues:
types: [opened, closed]

jobs:
comment-on-issue:
runs-on: ubuntu-latest

steps:
- name: Check out the repository
uses: actions/checkout@v2

- name: Comment on Issue Opened
if: ${{ github.event.action == 'opened' }}
uses: actions-ecosystem/action-create-comment@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
issue_number: ${{ github.event.issue.number }}
body: |
Thanks for opening this issue! We appreciate your contribution. Please make sure you’ve provided all the necessary details and screenshots, and don't forget to follow our [Guidelines](https://github.com/OWNER/REPO/CONTRIBUTING.md) and Code of Conduct. Happy coding! 🚀
- name: Comment on Issue Closed
if: ${{ github.event.action == 'closed' }}
uses: actions-ecosystem/action-create-comment@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
issue_number: ${{ github.event.issue.number }}
body: |
This issue has been successfully closed. Thank you for your contribution and helping us improve the project! If you have any more ideas or run into other issues, feel free to open a new one. Happy coding! 🚀
22 changes: 22 additions & 0 deletions .github/workflows/auto-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Auto-label Issues and Pull Requests

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

jobs:
add-labels:
runs-on: ubuntu-latest

steps:
- name: Check out the repository
uses: actions/checkout@v2

- name: Add Labels to Issue or Pull Request
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: "gssoc-ext, hacktoberfest-accepted"
issue_number: ${{ github.event.issue.number || github.event.pull_request.number }}
25 changes: 25 additions & 0 deletions .github/workflows/detect-duplicate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Duplicate Issue Detection

on:
issues:
types: [opened]

jobs:
detect-duplicate:
runs-on: ubuntu-latest

steps:
- name: Check out the repository
uses: actions/checkout@v2

- name: Run Duplicate Issue Checker
uses: ahmadnassri/action-similar-issue@v1
id: duplicate-check
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
min-confidence: 0.8 # Confidence level for similarity (80%)

- name: Handle Duplicate Issues
if: steps.duplicate-check.outputs.similar == 'true'
run: |
gh issue close ${{ github.event.issue.number }} -c "Duplicate issue detected. Please refer to #${{ steps.duplicate-check.outputs.duplicate_issue_number }}."
15 changes: 15 additions & 0 deletions .github/workflows/greeting-new-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Greetings

on: [pull_request_target, issues]

jobs:
greeting:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: "Hi there! Thanks for opening this issue. We appreciate your contribution to this open-source project. We aim to respond or assign your issue as soon as possible. Stay awesome!"