├── .github ├── ISSUE_TEMPLATE │ └── gssoc23.md ├── dependabot.yml ├── pull_request_template.md └── workflows │ ├── auto-comment.yml │ ├── auto_close_empty_issues.yml │ ├── codeql.yml │ └── linter.yml ├── .gitignore ├── .setup └── install.sh ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LEARN.md ├── LICENSE ├── README.md ├── css ├── contributors.css └── style.css ├── graphics ├── back.jpg └── repo.jpg ├── index.html ├── js ├── contributors.js └── scripts.js └── scripts ├── Maven build script ├── README.md └── maven_build.sh ├── create_issue.py ├── create_pull_request.sh ├── create_repo ├── create_repo.py ├── create_repo.sh ├── delete_repo.sh ├── fork_clone.py └── push_repo.py /.github/ISSUE_TEMPLATE/gssoc23.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: gssoc23 3 | about: Issue template for GSSoC'23 contributors 4 | title: '' 5 | labels: gssoc23 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Issue Description:** 11 | [Describe the issue or feature request in detail. Provide a clear and concise explanation of what needs to be addressed or implemented.] 12 | 13 | **Expected Behavior:** 14 | [Describe what should happen when the issue is resolved or the feature is implemented.] 15 | 16 | **Current Behavior:** 17 | [Describe the current behaviour or any error messages encountered, if applicable.] 18 | 19 | **Additional Information:** 20 | [Provide any additional information, screenshots, or logs that may be helpful in addressing the issue.] 21 | 22 | **Labels:** 23 | [Add appropriate labels to categorize the issue, such as bug, enhancement, documentation, etc.] 24 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: 'npm' 4 | directory: '/' 5 | schedule: 6 | interval: 'daily' -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Fixes Issue 4 | 5 | 6 | 7 | 8 | 9 | ## Changes proposed 10 | 11 | 12 | 13 | ## Screenshots 14 | 15 | 16 | 17 | ## Note to reviewers 18 | 19 | 20 | -------------------------------------------------------------------------------- /.github/workflows/auto-comment.yml: -------------------------------------------------------------------------------- 1 | name: Auto Comment 2 | on: 3 | issues: 4 | types: 5 | - opened 6 | - closed 7 | - assigned 8 | pull_request: 9 | types: 10 | - opened 11 | - closed 12 | 13 | jobs: 14 | run: 15 | runs-on: ubuntu-latest 16 | steps: 17 | - name: Auto Comment on Issues Opened 18 | uses: wow-actions/auto-comment@v1 19 | with: 20 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 21 | issuesOpened: | 22 | 👋 @{{ author }} 23 | 24 | Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. 25 | 26 | Please make sure you have given us as much context as possible. 27 | 28 | - name: Auto Comment on Pull Request Merged 29 | uses: wow-actions/auto-comment@v1 30 | with: 31 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 32 | pullRequestMerged: | 33 | 👋 @{{ author }} 🎉 Congrats on your merged pull request! Thanks for the valuable contribution! 👏🎉 34 | 35 | - name: Auto Comment on Pull Request Opened 36 | uses: wow-actions/auto-comment@v1 37 | with: 38 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 39 | pullRequestOpened: | 40 | Hello👋 @{{ author }}, I hope you are doing well! 41 |
42 | Thank you for raising your pull request and contributing to our Community 🎉 43 | 44 | Please make sure you have followed our contributing guidelines. We will review it as soon as possible. 45 | 46 | - name: Auto Comment on Issues Assigned 47 | uses: wow-actions/auto-comment@v1 48 | with: 49 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 50 | issuesAssigned: | 51 | Hello @{{ author }}, thank you for raising an issue. 🙌 I have assigned the issue to you. You can now start working on it. If you encounter any problems, please feel free to connect with us. 👍 -------------------------------------------------------------------------------- /.github/workflows/auto_close_empty_issues.yml: -------------------------------------------------------------------------------- 1 | name: auto_close_empty_issues 2 | 3 | on: 4 | issues: 5 | types: [opened] 6 | 7 | jobs: 8 | check-issue-body-not-empty: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - if: github.event.issue.body == 0 12 | name: Close Issue 13 | uses: peter-evans/close-issue@v1 14 | with: 15 | comment: | 16 | Issue body must contain content. 17 | Auto-closing this issue. -------------------------------------------------------------------------------- /.github/workflows/codeql.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [ "main" ] 17 | pull_request: 18 | # The branches below must be a subset of the branches above 19 | branches: [ "main" ] 20 | schedule: 21 | - cron: '43 3 * * 6' 22 | 23 | jobs: 24 | analyze: 25 | name: Analyze 26 | runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} 27 | timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} 28 | permissions: 29 | actions: read 30 | contents: read 31 | security-events: write 32 | 33 | strategy: 34 | fail-fast: false 35 | matrix: 36 | language: [ 'python' ] 37 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ] 38 | # Use only 'java' to analyze code written in Java, Kotlin or both 39 | # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both 40 | # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support 41 | 42 | steps: 43 | - name: Checkout repository 44 | uses: actions/checkout@v3 45 | 46 | # Initializes the CodeQL tools for scanning. 47 | - name: Initialize CodeQL 48 | uses: github/codeql-action/init@v2 49 | with: 50 | languages: ${{ matrix.language }} 51 | # If you wish to specify custom queries, you can do so here or in a config file. 52 | # By default, queries listed here will override any specified in a config file. 53 | # Prefix the list here with "+" to use these queries and those in the config file. 54 | 55 | # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs 56 | # queries: security-extended,security-and-quality 57 | 58 | 59 | # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). 60 | # If this step fails, then you should remove it and run the build manually (see below) 61 | - name: Autobuild 62 | uses: github/codeql-action/autobuild@v2 63 | 64 | # ℹ️ Command-line programs to run using the OS shell. 65 | # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun 66 | 67 | # If the Autobuild fails above, remove it and uncomment the following three lines. 68 | # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. 69 | 70 | # - run: | 71 | # echo "Run, Build Application using script" 72 | # ./location_of_script_within_repo/buildscript.sh 73 | 74 | - name: Perform CodeQL Analysis 75 | uses: github/codeql-action/analyze@v2 76 | with: 77 | category: "/language:${{matrix.language}}" -------------------------------------------------------------------------------- /.github/workflows/linter.yml: -------------------------------------------------------------------------------- 1 | name: Flake8Linter 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | lint: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | - name: Set up Python 11 | uses: actions/setup-python@v2 12 | with: 13 | python-version: '3.10' 14 | - name: Install flake8 15 | run: | 16 | python -m pip install --upgrade pip 17 | pip install flake8 18 | - name: Lint with flake8 19 | run: flake8 . --isolated --exclude=.cache,.venv,.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,**/certificate_generator/**,**/migrations/** --ignore=E203,W503 --max-line-length=119 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Stores the API key 2 | scripts/github_secrets.py 3 | 4 | # Byte-compiled / optimized / DLL files 5 | __pycache__/ 6 | *.py[cod] 7 | *$py.class 8 | 9 | # C extensions 10 | *.so 11 | 12 | # Distribution / packaging 13 | .Python 14 | build/ 15 | develop-eggs/ 16 | dist/ 17 | downloads/ 18 | eggs/ 19 | .eggs/ 20 | lib/ 21 | lib64/ 22 | parts/ 23 | sdist/ 24 | var/ 25 | wheels/ 26 | share/python-wheels/ 27 | *.egg-info/ 28 | .installed.cfg 29 | *.egg 30 | MANIFEST 31 | 32 | # PyInstaller 33 | # Usually these files are written by a python script from a template 34 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 35 | *.manifest 36 | *.spec 37 | 38 | # Installer logs 39 | pip-log.txt 40 | pip-delete-this-directory.txt 41 | 42 | # Unit test / coverage reports 43 | htmlcov/ 44 | .tox/ 45 | .nox/ 46 | .coverage 47 | .coverage.* 48 | .cache 49 | nosetests.xml 50 | coverage.xml 51 | *.cover 52 | *.py,cover 53 | .hypothesis/ 54 | .pytest_cache/ 55 | cover/ 56 | 57 | # Translations 58 | *.mo 59 | *.pot 60 | 61 | # Django stuff: 62 | *.log 63 | local_settings.py 64 | db.sqlite3 65 | db.sqlite3-journal 66 | 67 | # Flask stuff: 68 | instance/ 69 | .webassets-cache 70 | 71 | # Scrapy stuff: 72 | .scrapy 73 | 74 | # Sphinx documentation 75 | docs/_build/ 76 | 77 | # PyBuilder 78 | .pybuilder/ 79 | target/ 80 | 81 | # Jupyter Notebook 82 | .ipynb_checkpoints 83 | 84 | # IPython 85 | profile_default/ 86 | ipython_config.py 87 | 88 | # pyenv 89 | # For a library or package, you might want to ignore these files since the code is 90 | # intended to run in multiple environments; otherwise, check them in: 91 | # .python-version 92 | 93 | # pipenv 94 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 95 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 96 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 97 | # install all needed dependencies. 98 | #Pipfile.lock 99 | 100 | # poetry 101 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. 102 | # This is especially recommended for binary packages to ensure reproducibility, and is more 103 | # commonly ignored for libraries. 104 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control 105 | #poetry.lock 106 | 107 | # pdm 108 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. 109 | #pdm.lock 110 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it 111 | # in version control. 112 | # https://pdm.fming.dev/#use-with-ide 113 | .pdm.toml 114 | 115 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm 116 | __pypackages__/ 117 | 118 | # Celery stuff 119 | celerybeat-schedule 120 | celerybeat.pid 121 | 122 | # SageMath parsed files 123 | *.sage.py 124 | 125 | # Environments 126 | .env 127 | .venv 128 | env/ 129 | venv/ 130 | ENV/ 131 | env.bak/ 132 | venv.bak/ 133 | 134 | # Spyder project settings 135 | .spyderproject 136 | .spyproject 137 | 138 | # Rope project settings 139 | .ropeproject 140 | 141 | # mkdocs documentation 142 | /site 143 | 144 | # mypy 145 | .mypy_cache/ 146 | .dmypy.json 147 | dmypy.json 148 | 149 | # Pyre type checker 150 | .pyre/ 151 | 152 | # pytype static type analyzer 153 | .pytype/ 154 | 155 | # Cython debug symbols 156 | cython_debug/ 157 | 158 | # PyCharm 159 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can 160 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 161 | # and can be added to the global gitignore or merged into this file. For a more nuclear 162 | # option (not recommended) you can uncomment the following to ignore the entire idea folder. 163 | #.idea/ 164 | -------------------------------------------------------------------------------- /.setup/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | printf "Cloning The Repository...\n" 4 | git clone https://github.com/sahil-sagwekar2652/GitHub-Automation-scripts.git 5 | cd ../scripts 6 | touch github_secrets.py 7 | echo 'Please enter your Github Username' 8 | read github_account 9 | echo -e '\n Please enter your Github Password' 10 | read github_password 11 | echo -e "GITHUB_API_TOKEN = '$github_account'\nUSERNAME = '$github_password'" > github_secrets.py 12 | cd .. 13 | echo 'export PATH=$PATH''":'"$(pwd)"'/scripts''"' >> ~/.bash_profile -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | We are committed to providing a friendly, inclusive, and safe environment for all participants in our project repository. This code of conduct outlines our expectations for behavior and ensures that everyone can collaborate in a positive and respectful manner. By participating in this project, you agree to abide by this code of conduct. 4 | 5 | ## 1. Be Respectful and Inclusive 6 | 7 | Treat all participants with respect and courtesy, regardless of their race, ethnicity, nationality, gender identity, sexual orientation, age, disability, religion, or any other personal characteristics. Create an inclusive and welcoming environment for everyone to contribute. 8 | 9 | ## 2. Foster a Collaborative Atmosphere 10 | 11 | Encourage open and constructive discussions. Be receptive to different ideas and perspectives. Avoid personal attacks, harassment, or any form of offensive or derogatory language or behavior. 12 | 13 | ## 3. Be Mindful of Language and Tone 14 | 15 | Use clear and inclusive language when communicating in discussions, comments, and documentation. Be mindful of how your words may be perceived by others. Refrain from using offensive, discriminatory, or inflammatory language. 16 | ## 4. Exercise Empathy and Understanding 17 | 18 | Take into account that participants may have different backgrounds and experiences. Be considerate and understanding when communicating with others. If a misunderstanding occurs, seek to resolve it in a peaceful and respectful manner. 19 | 20 | ## 5. Respect Privacy and Confidentiality 21 | 22 | Respect the privacy and confidentiality of others. Do not share personal information without consent. Be cautious when handling sensitive data and ensure compliance with relevant privacy laws and regulations. 23 | 24 | ## 6. Report Incidents 25 | 26 | If you witness or experience any behavior that violates this code of conduct, promptly report it to the project maintainers or administrators. Provide as much detail as possible to help in the investigation. All reports will be handled confidentially and with discretion. 27 | 28 | ## 7. Enforcement 29 | 30 | Violation of this code of conduct may result in temporary or permanent restrictions on participation in the project repository. Project maintainers and administrators reserve the right to enforce this code of conduct and take appropriate actions to address any misconduct or breaches of conduct. 31 | 32 | 33 | ## 8. Acknowledgment 34 | 35 | We value and appreciate everyone's contributions to our project repository. By following this code of conduct, we can create a supportive and inclusive environment where collaboration and growth thrive. -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to GitHub-Automation-Scripts 2 | Ah, thank you ever so much for gracing us with your oh-so-valuable contributions! We're just thrilled to have you here. 3 | But wait, hold on! Don't just dive in and contribute your precious time. First, read the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉 4 | 5 | > And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about: 6 | > - Star the project 7 | > - Tweet about it 8 | Remember, every bit of support, big or small, makes a significant difference, and we truly appreciate every gesture of encouragement you offer. Your appreciation fuels our passion for the project, and we're immensely grateful for your involvement in any form! ❤️🌟🐦 9 | 10 | ## Table of Contents 11 | 12 | - [Asking Questions](#asking-questions) 13 | - [How To Contribute](#how-to-contribute) 14 | - [Styleguides](#styleguides) 15 | 16 | 17 | ## Asking Questions 18 | 19 | If you want to ask a question, join the 'GitHub Automation scripts' project channel on the GSSoC discord server. To join the project channel, make sure you have the 'GitHub Automation scripts' & 'Contributor' role assigned to you. If you don't have the role assigned to you, you can self-assign it in the [#self-roles](https://discord.com/channels/1099745007172329592/1099745007675646046) channel. 20 | 21 | Before you ask a question, it is best to search for existing [Issues](https://github.com/sahil-sagwekar2652/GitHub-Automation-scripts.git/issues) that might help you. It is also advisable to search the internet for answers first. 22 | 23 | If you still feel the need to ask a question and need clarification, we recommend the following: 24 | 25 | - Provide as much context as you can about what you're running into. 26 | - Provide details about your OS and environment. 27 | 28 | 29 | ## How To Contribute 30 | 31 | To start contributing, follow the guidelines given below: 32 | 33 | ### 1. Fork the Repository 34 | Fork the repository (https://github.com/sahil-sagwekar2652/GitHub-Automation-scripts) 35 | 36 | ### 2. Clone the forked Repository 37 | ``` 38 | git clone https://github.com//GitHub-Automation-scripts.git 39 | ``` 40 | ***NOTE*** 41 | - If you have an idea for an enhancement or a bug you can first check the [Issues](https://github.com/sahil-sagwekar2652/GitHub-Automation-scripts.git/issues) to see if your question has been asked before. 42 | 43 | - If you'd like to work on an issue, please ask the creator of the issue to assign it to you. This helps to keep the workflow streamlined. 44 | 45 | ### 3. Create a New Branch 46 | ``` 47 | git checkout -b 48 | ``` 49 | ## Making Changes 50 | Perform your desired changes to the code base. 51 | 52 | ### 4. Track Changes 53 | ``` 54 | git add . 55 | ``` 56 | 57 | ### 5. Commit Changes 58 | ``` 59 | git commit -m "Suitable message" 60 | ``` 61 | 62 | ### 6. Push Changes 63 | ``` 64 | git push -u origin 65 | ``` 66 | 67 | ## Creating a Pull Request 68 | To create a pull request: 69 | 70 | - The pull request should mention the issue it is trying to solve and should be linked to it. Here is a video on how to link PRs to issues - [video link](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword). 71 | 72 | - Make sure to make the appropriate changes in the README.md file if you are adding a new script or feature. 73 | - Add an appropriate title and description to your pull request, explaining your changes with suitable explanations and screenshots 📝🖼️ 74 | - Click on "Create Pull Request" to submit your contribution for review ✅ 75 | 76 | ## Styleguides 77 | This project uses the Flake8 linter to lint the Python code. If you are using VSCode, I would suggest installing the [Flake8 linter extension](https://marketplace.visualstudio.com/items?itemName=ms-python.flake8) for VSCode. -------------------------------------------------------------------------------- /LEARN.md: -------------------------------------------------------------------------------- 1 | # Things you can learn through this project 2 | - ##### Using Bash scripting to write shell scripts in UNIX environments 3 | - ##### Using python as a scripting language. 4 | - ##### What are shells and how do they work. 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Sahil Sagwekar 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GitHub Automation Scripts 🤖 2 | ![](https://github.com/sahil-sagwekar2652/GitHub-Automation-scripts/workflows/Flake8Linter/badge.svg) 3 | 4 | This repository hosts scripts written in bash and python to automate common Git/GitHub workflows. Normally to connect a local repository to GitHub one has to go to the GitHub website, create a new respository and then add the new GitHub repo as a remote for your local repository. The [create_repo](scripts/create_repo) script automates this process. 5 | 6 | [![GitHub-Automation-scripts](https://github-readme-stats.vercel.app/api/pin/?username=sahil-sagwekar2652&repo=GitHub-Automation-scripts&theme=dark)](https://github.com/sahil-sagwekar2652/GitHub-Automation-scripts)
7 | 8 | ## Status 9 |
10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 |
25 | 26 | ## Table of Content 27 | - [Tech](#tech) 28 | - [Installation](#installation) 29 | - [How to use](#how-to-use) 30 | - [Development](#develop) 31 | - [License](#license) 32 | 33 | 34 | ## Tech 🖥️ 35 | [![My Skills](https://skillicons.dev/icons?i=py,bash,git,github&perline=4)](https://skillicons.dev) 36 | 37 | 38 | ## 🏗️ Installation 39 | 40 | ## Getting Started 41 | 42 | To install and configure the project on your system locally, use the command mentioned below: 43 | 44 | ```curl https://raw.githubusercontent.com/sahil-sagwekar2652/GitHub-Automation-scripts/main/.setup/install.sh | bash``` 45 | 46 | ## Installation 47 | 48 | ##### Requirements: 49 | - [Git Bash](https://git-scm.com/downloads) installed on your computer. 50 | - **GitHub personal access token**. (Go to your GitHub profile -> Settings -> Developer settings -> Personal Access Tokens -> Create new token with all the repository permissions) 51 | 52 | 53 | #### ```Note!!! This script is written exclusively for Git Bash on Windows, you will have to modify it for other shells.``` 54 | 55 | - ### Step 1: 56 | Fork and clone the repository locally. 57 | 58 | - ### Step 2: 59 | Create a ```github_secrets.py``` file in the ./scripts folder and define the following variables inside it. 60 | 61 | ```py 62 | GITHUB_API_TOKEN = "Your GitHub personal access token" 63 | USERNAME = "Your GitHub username" 64 | ``` 65 | 66 | - ### Step 3: 67 | 68 | #### Add the project path to the PATH variable (Recommended) 69 | 70 | Run the following command in the project's base directory to add the scripts path to the PATH environment variable. 71 | 72 | ```sh 73 | $ export PATH=$PATH":"$(pwd)"/scripts" 74 | ``` 75 | 76 | To permanently add the scripts path to the PATH variable, run the below command in the project's root directory. (This file is located in your home directory) 77 | 78 | **Make sure to backup the .bash_profile file elsewhere before making any changes to it.** 79 | 80 | ```sh 81 | $ echo 'export PATH=$PATH''":'"$(pwd)"'/scripts''"' >> ~/.bash_profile 82 | ``` 83 | 84 |

