title: Automated Changelog using JIRA, GitHub, and Jenkins
body: <p>My team recently switched to all three technologies in the past several months and have worked hard to get it up and running.  Next step is automating our changelogs.  We have JIRA set up look for the tags  (ex. TAG-123) in github commit messages.  Jenkins monitors the GitHub commits on a 5 minute timer, pulls, builds, etc.</p>
  
  <p>What I would like to see is a changelog generated automatically when a build is marked as "Promoted to Production."  I would like to see it do something akin to the following:</p>
  
  <ul>
  <li>Query Jenkins for the previous build marked as a production release and get the corresponding git commit SHA1.</li>
  <li>Run a diff in between the current Git commit and the previous commit</li>
  <li>Find all JIRA tickets that are referenced</li>
  <li>Compile a list of JIRA titles</li>
  <li>Have list export to a text file and placed in build drop (bonus if it can be accessed directly through Jenkins as well)</li>
  </ul>
  
  <p>Whether this flow is followed as written or not is irrelevant--I'm after the end result and am not looking to re-invent the wheel.. Surely somebody done something like this before?</p>
  
  <p>As far as reinvention goes, I was able to find <a href="https://wiki.jenkins-ci.org/display/JENKINS/Promoted+Builds+Plugin" rel="nofollow">https://wiki.jenkins-ci.org/display/JENKINS/Promoted+Builds+Plugin</a> which allows somebody to piggy-back on the Promote to Production action and run a separate script.  It would then be a matter of gathering functionality to accomplish the above. (I also noticed Jenkins can tag the current GitHub commit, which my team would likely do in addition.)</p>
  
  <p>Anything closer to accomplishing this would be greatly appreciated.</p>
  
  <p>Thank you!</p>