Skip to content

Draft: brainstorm #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: production
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions TODO.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# TODO[Johan] lokale overrides mogelijk maken

# TODO[Johan] sub-taskfiles:
- gespecialiseerde groepjes tasks die je normaal niet in detail in het hoofd file wil
- voorbeelden: git-hooks, ci commando's, project specifieke dingen als cache/queue/shopware-plugin manupilatie
- een task in het hoofd-file
- als je die aanroept, is dat effectief "help" in het subfile
- als je die aanroept met een task uit het subfile er achter, roep je de task uit het subfile aan
- dus: `./Taskfile git-hooks pre-commit`
- of: `./Taskfile ci start-fold`

# TODO[Johan] aliassen voor tasks (ie: init en install :-P)

# TODO[Johan] taskmaster bespreken:
- prima als default alias 'task' is
- ook in bovenliggende mapjes zoeken
- shell completion hierin stoppen
- self-updaten door file opnieuw te downloaden van url
- commandotje er in doen om gehele Taskfiles te genereren / nieuwe modules te downloaden?

# TODO[Johan] Makefile convertor maken?

# TODO[Johan] taskfile.sh claimen

38 changes: 38 additions & 0 deletions Taskfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,44 @@ function task:production { ## Build and run production output
docker run --rm --publish 3089:80 --name tasksite --volume ./out:/var/www nstapelbroek/static-webserver:5
}

# Todo: Token als je meerdere Jira-omgevingen hebt
# TODO[Johan] Was er een reden dat we een project-specifiek token maakte? Zo nee, dan "default token gebruiken" afmaken
function task:jira:init {
title "Setting up Jira integration"
# shellcheck disable=SC2046
if [ ! $(jira me) ]; then
echo "In order to interact with Jira from the terminal you need to create an API token."
gum confirm "Open your browser to generate a Jira token?" && open https://id.atlassian.com/manage-profile/security/api-tokens
token=$(gum input --placeholder="Paste Jira token here" --password)
export JIRA_API_TOKEN="$token"
jira init
task:restart

fi
if [ ! -f ~/.config/.jira/mcmain.yml ]; then
docker:exec api "jira init --installation cloud --server https://enrise.atlassian.net --project MCMAIN --board 'MCMAIN board' --config ~/.config/.jira/mcmain.yml"
else
echo Jira set up correctly
fi
}

function task:jira { ## Run jira commands
docker:exec api "jira --config ~/.config/.jira/mcmain.yml $*"
}

function task:jira:status { ## Move the ticket to a status
## Branch & open new MR
issue=$(git branch --show-current)
docker:exec api "jira --config ~/.config/.jira/mcmain.yml issue move $issue"
docker:exec api "jira --config ~/.config/.jira/mcmain.yml issue assign $issue"
}

function task:jira:web { ## Open the ticket in your browser
ticket=$(git branch --show-current)
open https://enrise.atlassian.net/browse/$ticket
}


# =========================================================
## Automation
# =========================================================
Expand Down