OR

85 | 86 | #### Run the following commands in the project folder to add the scripts to your bin directory 87 | ```sh 88 | $ cp -r /scripts/* /usr/bin/ 89 | ``` 90 | 91 | ## How to use 92 | After the installation is complete then the 'create_repo' command should execute in any directory. 93 | 94 | - Run the command with a '-h' flag to see the help menu 95 | ```sh 96 | create_repo -h 97 | ``` 98 | - Sample usage 99 | ```sh 100 | create_repo 101 | ``` 102 | - is the path where you want to create the local repository and is the name for your repo 103 | - Example: 104 | ```sh 105 | create_repo . test-repo 106 | ``` 107 | The result is a local respository is created with a connected remote repository automatically! 108 | 109 | 110 | ## 👨‍💻 Development 111 | 112 | - Steps to join the project channel on 113 | 114 | - Go to the [#self-roles](https://discord.com/channels/1099745007172329592/1099745007675646042) channel and choose the 'contributor' and 'GitHub-Automation-scripts' roles. 115 | - You will be automatically added to the exclusive project channel. 116 | - It will be the primary channel for all the discussions related to the project. 117 | 118 | - Checkout the issues tab to find ideas! 119 | 120 | - Want to contribute? Great! 121 | Make sure to go through the [Contributor's Guide](CONTRIBUTING.md). Trust me it wont take long ;). 122 | 123 | 124 | ## 🪪 License 125 | 126 | [![License](https://img.shields.io/github/license/Ileriayo/markdown-badges?style=for-the-badge)](LICENSE) 127 | 128 | 129 | This project is licensed under the MIT license. For more information, please refer to the LICENSE file. 130 | 131 | We hope you find these automation scripts helpful in streamlining your Git and GitHub workflows 132 | 133 | 134 | 135 | ## Contributors 136 | 137 |

