Search code examples
gittracking

Report to summarize changes made between builds in GIT


Challenge description - "GIT has functions that allow you to pull reports that summarize changes. The goal of this task is to create the instructions that would: 1 - enable a non-developer to create this report./n 2 – provide methods to identify the indexes needed to enable a tester to understand how to map the changes to the functions/user stories."

How should I go ahead with this task. What are the methods which identify the indexes to enable one to understand how to map changes. I know about how git diff works. What else should I study to research on this.

Any leads will be much appreciated.


Solution

  • I assume two builds means, two tagged release builds.

    In order to track the stories, we can have git hook which ensures that story number is associated with commit. Once the story number is mandated in the git commit, its easy to fetch the all the stories done between the tagged builds. The hook has to created in such a way that is easy to parse the commit message and fetch the story number.

    For example,

    git log master..v5 --pretty=oneline | perl -ne '{ /(\w+)-(\d+)/ && print "$1-$2\n" }' | sort | uniq

    We use this script to fetch the list of stories done between the builds