Bash-it / bash-it

A community Bash framework.
MIT License
14.14k stars 2.29k forks source link

Add pre-jgitflow function #2234

Open ppalazon opened 7 months ago

ppalazon commented 7 months ago

Add pre-jgitflow function

Description

Prepare a function to be executed before any jgitflow command

Motivation and Context

I have to check if I had access to my codeartifact repository before any jgitflow command. With this improvement I can implement this function on my ~/.bashrc file, and it would be executed before any jgitflow command.

function pre-jgitflow {
    source aws-auth-codeartifact
    return $(test -n "$CODEARTIFACT_AUTH_TOKEN")
}

How Has This Been Tested?

I've been testing this process for a few months, but I don't know how to write a unit test on this framework.

Screenshots (if appropriate):

Types of changes

Checklist: