diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 0000000..90bd3f1 --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,21 @@ +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 30 + +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 7 + +# Issues with these labels will never be considered stale +exemptLabels: + - bug + - security + +# Label to use when marking an issue as stale +staleLabel: wontfix + +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: true \ No newline at end of file diff --git a/.github/workflows/commit.yml b/.github/workflows/commit.yml new file mode 100644 index 0000000..8391679 --- /dev/null +++ b/.github/workflows/commit.yml @@ -0,0 +1,11 @@ +name: Lint Commit Messages +on: [pull_request] + +jobs: + commitlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: wagoid/commitlint-github-action@v2 \ No newline at end of file diff --git a/.github/workflows/dependabot_bot_issue.yml b/.github/workflows/dependabot_bot_issue.yml new file mode 100644 index 0000000..ec7306a --- /dev/null +++ b/.github/workflows/dependabot_bot_issue.yml @@ -0,0 +1,20 @@ +name: Create issue on dependabot pr +on: +- pull_request +jobs: + create_commit: + runs-on: ubuntu-latest + steps: + - name: Create issue using REST API + if: contains(github.actor, 'dependabot') + run: | + curl --request POST \ + --url https://api.github.com/repos/${{ github.repository }}/issues \ + --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ + --header 'content-type: application/json' \ + --data '{ + "title": "Verify for any breaking changes in PR made by ${{ github.actor }}", + "body": "- Kindly check if new dependencies are not introducing any breaking changes.\n- Ref: ${{ github.ref }}", + "labels": ["dependencies", "good first issue"], + "assignees": [""] + }' \ No newline at end of file diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 0000000..5d39214 --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,63 @@ +--- +########################### +########################### +## Linter GitHub Actions ## +########################### +########################### +name: Lint Code Base + +# +# Documentation: +# https://help.github.com/en/articles/workflow-syntax-for-github-actions +# + +############################# +# Start the job on all push # +############################# +on: + push: + branches: [master] + # Remove the line above to run when pushing to master + pull_request: + branches: [master] + +############### +# Set the Job # +############### +jobs: + build: + # Name the Job + name: Lint Code Base + # Set the agent to run on + runs-on: ubuntu-latest + + ################## + # Load all steps # + ################## + steps: + ########################## + # Checkout the code base # + ########################## + - name: Checkout Code + uses: actions/checkout@v2 + with: + # Full git history is needed to get a proper list of changed files within `super-linter` + fetch-depth: 0 + + ################################ + # Run Linter against code base # + ################################ + - name: Lint Code Base + uses: github/super-linter@v4 + env: + VALIDATE_ALL_CODEBASE: true + VALIDATE_MARKDOWN: false + VALIDATE_NATURAL_LANGUAGE: false + VALIDATE_YAML: false + DEFAULT_BRANCH: master + VALIDATE_DOCKERFILE: false + VALIDATE_DOCKERFILE_HADOLINT: false + VALIDATE_PYTHON_FLAKE8: false + VALIDATE_BASH: false + VALIDATE_JSCPD: false + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6a70275 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +# Editor +.vscode +.idea + +# Environment +.env \ No newline at end of file diff --git a/.hooks/commit-msg b/.hooks/commit-msg new file mode 100644 index 0000000..7ea7103 --- /dev/null +++ b/.hooks/commit-msg @@ -0,0 +1,12 @@ + +#!/bin/sh +commit_message=$(cat "$1" | sed -e 's/^[[:space:]]*//') +matched_str=$(echo "$commit_message" | grep -E "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\([a-z]+\))?: [a-zA-Z0-9 ]+$") +echo "$matched_str" +if [ "$matched_str" != "" ]; +then + exit 0 +else + echo "Commit rejected due to incorrect commit message format. See commit standards here - https://www.conventionalcommits.org/en/v1.0.0/" + exit 1 +fi \ No newline at end of file diff --git a/.hooks/setup.ps1 b/.hooks/setup.ps1 new file mode 100644 index 0000000..00e6c72 --- /dev/null +++ b/.hooks/setup.ps1 @@ -0,0 +1,2 @@ +Copy-Item ".\commit-msg" -Destination "..\.git\hooks\" +ICACLS "..\.git\hooks\commit-msg" /grant:r "users:(RX)" /C \ No newline at end of file diff --git a/.hooks/setup.sh b/.hooks/setup.sh new file mode 100644 index 0000000..87b9774 --- /dev/null +++ b/.hooks/setup.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cp commit-msg ../.git/hooks/commit-msg +chmod +x ../.git/hooks/commit-msg \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..d9c17a1 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,125 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders of **CodeChef-VIT** 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, caste, color, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Sharing critical Pentest findings with public or putting in an issue +* DOS Attack on any of our subdomains (subdomain.codechefvit.com) +* Continous load testing is strictly not allowed +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities | Consequences of Unacceptable Behavior + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers 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, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at `contact@codechefvit.com`. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## 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. + +**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. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**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. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**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 + +**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. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +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. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..22311c0 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 CodeChef-VIT + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..c8a41ee --- /dev/null +++ b/README.md @@ -0,0 +1,71 @@ +
+ ++ +
+ + +## Dependencies + - < dependency > + - < dependency > +## Instructions + +#### Directions to Install +```sh +$ git clone https://github.com/CodeChefVIT/
+ John Doe
+ + + ++ + + + + |
+
+ John Doe
+ + + ++ + + + + |
+
+ Made with :heart: by CodeChef-VIT +
diff --git a/contributing.md b/contributing.md new file mode 100644 index 0000000..ba69e3b --- /dev/null +++ b/contributing.md @@ -0,0 +1,72 @@ +## Contribution Guidelines + +Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms. + +## How to contribute + +- Decide which repository to contribute +- Decide what to contribute +- Fork the repo then clone it locally +- Commit your work (You should create a new branch when you're doing development work that is somewhat experimental in nature.) +- Create a **Pull Request** +- Congrats 🎉 you have just contributed towards open source! + +## What to contribute + +- Find an open issue to tackle +- Ask if you can help write a new feature +- Add / Improve Unit Testing +- Write tutorials for how a project can be used and add to the readme +- Review code on other people’s submissions and help improving / finding vulnerabilities + +## Making a PR +- Provide all the appropriate details asked in PR template +- A pull request doesn’t have to represent finished work. It’s usually better to open a pull request early on, so others can watch or give feedback on your progress. Just mark it as a “WIP” (Work in Progress) in the subject line. You can always add more commits later. + +## Opening an Issue +- Make use of an appropriate Issue Template +- We welcome Feature request, Bug Report, Documentation fix and others +- Do not open critical security issues here, report them directly at [our email](mailto:contact@codechefvit.com). + +## Communicating effectively +**Give context.** Help others get quickly up to speed. If you’re running into an error, explain what you’re trying to do and how to reproduce it. If you’re suggesting a new idea, explain why you think it’d be useful to the project (not just to you!). + +``` +✔️ “X doesn’t happen when I do Y” +❌ “X is broken! Please fix it.” +``` + +**Do your homework beforehand.** It’s OK not to know things, but show that you tried. Before asking for help, be sure to check a project’s README, documentation, issues (open or closed), mailing list, and search the internet for an answer. People will appreciate when you demonstrate that you’re trying to learn. + +``` +✔️ ““I’m not sure how to implement X. I checked the help docs and didn’t find any mentions.”” +❌ “How do I X?” +``` + +**Keep requests short and direct.** + +``` +✔️ “I’d like to write an API tutorial.” +❌ “I was driving down the highway the other day and stopped for gas, and then I had this amazing idea for something we should be doing, but before I explain that, let me show you…“ +``` + +**It’s okay to ask questions (but be patient!).** + +``` +✔️ “Thanks for looking into this error. I followed your suggestions. Here’s the output.” +❌ “Why can’t you fix my problem? Isn’t this your project?” +``` + +**Respect community decisions.** + +``` +✔️ “I’m disappointed you can’t support my use case, but as you’ve explained it only affects a minor portion of users, I understand why. Thanks for listening.” +❌ “Why won’t you support my use case? This is unacceptable!” +``` + +## Misc +- You are welcome to Propose a new feature by creating an **Issue**. +- You may Discuss a high-level topic or idea (for example, community, vision or policies) by writing to us at our [Email](mailto:contact@codechefvit.com). + +## Attribution +- [Open Source Guide](https://opensource.guide/how-to-contribute/) \ No newline at end of file