Jira Sync Workspace module
Synchronize the Jira workspace with the shared Jira workspace.
get_file_list(indir=None, extension=None)
Get the list of files in the specified directory.
:param indir: {str} - the directory to search for files :param extension: {str} - the file extension to filter on :returns file_list: {list} - the list of files found in the directory
Source code in jira_python_utils/jira_sync_workspace.py
get_files_lookup(indir)
Get the lookup of files in the specified directory.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
indir |
str
|
The directory to search for files. |
required |
Returns:
Type | Description |
---|---|
Dict[str, str]
|
Dict[str, str]: The lookup of files found in the directory. |
Source code in jira_python_utils/jira_sync_workspace.py
main(config_file, jira_id, logfile, outdir, outfile)
Synchronize the Jira workspace with the shared Jira workspace.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config_file |
Optional[str]
|
The configuration file. |
required |
jira_id |
str
|
The Jira ticket identifier. |
required |
logfile |
Optional[str]
|
The log file. |
required |
outdir |
Optional[str]
|
The output directory. |
required |
outfile |
Optional[str]
|
The output file. |
required |
Source code in jira_python_utils/jira_sync_workspace.py
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 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
|
prepare_commands(source_lookup, target_lookup, source_dir, target_dir, cmds)
Prepare the commands to synchronize the two directories.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
source_lookup |
Dict[str, str]
|
The lookup of files in the source directory. |
required |
target_lookup |
Dict[str, str]
|
The lookup of files in the target directory. |
required |
source_dir |
str
|
The source directory. |
required |
target_dir |
str
|
The target directory. |
required |
cmds |
List[str]
|
The list of commands to execute. |
required |
Returns:
Type | Description |
---|---|
List[str]
|
List[str]: The list of commands to execute. |
Source code in jira_python_utils/jira_sync_workspace.py
sync_directories(shared_jira_dir, jira_dir, config, config_file, logfile, outfile)
Synchronize the two directories.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
shared_jira_dir |
_type_
|
The shared Jira directory. |
required |
jira_dir |
_type_
|
The Jira directory. |
required |
config |
_type_
|
The configuration object. |
required |
config_file |
_type_
|
The configuration file. |
required |
logfile |
_type_
|
The log file. |
required |
outfile |
_type_
|
The output file. |
required |