Giter VIP home page Giter VIP logo

cominnek's Introduction

Minnek Logo


Cominnek "Go"

Create commits & pull requests easily. Cominnek is based on TAYO by Minnek.

Index

Requirements

Installation

  1. Download installer

Macos Windows Linux

  1. Run installer (See MAC Os steps)

  2. Now you can run

cominnek -v

How to install on WSL

Next we will see how to install cominnek in WSL 2 and the necessary packages for authentication.

Install Comminek

  1. Open the terminal.
  2. Download Package
wget https://github.com/Minnek-Digital-Studio/cominnek/releases/latest/download/cominnek-4.0.0.deb
  1. Install package cominnek.deb
sudo dpkg -i ./cominnek-4.0.0.deb
  1. Verify Installation
cominnek -v

Install dependencies for auth.

If you have problem with xdg-open follow this steps

  1. Install xdg-utils
sudo apt-get install xdg-utils
  1. Add repository of wsl utils
sudo add-apt-repository ppa:wslutilities/wslu
  1. Update
sudo apt update
  1. Install wsl utils
sudo apt install wslu

How to install on Mac

After mounting the installer maybe you would have some issues at the moment to run the installer on Mac since OS blocks the installer app. So you will need to run the installer.sh manually.

Install manually

  1. Open the terminal.

  2. Move into Volumes directory.

$ cd  /Volumes/cominnek-$version/
  1. Run the bash installer
$ sudo bash installer.sh

Update

You can get the latest version of cominnek by running the following command:

cominnek update

First steps:

Login into your GitHub account

cominnek auth login

Then you can test the connection with the:

cominnek auth test

Usage

  • Init: Initialize cominnek.
  • Update version: Create and push a commit with the correct template for conventional commits.
  • Push: Commit and push the branch to GitHub.
  • Publish: Commit, push and create the pull request as a draft to develop in GitHub.
  • Commit: Commit the changes to the branch.
  • Branch: Create a new branch.
  • Stash: Stash changes from one branch to another one.
  • PR: Create a Pull Request as a draft to develop in GitHub.
  • Merge: Merge the branch into the received branch.
  • Reset: Reset the branch to the selected commit.
  • Release: Release a new version. (⚠️ Experimental)
  • Update: Update the cominnek version.
  • Config: Configure the cominnek.
    • PR: Configure the pull request template.
  • Auth: Configure the GitHub authentication.
    • Login: Login into your GitHub account.
    • Test: Test the connection with GitHub.
    • Logout: Logout from your GitHub account.

Init

Initialize cominnek.

cominnek init

This will create a .minnekrc.json file in the root of your project.

Update version

Create and push a commit with the correct template for conventional commits.

cominnek update-version <version>

the commit will be: build: update version to <version>

flag type description
<version> String The version to update

Push

Commit and push the branch to GitHub

cominnek push -m "do some modifications" --fix "home"

the commit will be: fix(home):{Ticket} do some modifications

{Ticket} is the ticket number See more information in the Ticketing system

flag type description
-m --message string[] Receives the commit message & body message
-M --merge string Receives a Branch to merge after end the push
-F --feat string make the commit with the prefix feat()
-f --fix string make the commit with the prefix fix()
-d --docs string make the commit with the prefix docs()
--style string make the commit with the prefix style()
-r --refactor string make the commit with the prefix refactor()
--perf string make the commit with the prefix perf()
--test string make the commit with the prefix test()
-b --build string make the commit with the prefix build()
--ci string make the commit with the prefix ci()
--chore string make the commit with the prefix chore()
--revert string make the commit with the prefix revert()
--skip-commit string Skip the commit and only push the branch

* required

Publish

Commit, push and create the pull request as a draft to develop in GitHub. the commit will be: feat(home):{Ticket} do some modifications

The usage is the same as push just with the difference that this creates a pull request.

cominnek publish -m "do some modifications" --fix "home"

Commit

Will commit the changes to the branch.

cominnek commit -m "do some modifications" --fix "home"

the commit will be: feat(home):{Ticket} do some modifications

{Ticket} is the ticket number See more information in the Ticketing system

flag type description
-m --message string[] Receives the commit message & body message
-a --all boolean Add all files to the commit
-F --feat string make the commit with the prefix feat()
-f --fix string make the commit with the prefix fix()
-d --docs string make the commit with the prefix docs()
--style string make the commit with the prefix style()
-r --refactor string make the commit with the prefix refactor()
--perf string make the commit with the prefix perf()
--test string make the commit with the prefix test()
-b --build string make the commit with the prefix build()
--ci string make the commit with the prefix ci()
--chore string make the commit with the prefix chore()
--revert string make the commit with the prefix revert()

