Jira Start Task module
Start a Jira task.
create_metadata_file(jira_dir, jira_id, url, title)
Create a [jira_id].metadata.json file.
This will contain information about the Jira issue that can be parsed by other scripts for report generation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
jira_dir |
str
|
The Jira issue-specific directory. |
required |
jira_id |
str
|
The Jira issue identifier. |
required |
url |
str
|
The Jira issue-specific URL. |
required |
title |
str
|
The summary of the Jira issue. |
required |
Source code in jira_python_utils/jira_start_task.py
create_readme_file(jira_dir, jira_id, url, title, verbose=constants.DEFAULT_VERBOSE)
Create a README.md file in the Jira issue directory.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
jira_dir |
str
|
The Jira issue-specific directory. |
required |
jira_id |
str
|
The Jira issue identifier. |
required |
url |
str
|
The Jira issue-specific URL. |
required |
title |
str
|
The summary of the Jira issue. |
required |
verbose |
bool
|
If True, print more details to STDOUT. Defaults to DEFAULT_VERBOSE. |
DEFAULT_VERBOSE
|
Source code in jira_python_utils/jira_start_task.py
create_symlink_directory(jira_dir, verbose=constants.DEFAULT_VERBOSE)
Create a symlink to the Jira issue-specific directory in the user's home directory.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
jira_dir |
str
|
The Jira issue-specific directory. |
required |
verbose |
bool
|
If true print more info to STDOUT. Defaults to DEFAULT_VERBOSE. |
DEFAULT_VERBOSE
|
Source code in jira_python_utils/jira_start_task.py
echo_script(jira_id, jira_dir)
Echo the script command to execute when ready to start.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
jira_id |
str
|
The Jira issue identifier. |
required |
jira_dir |
str
|
The Jira issue-specific directory. |
required |
Source code in jira_python_utils/jira_start_task.py
get_home_jira_dir()
Derive the Jira directory in the user's home directory.
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
The Jira directory in the user's home directory. |
Source code in jira_python_utils/jira_start_task.py
initialize_jira_directory(jira_root_dir, jira_id, verbose=constants.DEFAULT_VERBOSE)
Create the Jira id directory and return the that path.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
jira_root_dir |
str
|
The root directory where the Jira issue-specific directory will be created |
required |
jira_id |
str
|
The Jira issue id |
required |
Returns:
Name | Type | Description |
---|---|---|
dir |
str
|
The absolute path to the Jira issue directory created |
Source code in jira_python_utils/jira_start_task.py
main(config_file, credential_file, jira_id, jira_root_dir, logfile, outdir, verbose)
Start a Jira task.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config_file |
Optional[str]
|
The configuration YAML file. |
required |
credential_file |
Optional[str]
|
The file containing the username and password for logging into Jira. |
required |
jira_id |
str
|
The Jira ticket identifier. |
required |
jira_root_dir |
str
|
The root directory where your Jira issue-specific subdirectories are created. |
required |
logfile |
Optional[str]
|
The log file. |
required |
outdir |
Optional[str]
|
The default is the current working directory - default is '{DEFAULT_OUTDIR}'. |
required |
verbose |
Optional[bool]
|
If true, print more info to STDOUT - default is '{DEFAULT_VERBOSE}'. |
required |
Source code in jira_python_utils/jira_start_task.py
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 |
|