139 | 140 |

141 | 142 | -------------------------------------------------------------------------------- /css/contributors.css: -------------------------------------------------------------------------------- 1 | @import 'https://fonts.googleapis.com/css?family=Permanent+Marker'; 2 | 3 | .contributors { 4 | margin: 2rem 0; 5 | padding: 0; 6 | display: flex; 7 | flex-direction: column; 8 | justify-content: center; 9 | align-items: center; 10 | text-align: center; 11 | } 12 | 13 | .contributors h1 { 14 | font: 5.5vw/1 Permanent Marker; 15 | color: black; 16 | font-size: 2.5rem; 17 | margin-bottom: 2%; 18 | display: inline-block; 19 | opacity: 0.7; 20 | } 21 | 22 | .contributors h1:hover { 23 | opacity: 1; 24 | text-decoration: underline; 25 | } 26 | 27 | #contributor { 28 | width: 85%; 29 | display: flex; 30 | flex-wrap: wrap; 31 | justify-content: center; 32 | align-items: center; 33 | } 34 | 35 | .contributor-card { 36 | width: 65px; 37 | height: 65px; 38 | margin: 5px; 39 | clip-path: polygon(50% 0%, 91% 25%, 91% 75%, 50% 100%, 9% 75%, 9% 25%); 40 | } 41 | 42 | .contributor-card img { 43 | width: 100%; 44 | height: 100%; 45 | object-fit: cover; 46 | transition: opacity 0.3s ease-in-out; 47 | } 48 | 49 | .contributor-card img:hover { 50 | width: 75px; 51 | height: 75px; 52 | opacity: 1; 53 | } 54 | 55 | .contributor-card img:not(:hover) { 56 | opacity: 0.8; 57 | } 58 | 59 | .contributor-card:nth-child(4n+1), 60 | .contributor-card:nth-child(4n+3) { 61 | margin-top: -1.6rem; 62 | } -------------------------------------------------------------------------------- /css/style.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@300&family=Open+Sans:wght@300;400;500;600;700&display=swap'); 2 | 3 | * { 4 | padding: 0; 5 | margin: 0; 6 | box-sizing: border-box; 7 | font-family: "Poppins", sans-serif; 8 | text-decoration: none; 9 | } 10 | 11 | html { 12 | scroll-behavior: smooth; 13 | } 14 | 15 | body { 16 | display: flex; 17 | flex-direction: column; 18 | min-height: 100vh; 19 | background: linear-gradient(to bottom, #ffffff, #ffffff); 20 | } 21 | 22 | 23 | /* Styling of Navbar */ 24 | .navbar { 25 | list-style: none; 26 | z-index: 100; 27 | font-family: 'Josefin Sans', sans-serif; 28 | background: rgba(0, 130, 230, 0.6); 29 | height: 80px; 30 | width: 98%; 31 | position: fixed; 32 | top: 3%; 33 | left: 1%; 34 | transform: translate(-50%, -50%); 35 | animation: moveAnimation 2s ease-in-out infinite alternate; 36 | } 37 | label.logo { 38 | color: white; 39 | font-size: 35px; 40 | line-height: 80px; 41 | padding: 0 70px; 42 | font-weight: bold; 43 | } 44 | .navbar ul { 45 | float: right; 46 | margin-right: 20px; 47 | } 48 | .navbar ul li { 49 | display: inline-block; 50 | line-height: 80px; 51 | margin: 0 5px; 52 | } 53 | .navbar ul li a { 54 | color: white; 55 | font-size: 17px; 56 | text-transform: uppercase; 57 | font-weight: bold; 58 | padding: 7px 13px; 59 | border-radius: 3px; 60 | } 61 | a.active, a:hover { 62 | background: #1b9bff; 63 | transition: 0.5s; 64 | } 65 | .checkbtn { 66 | font-size: 30px; 67 | color: white; 68 | float: right; 69 | line-height: 80px; 70 | margin-right: 40px; 71 | cursor: pointer; 72 | display: none; 73 | } 74 | #check { 75 | display: none; 76 | } 77 | @media (max-width: 1300px) { 78 | label.logo { 79 | font-size: 25px; 80 | padding-left: 25px; 81 | } 82 | .navbar ul li a { 83 | font-size: 16px; 84 | } 85 | } 86 | @media (max-width: 1225px) { 87 | .checkbtn { 88 | display: block; 89 | } 90 | ul { 91 | position: fixed; 92 | width: 100%; 93 | height: 100vh; 94 | background-color: #2c3e50; 95 | top: 80px; 96 | left: -100%; 97 | text-align: center; 98 | transition: all .5s; 99 | } 100 | .navbar ul li { 101 | display: block; 102 | margin: 50px 0; 103 | line-height: 30px; 104 | } 105 | .navbar ul li a { 106 | font-size: 20px; 107 | } 108 | a:hover, a.active { 109 | background: none; 110 | color: #0082e6; 111 | } 112 | #check:checked ~ ul { 113 | left: 0; 114 | } 115 | } 116 | @keyframes moveAnimation { 117 | 0% { 118 | transform: translateY(-10px); 119 | } 120 | 100% { 121 | transform: translateY(10px); 122 | } 123 | } 124 | 125 | /* End styling of navbar */ 126 | 127 | 128 | /* View Port Style */ 129 | 130 | .Viewcontainer { 131 | margin: 1.2rem 1.2rem; 132 | display: flex; 133 | justify-content: center; 134 | align-items: center; 135 | 136 | } 137 | 138 | .icon { 139 | transition: all 0.3s ease; 140 | } 141 | 142 | .icon:hover { 143 | transform: scale(1.2); 144 | } 145 | 146 | .icon:hover ~ .icon { 147 | transform: scale(0.8); 148 | } 149 | 150 | /* ENDS----------->>>>>>> */ 151 | 152 | 153 | 154 | 155 | /* Tabs Section Style */ 156 | main { 157 | flex: 1; 158 | flex-wrap: wrap; 159 | } 160 | 161 | .github-link { 162 | display: flex; 163 | align-items: center; 164 | } 165 | 166 | .github-link a { 167 | display: flex; 168 | align-items: center; 169 | text-decoration: none; 170 | color: #333; 171 | } 172 | 173 | .github-link a:hover { 174 | color: #0366d6; 175 | } 176 | 177 | .github-link i { 178 | margin-right: 0.5rem; 179 | } 180 | 181 | 182 | #how-to-use p { 183 | font-family: 'Open Sans', sans-serif; 184 | font-weight: 700; 185 | color: #333; 186 | } 187 | 188 | code { 189 | white-space: pre-wrap; 190 | } 191 | 192 | #how-to-use code { 193 | font-weight: 400; 194 | background-color: #f5f5f5; 195 | color: #333; 196 | padding: 0.25rem 0.5rem; 197 | border-radius: 4px; 198 | } 199 | 200 | /* ENDS------->>>>>>>>>>>> */ 201 | 202 | 203 | /* description Style */ 204 | 205 | .desc-container{ 206 | display: flex; 207 | flex-wrap: wrap; 208 | flex-grow: 1; 209 | } 210 | 211 | .description-section { 212 | display: flex; 213 | 214 | flex-wrap: wrap; 215 | justify-content: space-around; 216 | align-items: center; 217 | margin:2.4rem 2.4rem; 218 | 219 | } 220 | 221 | .description-section .image-container { 222 | max-width: 900px; 223 | } 224 | 225 | .description-section .image-container img { 226 | padding: 2rem 2rem; 227 | border-radius: 8px; 228 | animation: floatAnimation 4s ease-in-out infinite alternate; 229 | } 230 | 231 | .description-section .content-container { 232 | 233 | max-width: 600px; 234 | 235 | } 236 | 237 | .description-section .title { 238 | font-family: 'Roboto', sans-serif; 239 | font-size: 1.5rem; 240 | font-weight: 700; 241 | margin-bottom: 0.5rem; 242 | color: #333; 243 | } 244 | 245 | .description-section .description { 246 | font-family: 'Roboto', sans-serif; 247 | font-size: 1.2rem; 248 | font-weight: 400; 249 | color: #666; 250 | } 251 | 252 | @keyframes floatAnimation { 253 | 0% { 254 | transform: translateY(-20px); 255 | } 256 | 100% { 257 | transform: translateY(20px); 258 | } 259 | } 260 | 261 | /* ENDS--------->>>>>>>>> */ 262 | 263 | 264 | /* Contribute Guid */ 265 | .contribute-guide h1 { 266 | font-family: 'Roboto', sans-serif; 267 | font-size: 2xl; 268 | font-weight: 700; 269 | color: #333; 270 | } 271 | 272 | .contribute-guide p { 273 | font-family: 'Roboto', sans-serif; 274 | font-size: 1rem; 275 | font-weight: 400; 276 | color: #666; 277 | } 278 | 279 | .contribute-guide .link { 280 | font-family: 'Roboto', sans-serif; 281 | font-size: 1rem; 282 | font-weight: 400; 283 | color: #333; 284 | text-decoration: underline; 285 | } 286 | 287 | /* ENDS------->>>>>>>>>>>>> */ 288 | 289 | 290 | 291 | 292 | 293 | /* Footer Style */ 294 | 295 | footer { 296 | margin-top: auto; 297 | background-color: rgba(0, 130, 230, 0.75); 298 | padding-top: 40px; 299 | color: #fff; 300 | } 301 | 302 | .footer-content { 303 | display: flex; 304 | align-items: center; 305 | justify-content: center; 306 | flex-direction: column; 307 | text-align: center; 308 | } 309 | 310 | .footer-content h3 { 311 | font-size: 2.1rem; 312 | font-weight: 500; 313 | text-transform: capitalize; 314 | line-height: 3rem; 315 | margin-top: 10px; 316 | } 317 | 318 | .footer-content p { 319 | max-width: 500px; 320 | margin: 10px auto; 321 | line-height: 28px; 322 | font-size: 14px; 323 | color: #cacdd2; 324 | } 325 | 326 | .socials{ 327 | list-style: none; 328 | display: flex; 329 | align-items: center; 330 | justify-content: center; 331 | margin: 1rem 0 3rem 0; 332 | } 333 | 334 | .socials li{ 335 | margin: 0 10px; 336 | } 337 | 338 | .socials a{ 339 | text-decoration: none; 340 | color: #fff; 341 | border: 1.1px solid white; 342 | padding: 10px; 343 | font-size: 1.2rem; 344 | border-radius: 50%; 345 | transition: all .3s ease; 346 | } 347 | 348 | .socials a i{ 349 | font-size: 1.1rem; 350 | width: 40px; 351 | transition: color .4s ease; 352 | } 353 | 354 | .socials a:hover i{ 355 | color: aqua; 356 | } 357 | 358 | .footer-bottom{ 359 | background: transparent; 360 | padding-top: 20px; 361 | padding-bottom: 30px; 362 | text-align: center; 363 | } 364 | 365 | .tweet:hover { 366 | color: white; 367 | background: rgb(0, 140, 255); 368 | } 369 | 370 | .mail:hover { 371 | color: salmon; 372 | background: white; 373 | } 374 | 375 | .git:hover { 376 | color: black; 377 | background: white; 378 | } 379 | 380 | .in:hover { 381 | color: #04669A; 382 | background: white; 383 | } 384 | 385 | .youtube:hover { 386 | color: red; 387 | background: white; 388 | } 389 | 390 | @media (max-width:500px) { 391 | .footer-menu ul{ 392 | display: flex; 393 | margin-top: 10px; 394 | margin-bottom: 20px; 395 | } 396 | } 397 | 398 | /* ENDS ------------->>>>>>>>> */ 399 | 400 | /* Scroll Button Style */ 401 | 402 | #scroll { 403 | position: fixed; 404 | bottom: 20px; 405 | right: 10px; 406 | height: 55px; 407 | width: 55px; 408 | display: none; 409 | place-items: center; 410 | border-radius: 50%; 411 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); 412 | cursor: pointer; 413 | } 414 | 415 | #scroll:hover { 416 | box-shadow: 0 0 150px 10px #0366d6; 417 | } 418 | 419 | #scroll-bar { 420 | display: block; 421 | height: calc(100% - 10px); 422 | width: calc(100% - 10px); 423 | background-color: #c3ddfa; 424 | border-radius: 50%; 425 | display: grid; 426 | place-items: center; 427 | font-size: 28px; 428 | color: #001a2e; 429 | } 430 | 431 | .pulse { 432 | margin: 0 auto; 433 | border-radius: 100px; 434 | position: absolute; 435 | left: -5.2px; 436 | top: -5.2px; 437 | z-index: 0; 438 | background-color: transparent; 439 | opacity: 0; 440 | width: 66px; 441 | height: 66px; 442 | border: 6px solid #0366d6; 443 | -webkit-border-radius: 100px; 444 | -moz-border-radius: 100px; 445 | -o-border-radius: 100px; 446 | -ms-border-radius: 100px; 447 | border-radius: 100px; 448 | -webkit-animation: pulse 1s linear infinite 0.3s; 449 | -moz-animation: pulse 1s linear infinite 0.3s; 450 | border-image: initial; 451 | } 452 | 453 | @-webkit-keyframes pulse { 454 | 0% { 455 | -webkit-transform: scale(0); 456 | opacity: 0; 457 | } 458 | 459 | 8% { 460 | -webkit-transform: scale(0); 461 | opacity: 0; 462 | } 463 | 464 | 15% { 465 | -webkit-transform: scale(0.1); 466 | opacity: 1; 467 | } 468 | 469 | 30% { 470 | -webkit-transform: scale(0.5); 471 | opacity: 1; 472 | } 473 | 474 | 100% { 475 | opacity: 0; 476 | -webkit-transform: scale(1.5); 477 | } 478 | } 479 | 480 | @-moz-keyframes pulse { 481 | 0% { 482 | -webkit-transform: scale(0); 483 | opacity: 0; 484 | } 485 | 486 | 8% { 487 | -webkit-transform: scale(0); 488 | opacity: 0; 489 | } 490 | 491 | 15% { 492 | -webkit-transform: scale(0.1); 493 | opacity: 1; 494 | } 495 | 496 | 30% { 497 | -webkit-transform: scale(0.5); 498 | opacity: 1; 499 | } 500 | 501 | 100% { 502 | opacity: 0; 503 | -webkit-transform: scale(1.5); 504 | } 505 | } -------------------------------------------------------------------------------- /graphics/back.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahil-sagwekar2652/GitHub-Automation-scripts/3cdc7b4acba73c272533ba65eff48bfa1aa833bc/graphics/back.jpg -------------------------------------------------------------------------------- /graphics/repo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahil-sagwekar2652/GitHub-Automation-scripts/3cdc7b4acba73c272533ba65eff48bfa1aa833bc/graphics/repo.jpg -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | GitHub Automation Scripts 🤖 11 | 14 | 15 | 16 | 30 | 31 |
32 |
33 |
34 | Image Description 35 |
36 |
37 |

