Coder Social home page Coder Social logo

github_laravel_automation's Introduction

GitHub_Laravel_Automation

Recently i have had to work with laravel and creating a new repo and new laravel project (* honestly i kept forgetting a the command *) and it was sort of time consuming (something like that) so this script creates a new laravel project, git repo and also pushes it.

Prequities

  1. python. Python is need to run the script and also some pip installations

  2. GitHub Token

    1. Login to your Github account.
    2. Go to Settings -> Developer Settings ->Personal Access Tokens
    3. Click on Generate new token. Confirm your password to continue.
    4. Give any description to your token.
    5. Under scopes check all you want the API to have access to in your account. I checked all the boxes.
    6. Click Generate new token.
    7. tanks to this meduim post. lot more github endpoints

Config

  1. First install pip install requests so we can make the request to github api
  2. First install pip install python-dotenv this so we can have an .evn file in the same root folder as create.py
    1. Create A variable in the .evn called GITHUB_USERNAME=
    2. Create A variable in the .evn called GITHUB_TOKEN=
    • You don't need to use and env file it's just safer soo yeah, you could go to create.py and hardcode your username and token still works

How to run

  1. You can run this by opening the root directory (where the create.py is) and running python create.py name-of-project -repo -push -vs -lara (this creates a laravel project, a github repo , and make an initial push to main)

  2. You will be prompted to Enter a path : give a path you want your project to be created ,repo created or pushed

Command Flags

  1. python create.py name-of-project -repo creates and initializes a repo with the name of project (please ensure the name is unique which means you have no other repo with the same name)
  2. python create.py name-of-project -repo -push -push pushes the repo (-push must be used with -repo)
  3. python create.py name-of-project -vs this opens up vs after script is run
  4. python create.py name-of-project -lara this creates a laravel project
  5. python create.py name-of-project -repo -push -vs -lara creates, initializes , pushes and opens up vscode

I hope this helps !!! you could just ignore all this and create a project the normal way but what's the fun in that.

github_laravel_automation's People

Contributors

adams-ijachi avatar daking24 avatar

Stargazers

 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.