I'm using the jira-python client to add a comment to an issue:
issue_id = 'SB-196'
comment = 'A Slack channel has been created for discussing this escalation: slack://channel?id={}&team={}'.format(new_channel_id, SLACK_TEAM_ID)
jira.comment(issue_id, comment)
The jira-python client is just a wrapper around the JIRA rest api. When I execute the code, I get a 404 error from JIRA which is recieving the following URL:
https://jira.mycompany.com/rest/api/2/issue/SB-196/comment/A%20Slack%20channel%20has%20been%20created%20for%20discussing%20this%20escalation:%0Aslack://channel?id=C123456&team=T123456
I'm assuming this is happening because it's trying to encode the Slack URL in the REST URL and getting confused. What's the correct way to encode the including URL so it doesn't get confused? Thanks!