Skip to content

Commit 9169d47

Browse files
authored
Merge pull request #182 from aditiverma-21/main
Add GitHub Workflow
2 parents 4d33622 + 5faa007 commit 9169d47

File tree

4 files changed

+92
-0
lines changed

4 files changed

+92
-0
lines changed
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Issue Opened and Closed Comment
2+
3+
on:
4+
issues:
5+
types: [opened, closed]
6+
7+
jobs:
8+
comment-on-issue:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Check out the repository
13+
uses: actions/checkout@v2
14+
15+
- name: Comment on Issue Opened
16+
if: ${{ github.event.action == 'opened' }}
17+
uses: actions-ecosystem/action-create-comment@v1
18+
with:
19+
github_token: ${{ secrets.GITHUB_TOKEN }}
20+
issue_number: ${{ github.event.issue.number }}
21+
body: |
22+
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! 🚀
23+
- name: Comment on Issue Closed
24+
if: ${{ github.event.action == 'closed' }}
25+
uses: actions-ecosystem/action-create-comment@v1
26+
with:
27+
github_token: ${{ secrets.GITHUB_TOKEN }}
28+
issue_number: ${{ github.event.issue.number }}
29+
body: |
30+
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! 🚀

.github/workflows/auto-label.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Auto-label Issues and Pull Requests
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
pull_request:
7+
types: [opened]
8+
9+
jobs:
10+
add-labels:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Check out the repository
15+
uses: actions/checkout@v2
16+
17+
- name: Add Labels to Issue or Pull Request
18+
uses: actions-ecosystem/action-add-labels@v1
19+
with:
20+
github_token: ${{ secrets.GITHUB_TOKEN }}
21+
labels: "gssoc-ext, hacktoberfest-accepted"
22+
issue_number: ${{ github.event.issue.number || github.event.pull_request.number }}
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Duplicate Issue Detection
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
detect-duplicate:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Check out the repository
13+
uses: actions/checkout@v2
14+
15+
- name: Run Duplicate Issue Checker
16+
uses: ahmadnassri/action-similar-issue@v1
17+
id: duplicate-check
18+
with:
19+
repo-token: ${{ secrets.GITHUB_TOKEN }}
20+
min-confidence: 0.8 # Confidence level for similarity (80%)
21+
22+
- name: Handle Duplicate Issues
23+
if: steps.duplicate-check.outputs.similar == 'true'
24+
run: |
25+
gh issue close ${{ github.event.issue.number }} -c "Duplicate issue detected. Please refer to #${{ steps.duplicate-check.outputs.duplicate_issue_number }}."
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Greetings
2+
3+
on: [pull_request_target, issues]
4+
5+
jobs:
6+
greeting:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
issues: write
10+
pull-requests: write
11+
steps:
12+
- uses: actions/first-interaction@v1
13+
with:
14+
repo-token: ${{ secrets.GITHUB_TOKEN }}
15+
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!"

0 commit comments

Comments
 (0)