About GitHub Automation Scripts

38 |

Bash and Python scripts to automate your Git & GitHub workflow. Made by using only standard python libraries.

39 | 40 |
41 |

Tech Stack

42 |
43 | Python 44 | Bash 45 | Git 46 | GitHub 47 |
48 |
49 |
50 |
51 |
52 | 53 |
54 |
55 |
56 | gitrepo-Floating-Image 57 |
58 |
59 |

GitHub Automation Scripts 🤖

60 |

All types of contributions are encouraged and valued. See the Table of Contents for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉

61 | 62 | 63 | GitHub 64 | 65 |
66 |
67 |
68 | 69 | 70 |
71 |
72 |

Contributing to GitHub-Automation-Scripts

73 |

First off, thanks for taking the time to contribute! ❤️

74 |

All types of contributions are encouraged and valued. See the Table of Contents for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉

75 |
76 |

And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:

77 |
    78 |
  • Star the project
  • 79 |
  • Tweet about it
  • 80 |
81 |
82 | 83 |

Table of Contents

84 | 89 | 90 |

Asking Questions

91 |

If you want to ask a question, join the 'GitHub Automation scripts' project channel on the GSSoC discord server. To join the project channel, make sure you have the 'GitHub Automation scripts' & 'Contributor' role assigned to you. If you don't have the role assigned to you, you can self-assign it in the #self-roles channel.

