Skip to content
This repository was archived by the owner on Jan 30, 2021. It is now read-only.
This repository was archived by the owner on Jan 30, 2021. It is now read-only.

Git commit automation #146

@armcknight

Description

@armcknight
  • add a Git commit template
  • add the JIRA ticket/name automation script from the Git Workflow document to .git/hooks/prepare-commit-msg:
#!/bin/bash
PREPENDED_MSG=$(git rev-parse --abbrev-ref HEAD | sed -E -e 's/([a-zA-Z])-([0-9])/\1###\2/g' -e 's/([^a-zA-Z])-/\1 /g' -e 's/-([^0-9])/ \1/g' -e 's/###/-/g' | awk -F/ '$0=$NF')
sed -i.back "1s/^\s*$/$PREPENDED_MSG/" "$1"
  • Maybe?: Add a check to .git/hooks/pre-commit to check for a link to the jira ticket and reject if not present

... we would need a way to bootstrap these into a developer's local clone, via e.g. a make init as mentioned in #129

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions