Skip to content

Commit

Permalink
Merge branch 'SurajPratap10:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Tanushree084 authored Nov 8, 2024
2 parents 9dacab3 + 18add59 commit 2a7d12b
Show file tree
Hide file tree
Showing 35 changed files with 7,080 additions and 3,181 deletions.
5 changes: 3 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
PORT=5000
PORT=5001
MONGODB_URI=mongodb+srv://Jazzy49:[email protected]/Imagine?retryWrites=true&w=majority
OPENAI_API_KEY="get in from OPEN AI"
JWT_ACCESS_SECRET=ImagineAiAccessSecret
JWT_REFRESH_TOKEN=ImagineAiRefreshToken
GOOGLE_CLIENT_ID=829264938526-gklvdpj86hpc8fn0b58u9lc5p56da1jv.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=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
GOOGLE_AUTH_URI=https://imagine-ai-17zf.vercel.app/auth/google/callback

EMAIL_USER=your_email_username
EMAIL_PASS=your_email_password

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
28 changes: 28 additions & 0 deletions .github/workflows/issue_open_close.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Issue Auto Comment

# Created by @smog-root

on:
issues:
types: [opened, closed]

jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: Add a comment when an issue is 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 and Code of Conduct. Happy coding! 🚀
"

- name: Add a comment when an issue is 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! 🚀"
57 changes: 57 additions & 0 deletions .github/workflows/pr-checker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
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 #<issue-number>.')
sys.exit(1)

# Check if the PR title starts with FIX, FEAT, or DOC
if not re.match(r'^(FIX|FEAT|DOC)', pr_title):
print('The PR title should start with FIX, FEAT, or DOC.')
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."

34 changes: 34 additions & 0 deletions .github/workflows/pr_merged.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Merge Thank You

# Created by @smog-root

on:
pull_request_target:
types: [closed] # Trigger when a PR is closed

permissions:
issues: write
pull-requests: write

jobs:
post_merge_message:
if: github.event.pull_request.merged == true # Only run if the PR was merged
runs-on: ubuntu-latest

steps:
- name: Post thank you message
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }} # Ensure token is used
script: |
const prNumber = context.payload.pull_request.number;
const owner = context.repo.owner;
const repo = context.repo.repo;
// Post a thank you message upon PR merge
await github.rest.issues.createComment({
owner: owner,
repo: repo,
issue_number: prNumber,
body: `🎉🎉 Thank you for your contribution! Your PR #${prNumber} has been merged! 🎉🎉`
});
Empty file added .github/workflows/pr_raise.yml
Empty file.
164 changes: 124 additions & 40 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,75 +1,159 @@
# ImagineAI Official Code of Conduct
# ImagineAI Official Code of Conduct

## Introduction
---

The Code of Conduct provides a summary of our expectations of behaviour and the standard set for interactions within our community, which we - the contributors to ImagineAI, commit to providing a kind, friendly, harassment-free and safe environment for all contributors.
## 🌟Our Pledge

## Scope
---

This Code of Conduct applies within the ImagineAI community, and also applies when an individual is officially representing our community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

## Supported Behaviour
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

We expect all participants in our community to:
---

- Demonstrate empathy and kindness towards other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall community
## 🚦Our Standards

## Unacceptable Behaviour
Examples of behavior that contributes to a positive environment for our
community include:

The following behaviours are inadmissible within our community:
- 💖Demonstrating empathy and kindness toward other people
- 🤝Being respectful of differing opinions, viewpoints, and experiences
- 📝Giving and gracefully accepting constructive feedback
- 🌱Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- 🎯Focusing on what is best not just for us as individuals, but for the
overall community

- Harassment, discrimination, or any form of harmful behaviour.
- Offensive, derogatory, or disrespectful language or comments.
- Intimidation, threats, or personal attacks.
- Spamming, trolling, or any form of disruptive behaviour.
- Any other conduct that violates the principles outlined in this Code of Conduct.
Examples of unacceptable behavior include:

## Enforcement
- 🚫The use of sexualized language or imagery, and sexual attention or
advances of any kind
- 🛑Trolling, insulting or derogatory comments, and personal or political attacks
- ⚠️Public or private harassment
- 🔒Publishing others' private information, such as a physical or email
address, without their explicit permission
- ❌Other conduct which could reasonably be considered inappropriate in a
professional setting

Instances of abusive, harassing, or otherwise unacceptable behaviour may be reported to the community leaders responsible for enforcement at [email protected]
---

## 👨‍⚖️Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

---

## 🌐Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

---

## 📋Pull Request Guidelines

Contributions, including pull requests, must align with this Code of Conduct.
All contributors are expected to submit work that fosters a positive and inclusive community.
Inappropriate behavior, language, or content in pull requests may result in the rejection of
the contribution and further enforcement actions as outlined in the guidelines.

---

## 🛡️Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the reporter of any incident.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

---

## 📖Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. ✏️Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Enforcement Guidelines**
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
### 2. ⚠️Warning

**1. Correction**
**Community Impact**: A violation through a single incident or series
of actions.

- Community Impact: Use of inappropriate language or other behaviour deemed unprofessional or unwelcoming in the community.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

- Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behaviour was inappropriate. A public apology may be requested.
### 3. ⏳Temporary Ban

**2. Warning**
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

- Community Impact: A violation through a single incident or series of actions.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

- Consequence: A warning with consequences for continued behaviour. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
### 4. 🚫Permanent Ban

**3. Temporary Ban**
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

- Community Impact: A serious violation of community standards, including sustained inappropriate behaviour.
**Consequence**: A permanent ban from any sort of public interaction within
the community.

- Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
---

**4. Permanent Ban**
## 📜Attribution

- Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behaviour, harassment of an individual, or aggression toward or disparagement of classes of individuals.
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

- Consequence: A permanent ban from any sort of public interaction within the community.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

## Attribution
[homepage]: https://www.contributor-covenant.org

This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

Community Impact Guidelines were inspired by Mozilla’s code of conduct enforcement ladder.
---

## Conclusion

We are commited to creating a welcoming and inclusive environment that values collaboration, respect, and empathy. By contributing to the ImagineAI Organization, you must agree to follow this Code of Conduct and make a positive and lasting impact on the community by sharing your knowledge and skills,by being a supportive and welcoming member.
We are commited to creating a welcoming and inclusive environment that values collaboration, respect, and empathy. By contributing to the **ImagineAI** Organization, you must agree to follow this Code of Conduct and make a positive and lasting impact on the community by sharing your knowledge and skills,by being a supportive and welcoming member.
Loading

0 comments on commit 2a7d12b

Please sign in to comment.