Review Board 1.7.22


SQOOP-1144 Sqoop2: Add fixVersion to PreCommit branch detection

Review Request #15630 - Created Nov. 17, 2013 and updated

Jarek Cecho
SQOOP-1144
Reviewers
Sqoop
sqoop-sqoop2
Added field fixVersion to branch detection.
Tested locally.

Diff revision 2 (Latest)

1 2
1 2

  1. dev-support/test-patch.py: Loading...
dev-support/test-patch.py
Revision 0196cfa381751391ead13830503b29de15eda0dc New Change
[20] 144 lines
[+20] [+] def jira_get_attachment(result, defect, username, password):
145
  return None
145
  return None
146

    
   
146

   
147
# Get versions from JIRA JSON object
147
# Get versions from JIRA JSON object
148
def json_get_version(json):
148
def json_get_version(json):
149
  versions = []
149
  versions = []
150
  for version in json.get("fields").get("versions"):
150

   

    
   
151
  # Load affectedVersion field

    
   
152
  for version in json.get("fields").get("versions", []):

    
   
153
    versions = versions + [version.get("name")]

    
   
154

   

    
   
155
  # Load fixVersion field

    
   
156
  for version in json.get("fields").get("fixVersions", []):
151
    versions = versions + [version.get("name")]
157
    versions = versions + [version.get("name")]

    
   
158

   
152
  return versions
159
  return versions
153

    
   
160

   
154
def git_cleanup():
161
def git_cleanup():
155
  rc = execute("git clean -d -f", False)
162
  rc = execute("git clean -d -f", False)
156
  if rc != 0:
163
  if rc != 0:
[+20] [20] 253 lines
  1. dev-support/test-patch.py: Loading...