Description¶
Posts a comment to a Jira issue using the Jira API. Supports Jira wiki markup formatting in comments. Designed to run in automated pipelines and fails gracefully if credentials are not available.
Usage¶
python3 tools/jira_add_comment.py <issue-key> <comment>Arguments¶
issue-key (required) - Jira issue key (e.g., AEAREP-8885 or aearep-8885, case-insensitive)
comment (required) - Comment text (Jira wiki markup supported)
Example¶
python3 tools/jira_add_comment.py AEAREP-8885 "Pipeline completed successfully"
# With Jira markup
python3 tools/jira_add_comment.py aearep-1234 "*Pipeline Status:* ✅ Complete"Requirements¶
Python >= 3.6
jira: Python Jira library
Environment Variables Required¶
JIRA_USERNAME- Your Jira email addressJIRA_API_KEY- API token from https://id .atlassian .com /manage -profile /security /api -tokens
Behavior¶
On success: Prints confirmation to stdout
On failure: Prints warning to stderr (non-fatal; always exits with code 0)
Missing credentials: Prints warning and exits gracefully
This design allows the script to be used in pipelines where Jira access may not always be available without causing pipeline failures.
See Also¶
jira_get_info.py - Retrieve Jira issue information
jira_find_task_by_icpsr.py - Find Jira tasks by openICPSR ID
70
_publish _outcomes .sh - Uses this tool to post pipeline results