* required

Branch

Create a new branch with the prefix feature/, bugfix/, hotfix/ or release/ and the name of the branch will be the ticket number.

We are following a Git-Flow variant called TAYO by Minnek

cominnek branch feature "<Ticket>"

This the equivalent of: git branch feature/{Ticket}

Command description
feature create a new feature branch from develop
bugfix create a new bugfix branch from develop
hotfix create a new hotfix branch from master
release create a new release branch from develop
support create a new support branch from master
test create a new test branch from develop
sync create a new sync branch from develop
Flag type description
<Ticket> string* ticket number
-s --stash boolean take the changes in the current branch and apply it to the new feature's branch

* required

Stash

Stash all the changes in the current branch and apply the changes to another branch.

cominnek stash "<Branch>"
flag type description
<Branch> string* branch name

PR

Create a pull request as a draft directly to develop

cominnek pr

The flag --ticket is optional. If it's not provided this will take the ticket number from the current branch.

flag type default description
-t --ticket string take by branch name of the feature that's will be applied the change
-b --base string develop base branch of the pull request.

In a case of a release branch, it will create a pull request to master and develop.

Merge

Merge the current branch into the received one. This will help you save time when you are working on a feature branch and you want to merge, for example, the feature branch into the test branch.

cominnek merge "<branch>"
flag type description
<branch> string* name of the branch that's will be applied the changes

* required

Reset

Reset the current branch to the selected commit. By default, it will reset to the last commit.

cominnek reset

This the equivalent of: git reset --soft HEAD~1

flag type description
-c --commit string commit hash
-y --confirm boolean confirm the reset
--hard boolean Reset HEAD, index and working tree
--soft boolean Reset only HEAD
--mixed boolean Reset HEAD and index
--keep boolean Reset HEAD, index and working tree
--merge boolean Reset HEAD, index and working tree
-n -number number number of commits to reset

Release (Experimental)

⚠️ This is an experimental feature. You can report any issue here

Release a new version using semantic versioning

cominnek release

Update

Update the Cominnek version.

cominnek update

Config

Configure the cominnek.

cominnek config -h

PR

This command will help you to modify the pull request template.

cominnek config pr -b path/to/template.md
Flag type description
-b --body string* path to the template file

* required

Template file Example:

In some cases, you will want to set some dynamic values, for example, ticket number.

Key description
${ticket} Ticket number
${branch} Head branch name
# Example

- Ticket: ${ticket}
- Branch: ${branch}

Auth

This command will help you to set the GitHub token.

cominnek auth -h

Login

This command will help you to set the GitHub token.

cominnek auth login

Test

This command will help you to test the GitHub token.

cominnek auth test

Logout

This command will help you to remove the GitHub token.

cominnek auth logout

Examples and more

You can add a body to commit using the --message flag twice.

cominnek push -m "Changes in home page" -f "home" -m "the title was aligned to right"

This is the same as git commit -m "fix(home):{Ticket} Changes in home page" -m "the title was aligned to right"

{Ticket} is the ticket number See more information in the Ticketing system


To do a commit without a scope, use the flag and on windows, you should use it with a space.

Mac Os and Linux:

cominnek push -m "theme setup" -b

Windows:

cominnek push -m "theme setup" -b " "

the commit will be: build: theme setup


Move your changes to a new feature branch

cominnek feature "<Ticket>" -s

Ticketing system

This takes the ticket number from the branch name. This is important to create the pull request with the correct ticket number.

Example:

You are in the branch feature/MJ-11

The ticker number will be MJ-11

If you execute the command:

cominnek push -m "Changes on homepage" -F "home"

the commit will be: feat(home): MJ-11 Changes on the homepage

What about if I am not in a feature branch?

This going to let you know that you are not in a feature branch and you will accept the commit without a ticket number.

Example: You're in the branch develop

$ cominnek push -m "Changes in home page" -F "home"
  This is not a feature. Do you want to continue? (yes or no)
        Commit message: "feat(home): Changes in home page"

Contributing

If you want to contribute to this project, please read the contributing guide

Cominnek V4.0.0

With ❤ by isaacismaelx14

About

Minnek Logo

This project is maintained and funded by Minnek.

We ❤️ open source and do our part in sharing our work with the community! See our other projects or hire our team to help build your product.

Want to join? Check out our Jobs!

cominnek's People

Contributors

anthuanvasquez avatar jcorona48 avatar isaacismaelx14 avatar dependabot[bot] 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.