Skip to content

Commit

Permalink
added-workflows
Browse files Browse the repository at this point in the history
- Add Issue templates
- Also PR templates
- Some greetings workflows
  • Loading branch information
Avdhesh-Varshney committed Jun 7, 2024
1 parent 03d046c commit b62cba7
Show file tree
Hide file tree
Showing 6 changed files with 211 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Bug Report 🐞
about: Reporting for any bug in the project.
title: '🐛: '
labels: ["Up-for-Grabs ✋", "bug 🐛"]
assignees:
- ''

---

:red_circle: **Title** :
:red_circle: **Bug** :
:red_circle: **Changes** : <!-- Explain the approach to handle this bug. -->


### Screenshots 📷
<!-- Write N/A if not available-->


***********************************************************************
:white_check_mark: **To be Mentioned while taking the issue :**
- Full name :
- What is your participant role? (Mention the Open Source Program name. Eg. GSOC, GSSOC, SSOC, JWOC, etc.)

***********************************************************************
Happy Contributing 🚀

All the best. Enjoy your open source journey ahead. 😎
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Questions
url: https://discord.gg/tSqtvHUJzE
about: You can join the discussions on Discord.
- name: Login does not work
url: https://github.com/Avdhesh-Varshney/Chanakya-Niti/blob/main/README.md
about: Before opening a new issue, please make sure to read README.md
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Enhancement Request 🧑‍💻
about: Improving any styling or documentation of the project.
title: '🧑‍💻: '
labels: ["Up-for-Grabs ✋", "enhancement 🧑‍💻"]
assignees:
- ''

---

:red_circle: **Title** :
:red_circle: **Enhancement Aim** :
:red_circle: **Changes** : <!-- Enlist those changes you want to do. -->


### Screenshots 📷
<!-- Write N/A if not available-->


***********************************************************************
:white_check_mark: **To be Mentioned while taking the issue :**
- Full name :
- What is your participant role? (Mention the Open Source Program name. Eg. GSOC, GSSOC, SSOC, JWOC, etc.)

***********************************************************************
Happy Contributing 🚀

All the best. Enjoy your open source journey ahead. 😎
52 changes: 52 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
Closes: <!-- #issue number -->

- **Title** :
- **Name:** <!--Mention Your name-->
- **Idenitfy yourself:** <!-- Mention your role (like GSOC, GSSOC, SSOC, etc. Contributor) -->


<!-- Mention the following details and these are mandatory -->

### Describe the add-ons or changes you've made 📃

Give a clear description of what have you added or modifications made


### Type of change ☑️
<!-- Please delete options that are not relevant. -->
What sort of change have you made:
<!--
Example how to mark a checkbox:-
- [x] My code follows the code style of this project.
-->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Code style update (formatting, local variables)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

### How Has This Been Tested? ⚙️
<!-- Describe how it has been tested
Describe how have you verified the changes made -->



### Checklist: ☑️
<!--
Example how to mark a checkbox:-
- [x] My code follows the code style of this project.
-->
- [ ] My code follows the [Contributing Guidelines](https://github.com/Avdhesh-Varshney/Chanakya-Niti/blob/main/README.md) & [Code of Conduct](https://github.com/Avdhesh-Varshney/Chanakya-Niti/blob/main/CODE_OF_CONDUCT.md) of this project.
- [ ] This PR does not contain plagiarized content.
- [ ] I have performed a self-review of my own code.
- [ ] I have commented my code, particularly wherever it was hard to understand.
- [ ] My changes generate no new warnings.


### Screenshots 📷
<!-- Must add the screenshot of the project or your changes for review your pr -->


### Note to reviewers 📄
<!-- Add notes to reviewers if applicable -->

36 changes: 36 additions & 0 deletions .github/workflows/auto-comment-pr-raise.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Auto Comment on PR

on:
pull_request_target:
types: [opened]

permissions:
issues: write
pull-requests: write

jobs:
comment:
runs-on: ubuntu-latest

steps:
- name: Add Comment to Pull Request
run: |
COMMENT=$(cat <<EOF
{
"body": "Thank you for submitting your pull request! We'll review it as soon as possible. For further communication, join our discord server https://discord.gg/tSqtvHUJzE."
}
EOF
)
RESPONSE=$(curl -s -o response.json -w "%{http_code}" \
-X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \
-d "$COMMENT")
cat response.json
if [ "$RESPONSE" -ne 201 ]; then
echo "Failed to add comment"
exit 1
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59 changes: 59 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: 'CodeQL'

on:
push:
branches: ['main']
pull_request:
branches: ['main']
schedule:
- cron: '32 8 * * 5'

jobs:
analyze:
name: Analyze (${{ matrix.language }})

runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: javascript-typescript
build-mode: none

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

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}

- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: '/language:${{matrix.language}}'

0 comments on commit b62cba7

Please sign in to comment.