Categorygithub.com/Minnek-Digital-Studio/cominnek
modulepackage
4.0.0+incompatible
Repository: https://github.com/minnek-digital-studio/cominnek.git
Documentation: pkg.go.dev

# README

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 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>

flagtypedescription
<version>StringThe 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

flagtypedescription
-m --messagestring[]Receives the commit message & body message
-M --mergestringReceives a Branch to merge after end the push
-F --featstringmake the commit with the prefix feat()
-f --fixstringmake the commit with the prefix fix()
-d --docsstringmake the commit with the prefix docs()
--stylestringmake the commit with the prefix style()
-r --refactorstringmake the commit with the prefix refactor()
--perfstringmake the commit with the prefix perf()
--teststringmake the commit with the prefix test()
-b --buildstringmake the commit with the prefix build()
--cistringmake the commit with the prefix ci()
--chorestringmake the commit with the prefix chore()
--revertstringmake the commit with the prefix revert()
--skip-commitstringSkip 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

flagtypedescription
-m --messagestring[]Receives the commit message & body message
-a --allbooleanAdd all files to the commit
-F --featstringmake the commit with the prefix feat()
-f --fixstringmake the commit with the prefix fix()
-d --docsstringmake the commit with the prefix docs()
--stylestringmake the commit with the prefix style()
-r --refactorstringmake the commit with the prefix refactor()
--perfstringmake the commit with the prefix perf()
--teststringmake the commit with the prefix test()
-b --buildstringmake the commit with the prefix build()
--cistringmake the commit with the prefix ci()
--chorestringmake the commit with the prefix chore()
--revertstringmake 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}

Commanddescription
featurecreate a new feature branch from develop
bugfixcreate a new bugfix branch from develop
hotfixcreate a new hotfix branch from master
releasecreate a new release branch from develop
supportcreate a new support branch from master
testcreate a new test branch from develop
synccreate a new sync branch from develop
Flagtypedescription
<Ticket>string*ticket number
-s --stashbooleantake 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>"
flagtypedescription
<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.

flagtypedefaultdescription
-t --ticketstringtake by branchname of the feature that's will be applied the change
-b --basestringdevelopbase 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>"
flagtypedescription
<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

flagtypedescription
-c --commitstringcommit hash
-y --confirmbooleanconfirm the reset
--hardbooleanReset HEAD, index and working tree
--softbooleanReset only HEAD
--mixedbooleanReset HEAD and index
--keepbooleanReset HEAD, index and working tree
--mergebooleanReset HEAD, index and working tree
-n -numbernumbernumber 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
Flagtypedescription
-b --bodystring*path to the template file

* required

Template file Example:

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

Keydescription
${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!

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author