Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
abhisek2004 committed Oct 22, 2024
2 parents 250e753 + 5b94c59 commit f53c8f1
Show file tree
Hide file tree
Showing 20 changed files with 4,656 additions and 254 deletions.
14 changes: 14 additions & 0 deletions .github/issue-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

labels:
bug:
- "bug"
- "error"
- "fail"
enhancement:
- "enhancement"
- "feature"
- "improvement"
documentation:
- "docs"
- "documentation"
- "readme"
16 changes: 16 additions & 0 deletions .github/workflows/greeting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
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: "👋 Thank you for raising an issue! We appreciate your effort in helping us improve. Our team will review it shortly. Stay tuned!"
pr-message: " 🎉 Thank you for your contribution! Your pull request has been submitted successfully. A maintainer will review it as soon as possible. We appreciate your support in making this project better"
18 changes: 10 additions & 8 deletions .github/workflows/issueLabel.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
name: issue labeler workflow

# .github/workflows/issue-labeler.yml
name: "Issue Labeler"
on:
issues:
types: ["opened"]
types: [opened, edited]

permissions:
issues: write
contents: read

jobs:
Issue-Labeler:
name: issue labeler
triage:
runs-on: ubuntu-latest
steps:
- uses: Renato66/[email protected]
- uses: github/[email protected]
with:
configuration-path: .github/issue-labeler.yml
repo-token: ${{ secrets.GITHUB_TOKEN }}
ignore-comments: true
default-labels: '["Triage"]'
58 changes: 58 additions & 0 deletions .github/workflows/pr-checker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: PR Issue Checker
# Created by @smog-root.
on:
pull_request:
types: [opened, edited]

jobs:
check_pr_details:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install dependencies (if needed)
run: pip install re # Install Python's regex library (not needed if using built-in)

- name: Check PR Description and Title
id: check_pr_details
run: |
python -c "
import re
import sys
import os

pr_description = os.getenv('GITHUB_EVENT_PULL_REQUEST_BODY', '')
pr_title = os.getenv('GITHUB_EVENT_PULL_REQUEST_TITLE', '')

# Check if PR description is present
if not pr_description:
print('PR description is missing.')
sys.exit(1)

# Check if the PR description contains 'Fixes #<issue-number>'
if not re.search(r'Fixes #[0-9]+', pr_description):
print('The PR description should include Fixes , Close, Closes, Closed , Fix , Fixed , Resolve , Resolves #<issue-number>.')
sys.exit(1)

# Check if the PR title starts with FIX, FEAT, or DOC
if not re.match(r'^(Fixes|Close|Closes|Closed|Fix|Fixed|Resolve|Resolves
Resolved)', pr_title):
print('The PR title should start with Fixes , Close, Closes, Closed , Fix , Fixed , Resolve , Resolves')
sys.exit(1)

print('PR description and title are valid.')
"
env:
GITHUB_EVENT_PULL_REQUEST_BODY: ${{ github.event.pull_request.body }}
GITHUB_EVENT_PULL_REQUEST_TITLE: ${{ github.event.pull_request.title }}
- name: Output result
run: echo "All checks passed."

2 changes: 2 additions & 0 deletions Backend_main/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.env
node_modules/
Loading

0 comments on commit f53c8f1

Please sign in to comment.