92 |

Before you ask a question, it is best to search for existing Issues that might help you. It is also advisable to search the internet for answers first.

93 |

If you then still feel the need to ask a question and need clarification, we recommend the following:

94 |
    95 |
  • Provide as much context as you can about what you're running into.
  • 96 |
  • Provide details about your OS and environment.
  • 97 |
98 | 99 |

How To Contribute

100 |
    101 |
  • Fork the project on GitHub, clone it on your PC.
  • 102 |
  • If you have an idea for an enhancement or a bug, you can first check the Issues to see if your question has been asked before.
  • 103 |
  • If you'd like to work on an issue, please ask the creator of the issue to assign it to you. This helps to keep the workflow streamlined.
  • 104 |
  • Create a new branch for your contribution and make the changes you want to make. (Always check for updates on the main branch before creating a pull request to avoid merge conflicts.)
  • 105 |
  • The pull request should mention the issue it is trying to solve and should be linked to it. Here is a video on how to link PRs to issues - video link.
  • 106 |
  • Make sure to make the appropriate changes in the README.md file if you are adding a new script or feature.
  • 107 |
108 | 109 |

Styleguides

110 |

This project uses the Flake8 linter to lint the Python code. If you are using VSCode, I would suggest installing the Flake8 linter extension for VSCode.

111 |
112 |
113 | 114 | 115 | 116 |
117 | 124 | 125 |
126 |

Installation

127 |

Requirements:

128 |
    129 |
  • Git Bash installed on your computer.
  • 130 |
  • GitHub personal access token. (Go to your GitHub profile -> Settings -> Developer settings -> Personal Access Tokens -> Create new token with all the repository permissions)
  • 131 |
132 |

Note: This script is written exclusively for Git Bash on Windows. You will have to modify it for other shells.

