Skip to content

Commit

Permalink
done
Browse files Browse the repository at this point in the history
  • Loading branch information
Ojas-Arora committed Dec 24, 2024
1 parent c219eb6 commit 5a77ee1
Show file tree
Hide file tree
Showing 11 changed files with 256 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "🐞 Bug Report"
description: "Create a report to help us improve"
title: "BUG:"
labels: ["Bug"]
body:
- type: checkboxes
attributes:
label: "Is there an existing issue for this?"
description: "Please search to see if an issue already exists for the bug you encountered."
options:
- label: "I have searched the existing issues"
required: true
- type: textarea
attributes:
label: "What went down?"
description: "A concise description of what you're experiencing."
validations:
required: true
- type: checkboxes
attributes:
label: "Record"
options:
- label: "I agree to follow this project's Contributing.md"
required: true
- label: "I'm a Hacktoberfest contributor"
required: true
- label: "I want to work on this issue"
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "📑 Documentation Update"
description: "Improve Documentation"
title: "DOC:"
labels: [DOC, Needs Triage]
body:
- type: textarea
attributes:
label: "What's wrong with the existing documentation"
description: "Which things do we need to add or delete"
validations:
required: true
- type: textarea
attributes:
label: "Add ScreenShots"
description: "Add sufficient SS to explain your issue."
validations:
required: false

- type: checkboxes
attributes:
label: "Record"
options:
- label: "I agree to follow this project's Contributing.md"
required: true
- label: "I'm a Hacktoberfest contributor"
required: true
- label: "I want to work on this issue"
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "✨ Feature Request"
description: "Suggest an idea for this project "
title: "Feat:"
labels: [Feat, Needs Triage]
body:
- type: textarea
attributes:
label: "Describe the feature"
description:
validations:
required: true
- type: textarea
attributes:
label: "Add ScreenShots"
description: "Add sufficient SS to explain your issue."
validations:
required: true
- type: checkboxes
attributes:
label: "Record"
options:
- label: "I agree to follow this project's Contributing.md"
required: true
- label: "I'm a Hacktoberfest contributor"
required: true
- label: "I want to work on this issue"
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
open-pull-requests-limit: 30
schedule:
interval: "daily"
# Check for npm updates everyday
26 changes: 26 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## Related Issue
Fixes #[IssueNumber]

## Description
[Please include a brief description of the changes or features added]

## Type of PR

- [ ] Bug fix
- [ ] Feature enhancement
- [ ] Documentation update
- [ ] Other (specify): _______________

## Screenshots / videos (if applicable)
[Attach any relevant screenshots or videos demonstrating the changes]

## Checklist:
- [ ] I have performed a self-review of my code
- [ ] I have read and followed the Contribution Guidelines.
- [ ] I have tested the changes thoroughly before submitting this pull request.
- [ ] I have provided relevant issue numbers, screenshots, and videos after making the changes.
- [ ] I have commented my code, particularly in hard-to-understand areas.
<!-- [X] - put a cross/X inside [] to check the box -->

## Additional context:
[Include any additional information or context that might be helpful for reviewers.]
1 change: 1 addition & 0 deletions .github/workflows/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

44 changes: 44 additions & 0 deletions .github/workflows/auto-comment-issue-close.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Auto Comment on Issue Close

on:
issues:
types: [closed]

jobs:
greet-on-close:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Greet User
uses: actions/github-script@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const issue = context.payload.issue;
// Check if the event is for an issue (not a pull request)
if (!issue.pull_request) {
const issueCreator = issue.user.login;
const issueNumber = issue.number;
const issueTitle = issue.title;
const greetingMessage = `
Hello @${issueCreator}! 🎉
Your issue **#${issueNumber} - ${issueTitle}** has been successfully closed.
We appreciate your valuable contribution and your help in improving the project. If you have any more ideas, questions, or issues, feel free to open a new issue or join the discussion in our community forum.
Stay awesome! 😊
`;
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issueNumber,
body: greetingMessage
});
} else {
console.log('The closed issue is a pull request. No greeting message sent.');
}
35 changes: 35 additions & 0 deletions .github/workflows/auto-comment-issue-creation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Auto Comment on Issue Creation

on:
issues:
types: [opened]

permissions:
issues: write

jobs:
comment:
runs-on: ubuntu-latest

steps:
- name: Add Comment to Issue
run: |
COMMENT=$(cat <<EOF
{
"body": "Thank you for creating this issue! 🎉 @SUGAM-ARORA @OJAS-ARORA will look into it as soon as possible. In the meantime, please make sure to provide all the necessary details and context. If you have any questions or additional information, feel free to add them here. Your contributions are highly appreciated! 😊\n\nYou can also check our [CONTRIBUTE.md](https://github.com/AegisNimbus/ML-Alchemy/blob/main/Contributing.md) for guidelines on contributing to this project."
}
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.issue.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 }}
36 changes: 36 additions & 0 deletions .github/workflows/auto-comment-pr-created.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Auto Comment on PR Creation

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. In the meantime, please ensure that your changes align with our [CONTRIBUTE.md](https://github.com/AegisNimbus/ML-Alchemy/blob/main/Contributing.md). If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊"
}
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 }}
20 changes: 20 additions & 0 deletions .github/workflows/auto-comment-pr-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Auto Comment on PR Merge

on:
pull_request:
types: [closed]

jobs:
comment:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

steps:
- name: Add Comment to Merged PR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl -H "Authorization: token $GITHUB_TOKEN" \
-X POST \
-d '{"body":"🎉 Your pull request has been successfully merged! 🎉 Thank you for your contribution to our project. Your efforts are greatly appreciated. Keep up the fantastic work! 🚀"}' \
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments"

0 comments on commit 5a77ee1

Please sign in to comment.