0

I am using Python with GitPython to read various commits of the Lucene project. Those commits contain messages like

LUCENE-4797: enable doclint html verification
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1658040 13f79535-47bb-0310-9956-ffa450edef68

Now, with that commit message, I want to decide if that specific commit was a bug-fix or not. I want to do this using the Jira API (in python).

I tried doing something like this, but that doesn't work.

jira = JIRA({'server': 'https://issues.apache.org/jira/'})
// what do I have to search for ?
issue = jira.issue('13f79535-47bb-0310-9956-ffa450edef'); 

How can I do this properly ?

dimitris93
  • 4,155
  • 11
  • 50
  • 86
  • Let's forget the REST API for a second - how would you actually, in the real world, figure out that commit was a bugfix or not? From, let's say, what the JIRA UI shows you? I mean, you have a random commit under a random issue.. – rorschach Sep 18 '16 at 16:43
  • @rorschach The issue is from the commit message. It is not random. There is a relation between issue and commit – dimitris93 Sep 18 '16 at 16:55
  • Yes, I understand that. You said **"I want to decide if that specific commit was a bug-fix or not"**. What exactly do you mean by that? Do you actually mean whether the Issue that commit was made under is of type **Bug**? – rorschach Sep 18 '16 at 16:57
  • @rorschach Yes. – dimitris93 Sep 18 '16 at 16:58
  • 1
    Ok, so.. You have a commit message with the Issue Key. [JIRA REST API](https://docs.atlassian.com/jira/REST/server/#api/2/issue-getIssue) allows you to query Issue data by Key. The response will have information about the Issue Type. – rorschach Sep 18 '16 at 17:00

0 Answers0