Git Manager

Job ID: 35234656

Budget: $30 – $250 USD

I need a Laravel CLI Application.

# Commands #

- sources:add
1) Enter the name of the source: (own name to easily remember it, like a Personal Github Account)
2) Script now generates an SSH key
3) Please add this public SSH key to your account and press enter: key_acAEGHseagrhtaegaegh
4) Save the source in database

- sources:list (list sources by names and their public ssh key)

- repositories:add (Add a new repository)
1) Enter name (own name to easily remember it by)
2) Select source (select from sources)
3) Enter GIT URL (example: git@githubserver:user/repo.git)
4) Check that we can pull from the repo with the source SSH key.
5) Save the repository in the database

- connectors:add
1) Name of connector: (own name for easy understanding)
2) Select main repository (select a repository from DB)
3) Select branches (multiple branches from the main repository is possible here)
3) Select target repository (select a repository from DB, not the same)
4) Select target repository branch prefix: (enter a prefix)
5) Save in database

- connectors:list (list connectors by name, main repo, target repo, branch prefix)

- connectors:run
1) This will do the following steps for each connector.
2) Create a new temporary folder for this connector
3) Pull main repository into that folder
6) Add target repository as remote
4) The below steps will be done for each branch selected (selected when creating the connector)
5) Checkout the branch from the main remote (if a branch does not exist, send the error detailed below)
6) Now force push to branch name, matching the current branch, but prefixed with the target prefix set when creating the connector (force to overwrite in case anything exists at target repository with this branch name)
7) After this is done for all branches, delete the temporary folders for this connector. Then continue with the next connector.

Errors should trigger an email with the description, and as many details as possible, like command log, repository, connector, branch public SSH key, and so on. This is the case for all errors that can happen within the system.

The system must be interacting with "git" and not directly with Github API. This way we have support for sources such as Github, Bitbucket, Gitlab, and so on. Any GIT server is now supported.

The goal is to kinda fork repositories across multiple sources, like GitHub and Gitlab, and have the option to keep some branches up to date with the original repository.
For example, forking https://gitlab.com/gitlab-org/gitlab, then we fork it to our own GitHub repository, using a connector, this will create a new branch for each branch we selected from the original, like let's say we selected the "master" branch and the "v15.4.5-ee" branch. With the prefix "originals/", these will be created in our repository as "originals/master" and "originals/v15.4.5-ee".
Related categories: PHP MySQL Laravel Git