133 |
    134 |
  1. 135 |

    Fork and clone the repository locally.

    136 |
  2. 137 |
  3. 138 |

    Create a github_secrets.py file in the ./scripts folder and define the following variables inside it:

    139 |
    GITHUB_API_TOKEN = "Your GitHub personal access token"
    140 | USERNAME = "Your GitHub username"
    141 |
  4. 142 |
  5. 143 |

    Add the project path to the PATH variable (Recommended):

    144 |
    $ export PATH=$PATH":"$(pwd)"/scripts"
    145 |

    To permanently add the scripts path to the PATH variable, run the below command in the project's root directory. (This file is located in your home directory)

    146 |
    $ echo 'export PATH=$PATH''":'"$(pwd)"'/scripts''"' >> ~/.bash_profile
    147 |
  6. 148 |
  7. 149 |

    OR

    150 |

    Run the following commands in the project folder to add the scripts to your bin directory:

    151 |
    $ cp -r /scripts/* /usr/bin/
    152 |
  8. 153 |
154 |
155 | 156 | 171 | 172 | 198 |
199 | 200 |
201 |

Our Valuable Contributors

202 |
203 |
204 | 205 |
206 | 210 |
    211 |
  • 212 |
  • 213 |
  • 214 |
  • 215 |
  • 216 |
217 | 220 |
221 | 222 |
223 | 🠕 224 | 225 |
226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | -------------------------------------------------------------------------------- /js/contributors.js: -------------------------------------------------------------------------------- 1 | const cont = document.getElementById('contributor'); 2 | 3 | async function fetchContributors(pageNumber) { 4 | const perPage = 100; 5 | const url = `https://api.github.com/repos/sahil-sagwekar2652/GitHub-Automation-scripts/contributors?page=${pageNumber}&per_page=${perPage}`; 6 | 7 | const response = await fetch(url); 8 | if (!response.ok) { 9 | throw new Error(`Failed to fetch contributors data. Status code: ${response.status}`); 10 | } 11 | 12 | const contributorsData = await response.json(); 13 | return contributorsData; 14 | } 15 | 16 | // Function to fetch all contributors 17 | async function fetchAllContributors() { 18 | let allContributors = []; 19 | let pageNumber = 1; 20 | 21 | try { 22 | while (true) { 23 | const contributorsData = await fetchContributors(pageNumber); 24 | if (contributorsData.length === 0) { 25 | break; 26 | } 27 | allContributors = allContributors.concat(contributorsData); 28 | pageNumber++; 29 | } 30 | 31 | // Display contributors in the honeycomb-like layout 32 | allContributors.forEach((contributor) => { 33 | const contributorCard = document.createElement('div'); 34 | contributorCard.classList.add('contributor-card'); 35 | 36 | const avatarImg = document.createElement('img'); 37 | avatarImg.src = contributor.avatar_url; 38 | avatarImg.alt = `${contributor.login}'s Picture`; 39 | 40 | const loginLink = document.createElement('a'); 41 | loginLink.href = contributor.html_url; 42 | loginLink.appendChild(avatarImg); 43 | 44 | contributorCard.appendChild(loginLink); 45 | 46 | cont.appendChild(contributorCard); 47 | }); 48 | } catch (error) { 49 | console.error(error); 50 | } 51 | } 52 | 53 | fetchAllContributors(); 54 | -------------------------------------------------------------------------------- /js/scripts.js: -------------------------------------------------------------------------------- 1 | function openTab(evt, tabName) { 2 | var i, tabContent, tabLinks; 3 | 4 | tabContent = document.getElementsByClassName("tab-content"); 5 | for (i = 0; i < tabContent.length; i++) { 6 | tabContent[i].style.display = "none"; 7 | } 8 | 9 | tabLinks = document.getElementsByTagName("button"); 10 | for (i = 0; i < tabLinks.length; i++) { 11 | tabLinks[i].classList.remove("bg-gray-300"); 12 | tabLinks[i].classList.remove("active:bg-gray-300"); 13 | } 14 | 15 | document.getElementById(tabName).style.display = "block"; 16 | evt.currentTarget.classList.add("bg-gray-300"); 17 | evt.currentTarget.classList.add("active:bg-gray-300"); 18 | } 19 | 20 | // Functioning of the scroll up button 21 | 22 | let calcScrollValue = () => { 23 | let scrollProgress = document.getElementById("scroll"); 24 | let pos = document.documentElement.scrollTop; 25 | let calcHeight = 26 | document.documentElement.scrollHeight - 27 | document.documentElement.clientHeight; 28 | let scrollValue = Math.round((pos * 100) / calcHeight); 29 | if (pos > 100) { 30 | scrollProgress.style.display = "grid"; 31 | } else { 32 | scrollProgress.style.display = "none"; 33 | } 34 | scrollProgress.addEventListener("click", () => { 35 | document.documentElement.scrollTop = 0; 36 | }); 37 | scrollProgress.style.background = `conic-gradient(#0366d6 ${scrollValue}%, #d7d7d7 ${scrollValue}%)`; 38 | }; 39 | 40 | window.onscroll = calcScrollValue; 41 | window.onload = calcScrollValue; 42 | -------------------------------------------------------------------------------- /scripts/Maven build script/README.md: -------------------------------------------------------------------------------- 1 | 2 | --- 3 | 4 | # Maven Build Script 5 | 6 | This script is designed to build and test a Maven project. It automates the process of cleaning the project, building the project, and running tests. It also provides feedback on the success or failure of each step. 7 | 8 | ## Prerequisites 9 | 10 | Before running this script, ensure that you have the following prerequisites installed: 11 | 12 | - [Maven](https://maven.apache.org/) - The Apache Maven build tool. 13 | - [Java Development Kit (JDK)](https://www.oracle.com/java/technologies/javase-jdk11-downloads.html) - The Java development kit required for building and running the project. 14 | 15 | ## Usage 16 | 17 | To use this script, follow the steps below: 18 | 19 | 1. Open a terminal or command prompt. 20 | 2. Navigate to the directory where the script is located. 21 | 3. Make the script executable, if necessary, using the command: `chmod +x build.sh` 22 | 4. Run the script using the command: `./build.sh` 23 | 24 | ## Script Explanation 25 | 26 | The script performs the following steps: 27 | 28 | 1. **Clean the Project**: The command `mvn clean` is executed to clean the project directory by removing any previously compiled files or artifacts. 29 | 30 | 2. **Build the Project**: The command `mvn package` is executed to build the project. This step compiles the source code, runs any necessary tests, and packages the application into an executable artifact (e.g., JAR file). 31 | 32 | 3. **Check Build Status**: The script checks the exit code of the previous command using `$?`. If the exit code is `0`, it indicates a successful build. The script displays the message "Build completed successfully." Otherwise, it displays the message "Build failed." and exits with status `1`. 33 | 34 | 4. **Run Tests**: The command `mvn test` is executed to run any defined tests for the project. 35 | 36 | 5. **Check Test Results**: Similar to the previous step, the script checks the exit code of the previous command. If the exit code is `0`, it indicates that all tests passed. The script displays the message "All tests passed." Otherwise, it displays the message "Some tests failed." and exits with status `1`. 37 | 38 | -------------------------------------------------------------------------------- /scripts/Maven build script/maven_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Clean the project 4 | mvn clean 5 | 6 | # Build the project 7 | mvn package 8 | 9 | # Check if the build was successful 10 | if [ $? -eq 0 ]; then 11 | echo "Build completed successfully." 12 | else 13 | echo "Build failed." 14 | exit 1 15 | fi 16 | 17 | # Run tests 18 | mvn test 19 | 20 | # Check if tests passed 21 | if [ $? -eq 0 ]; then 22 | echo "All tests passed." 23 | else 24 | echo "Some tests failed." 25 | exit 1 26 | fi 27 | 28 | # Additional steps can be added here, such as generating documentation or creating artifacts 29 | 30 | # If everything succeeded, the built artifacts can be found in the target/ 31 | 32 | #Save this script in a file named build.sh, and make sure to provide the necessary permissions to execute the script by running chmod +x build.sh in the terminal. 33 | 34 | #To execute the script, navigate to the directory containing the script file (build.sh) in the terminal and run ./build.sh. 35 | 36 | #Make sure you have Maven installed and configured correctly in your environment before running this script. Adjust the script or include additional steps as needed based on your project's requirements. 37 | -------------------------------------------------------------------------------- /scripts/create_issue.py: -------------------------------------------------------------------------------- 1 | # Create Issue by Python 2 | 3 | import argparse 4 | import requests 5 | import json 6 | 7 | # Parse command-line arguments 8 | parser = argparse.ArgumentParser(description='Create a GitHub issue') 9 | parser.add_argument('owner', type=str, help='Repository owner') 10 | parser.add_argument('repo', type=str, help='Repository name') 11 | parser.add_argument('title', type=str, help='Issue title') 12 | parser.add_argument('description', type=str, help='Issue description') 13 | parser.add_argument('token', type=str, help='GitHub API token') 14 | args = parser.parse_args() 15 | 16 | # Get the command-line arguments 17 | owner = args.owner 18 | repo = args.repo 19 | title = args.title 20 | description = args.description 21 | token = args.token 22 | 23 | # Set the GitHub API endpoint for creating an issue 24 | url = f"https://api.github.com/repos/{owner}/{repo}/issues" 25 | 26 | # Set the headers with the API token for authentication 27 | headers = { 28 | 'Authorization': f'token {token}', 29 | 'Accept': 'application/vnd.github.v3+json' 30 | } 31 | 32 | # Set the issue data 33 | data = { 34 | "title": title, 35 | "body": description 36 | } 37 | 38 | # Send a POST request to create the issue 39 | response = requests.post(url, headers=headers, json=data) 40 | 41 | # Check the response status code 42 | if response.ok: 43 | # Issue created successfully 44 | issue_data = response.json() 45 | issue_number = issue_data.get('number') 46 | issue_url = issue_data.get('html_url') 47 | print("Issue created successfully!") 48 | print(f"Issue number: {issue_number}") 49 | print(f"Issue URL: {issue_url}") 50 | else: 51 | # Issue creation failed 52 | error_message = response.json().get('message', 'Unknown error') 53 | error_status = response.status_code 54 | error_response = json.dumps(response.json(), indent=4) 55 | print(f"Failed to create issue. Error status: {error_status}") 56 | print(f"Error message: {error_message}") 57 | print("Error response:") 58 | print(error_response) 59 | 60 | print("Thank you!") 61 | # Issue Created 62 | -------------------------------------------------------------------------------- /scripts/create_pull_request.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Set your GitHub access token and repository details 4 | TOKEN="YOUR_GITHUB_ACCESS_TOKEN" 5 | REPO_OWNER="OWNER" 6 | REPO_NAME="REPO_NAME" 7 | BASE_BRANCH="base_branch" # The branch you want to merge into 8 | HEAD_BRANCH="head_branch" # The branch you want to merge from 9 | PR_TITLE="Pull Request Title" 10 | PR_BODY="Pull Request Body" 11 | 12 | # Method 1: Using GitHub API with cURL 13 | create_pull_request_with_curl() { 14 | # Create a pull request using GitHub API 15 | pull_request=$(curl -X POST -H "Authorization: token $TOKEN" \ 16 | -d '{"title": "'"$PR_TITLE"'", "body": "'"$PR_BODY"'", "head": "'"$REPO_OWNER:$HEAD_BRANCH"'", "base": "'"$BASE_BRANCH"'"}' \ 17 | "https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/pulls") 18 | 19 | # Extract the pull request number from the response 20 | pr_number=$(echo "$pull_request" | jq -r '.number') 21 | 22 | # Check if the pull request was successfully created 23 | if [ -n "$pr_number" ] && [ "$pr_number" != "null" ]; then 24 | echo "Pull request created successfully using cURL. PR Number: $pr_number" 25 | else 26 | echo "Failed to create pull request using cURL. Error message:" 27 | echo "$pull_request" | jq -r '.message' 28 | fi 29 | } 30 | 31 | # Method 2: Using hub command-line tool 32 | create_pull_request_with_hub() { 33 | # Install hub if not already installed 34 | if ! command -v hub &> /dev/null; then 35 | echo "hub command-line tool is not installed. Installing..." 36 | sudo apt-get update 37 | sudo apt-get install hub -y 38 | fi 39 | 40 | # Create a pull request using hub 41 | hub pull-request -b "$REPO_OWNER:$BASE_BRANCH" -h "$REPO_OWNER:$HEAD_BRANCH" -m "$PR_TITLE" -m "$PR_BODY" 42 | } 43 | 44 | # Method 3: Using gh command-line tool 45 | create_pull_request_with_gh() { 46 | # Install gh if not already installed 47 | if ! command -v gh &> /dev/null; then 48 | echo "gh command-line tool is not installed. Installing..." 49 | sudo apt-get update 50 | sudo apt-get install gh -y 51 | fi 52 | 53 | # Create a pull request using gh 54 | gh pr create --base "$BASE_BRANCH" --head "$HEAD_BRANCH" --title "$PR_TITLE" --body "$PR_BODY" 55 | } 56 | 57 | # Execute the desired method to create a pull request 58 | # Uncomment the method you want to use, and comment out the others 59 | 60 | # Method 1: Using GitHub API with cURL 61 | # create_pull_request_with_curl 62 | 63 | # Method 2: Using hub command-line tool 64 | # create_pull_request_with_hub 65 | 66 | # Method 3: Using gh command-line tool 67 | # create_pull_request_with_gh 68 | -------------------------------------------------------------------------------- /scripts/create_repo: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | python create_repo.py "$@" 3 | -------------------------------------------------------------------------------- /scripts/create_repo.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | ''' 4 | This script is used to create a local repository linked with a remote repository. 5 | ''' 6 | 7 | # Imports the required modules 8 | import argparse # required for parsing the command line arguments passed to the script 9 | import os # required for creating the directory and changing the directory and running the git commands # noqa: E501 10 | import http.client # required for making the http request 11 | import json # required for parsing the response received from the http request 12 | from github_secrets import GITHUB_API_TOKEN, USERNAME # required for authenticating the http request and setting the user agent # noqa: E501 13 | 14 | 15 | # Checks if the environment variables are set or not. If not, raises an error as ValueError. # noqa: E501 16 | # Environment variables are set in the github_secrets.py file which contains the GITHUB_API_TOKEN and USERNAME # noqa: E501 17 | # The GITHUB_API_TOKEN is the personal access token generated from the GitHub account. # noqa: E501 18 | if not GITHUB_API_TOKEN: 19 | raise ValueError("Please set the environment variable GITHUB_API_TOKEN in the github_secrets.py file") # noqa: E501 20 | 21 | # Base URL for the GitHub API which is used to create a new repository # noqa: E501 22 | URL = "https://api.github.com/user/repos" 23 | 24 | # Creates a parser object of the argparse class 25 | # The parser object is used to parse the command line arguments passed to the script # noqa: E501 26 | # The parser object is used to create the help text for the script # noqa: E501 27 | parser = argparse.ArgumentParser(description='creates a local repository linked with a remote repository') # noqa: E501 28 | 29 | # Adds the arguments to the parser object 30 | parser.add_argument('path', # This argument can be accessed using the `path` variable # noqa: E501 31 | metavar='PATH', 32 | type=str, 33 | help='Enter the path for the new repository') 34 | parser.add_argument('name', # This argument can be accessed using the `name` variable # noqa: E501 35 | metavar='NAME', 36 | type=str, 37 | help='Enter a name for the new repository') 38 | args = parser.parse_args() # parses the arguments passed to the script. The arguments are stored in the `args` variable # noqa: E501 39 | 40 | name = args.name # stores the name of the repository from `args` in the name variable 41 | path = args.path # stores the path of the repository from `args` in the path variable 42 | 43 | 44 | # The following codes creates a new directory with the name of the repository and initializes it with git using the `os` module # noqa: E501 45 | os.chdir(path) # changes the directory to the path specified in the `path` variable # noqa: E501 46 | os.mkdir(name) # creates a new directory with the name specified in the `name` variable # noqa: E501 47 | os.chdir(name) # changes the directory to the newly created directory # noqa: E501 48 | os.system('git init -b main') # This executes 'git init -b main' as a system command as if it were written in git bash. It initializes the directory with git and sets the default branch to `main` # noqa: E501 49 | os.system('touch README.md') # creates a README.md file # noqa: E501 50 | os.system('git add . && git commit -m "initial commit"') # adds the newly created README.md file to the staging area and commits it with the message# noqa: E501 51 | 52 | 53 | # The following code makes a POST request to the GitHub API to create a new repository # noqa: E501 54 | conn = http.client.HTTPSConnection("api.github.com") # creates a connection object 55 | # The payload is the data that is sent 56 | payload = json.dumps({ 57 | "name": name, 58 | "description": "made with the GitHub API" 59 | }) 60 | 61 | # Metadata that is sent along with the request 62 | # The metadata contains the authorization token, the content type and the user agent # noqa: E501 63 | headers = { 64 | 'Authorization': f'Bearer {GITHUB_API_TOKEN}', 65 | 'Content-Type': 'application/json', 66 | 'User-Agent': f'{USERNAME}' 67 | } 68 | 69 | # The request is made to the URL with the payload and the headers 70 | # The response received is stored in the `res` variable 71 | # The response is read and decoded using utf-8 encoding and stored in the `data` variable 72 | # The `data` variable is parsed using the json module and stored in the `response` variable # noqa: E501 73 | # The `response` variable contains the response received from the GitHub API, which is a JSON object # noqa: E501 74 | conn.request("POST", "/user/repos", payload, headers) 75 | res = conn.getresponse() 76 | data = res.read().decode("utf-8") 77 | response = json.loads(data) 78 | 79 | print(response) 80 | remote_url = response['svn_url'] # stores the remoteurl using the key `svn_url` in the `response` variable # noqa: E501 81 | 82 | # Runs the git commands as system commands # noqa: E501 83 | os.system(f'git remote add origin {remote_url}') # adds the remote url to the local repository 84 | os.system('git push origin main') # Pushes the local repository to the remote repository 85 | print(f"\nREMOTE URL FOR \"{name}\" is: {remote_url}") # Prints the remote url 86 | -------------------------------------------------------------------------------- /scripts/create_repo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # GitHub Personal Access Token 4 | TOKEN="YOUR_PERSONAL_ACCESS_TOKEN" 5 | 6 | # Repository name 7 | REPO_NAME="new-repo" 8 | 9 | # Repository description 10 | REPO_DESCRIPTION="This is a new repository" 11 | 12 | # API endpoint 13 | API_URL="https://api.github.com/user/repos" 14 | 15 | # Create repository payload 16 | PAYLOAD=$(cat << EOF 17 | { 18 | "name": "$REPO_NAME", 19 | "description": "$REPO_DESCRIPTION", 20 | "private": false, 21 | "auto_init": false 22 | } 23 | EOF 24 | ) 25 | 26 | # Send POST request to create repository 27 | response=$(curl -s -H "Authorization: token $TOKEN" -d "$PAYLOAD" "$API_URL") 28 | 29 | # Check response status 30 | if [[ "$(echo "$response" | jq -r '.message')" == "Validation Failed" ]]; then 31 | echo "Error: Failed to create repository." 32 | echo "Reason: $(echo "$response" | jq -r '.errors[0].message')" 33 | else 34 | echo "Repository '$REPO_NAME' created successfully." 35 | fi 36 | -------------------------------------------------------------------------------- /scripts/delete_repo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Prompt the user to enter the repository name 4 | read -p "Enter the name of the repository to delete: " repo_name 5 | 6 | # Prompt for confirmation 7 | read -p "Are you sure you want to delete the repository '$repo_name'? This action cannot be undone. (y/n): " confirm 8 | 9 | # Convert the confirmation input to lowercase 10 | confirm=${confirm,,} 11 | 12 | # Check if the user confirmed the deletion 13 | if [[ $confirm != "y" ]]; then 14 | echo "Repository deletion canceled." 15 | exit 0 16 | fi 17 | 18 | # Authenticate the user using personal access token (PAT) 19 | # Replace with your actual personal access token 20 | auth_header="Authorization: token " 21 | 22 | # Delete the repository using the GitHub API 23 | response=$(curl -X DELETE -s -H "$auth_header" "https://api.github.com/repos/$repo_name") 24 | 25 | # Check the response status code 26 | if [[ $(echo "$response" | jq -r '.message') == "Not Found" ]]; then 27 | echo "Repository '$repo_name' not found." 28 | elif [[ $(echo "$response" | jq -r '.message') == "Bad credentials" ]]; then 29 | echo "Authentication failed. Please check your credentials." 30 | elif [[ $(echo "$response" | jq -r '.message') == "Repository marked for deletion." ]]; then 31 | echo "Repository '$repo_name' successfully deleted." 32 | else 33 | echo "An error occurred while deleting the repository." 34 | echo "Response: $response" 35 | fi 36 | -------------------------------------------------------------------------------- /scripts/fork_clone.py: -------------------------------------------------------------------------------- 1 | # Fork and Clone by Python 2 | 3 | import argparse 4 | import requests 5 | import json 6 | import os 7 | from github_secrets import GITHUB_API_TOKEN 8 | 9 | # Parse command-line arguments 10 | parser = argparse.ArgumentParser(description='Fork a repo') 11 | parser.add_argument('owner', type=str, help='Repository owner') 12 | parser.add_argument('repo', type=str, help='Repository name') 13 | # parser.add_argument('token', type=str, help='GitHub API token') 14 | parser.add_argument('name', type=str, help='Enter name for forked repo') 15 | args = parser.parse_args() 16 | 17 | # Get the command-line arguments 18 | owner = args.owner 19 | repo = args.repo 20 | # token = args.token 21 | token = GITHUB_API_TOKEN 22 | name = args.name 23 | 24 | # Set the GitHub API endpoint for forking a repo 25 | url = f"https://api.github.com/repos/{owner}/{repo}/forks" 26 | 27 | # Set the headers with the API token for authentication 28 | headers = { 29 | 'Authorization': f'token {token}', 30 | 'Accept': 'application/vnd.github.v3+json' 31 | } 32 | 33 | # Set the fork repo name 34 | data = { 35 | "name" : name 36 | } 37 | 38 | # Send a POST request to fork 39 | response = requests.post(url, headers=headers, json=data) 40 | 41 | # Check the response status code 42 | if response.ok: 43 | # Forked successfully 44 | fork_data = response.json() 45 | print("Forked successfully!") 46 | print(fork_data.get('clone_url')) 47 | else: 48 | # Fork failed 49 | error_message = response.json().get('message', 'Unknown error') 50 | error_status = response.status_code 51 | error_response = json.dumps(response.json(), indent=4) 52 | print(f"Failed to fork a repo. Error status: {error_status}") 53 | print(f"Error message: {error_message}") 54 | print("Error response:") 55 | print(error_response) 56 | 57 | # Code to Clone 58 | try: 59 | cmd = "git clone {}".format(fork_data.get('clone_url')) 60 | print("Starting to clone {}".format(fork_data.get('clone_url'))) 61 | print("Running command '{}'".format(cmd)) 62 | os.system(cmd) 63 | print("Finshed cloning {}".format(fork_data.get('clone_url'))) 64 | print("#####################################") 65 | print("") 66 | print("Thank you!") 67 | except NameError: 68 | print("Error cloning") 69 | # Forked and cloned successfully 70 | -------------------------------------------------------------------------------- /scripts/push_repo.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import argparse 4 | import os 5 | from github_secrets import GITHUB_API_TOKEN 6 | 7 | 8 | def parseArgs(): 9 | parser = argparse.ArgumentParser(description='Push an existing local repository to a newly created remote repository of the same name') # noqa: E501 10 | parser.add_argument('path', 11 | metavar='PATH', 12 | type=str, 13 | help='Enter the path for existing local repository') 14 | parser.add_argument('url', 15 | metavar='URL', 16 | type=str, 17 | help='Enter the newly created remote repository url (.git)') 18 | parser.add_argument('description', 19 | metavar='DESCRIPTION', 20 | type=str, 21 | help='Enter the description for remote repository') 22 | args = parser.parse_args() 23 | return args 24 | 25 | 26 | def pushRepo(remote_url): 27 | origin = remote_url[:8] + GITHUB_API_TOKEN + "@" + remote_url[8:] 28 | os.system(f'git push {origin} --mirror') 29 | 30 | 31 | def main(): 32 | path = args.path 33 | remote_url = args.url 34 | 35 | os.chdir(path) 36 | if os.path.isdir('./.git') is False: 37 | print("Not in a git directory") 38 | exit() 39 | 40 | pushRepo(remote_url) 41 | 42 | 43 | if __name__ == "__main__": 44 | args = parseArgs() 45 | main() 46 | --------------------------------------------------------------------------------