You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JIRA_TICKET_TITLE: "[API Platform] Some APIs are approaching their sunset date. ID: ${{steps.retrieve-sunset-apis.outputs.hash_code_sunset_apis}}"
112
-
JIRA_TICKET_DESCRIPTION: "The following APIs will be sunset in the next 3 weeks. Please follow our [wiki|https://wiki.corp.mongodb.com/display/MMS/API+eXperience+Production+Checklist#APIeXperienceProductionChecklist-APISunsetActionItems]. {code:json}${{steps.retrieve-sunset-apis.outputs.sunset_apis}}{code}"
113
-
run: .github/scripts/create_jira_ticket.sh
117
+
run: |
118
+
sunset_apis=$(cat sunset_apis.json | sed 's/"/\\"/g')
119
+
JIRA_TICKET_DESCRIPTION="The following APIs will be sunset in the next 3 weeks. Please follow our [wiki|https://wiki.corp.mongodb.com/display/MMS/API+eXperience+Production+Checklist#APIeXperienceProductionChecklist-APISunsetActionItems]. {code:json}${sunset_apis}{code}"
120
+
export JIRA_TICKET_DESCRIPTION
121
+
.github/scripts/create_jira_ticket.sh
114
122
115
123
# Send Slack notification only if the Jira ticket was created
message_id=$(curl -X POST -H 'Authorization: Bearer '"${SLACK_BEARER_TOKEN}" \
125
133
-H 'Content-type: application/json' \
126
-
--data '{"channel":"'"${SLACK_CHANNEL_ID}"'","text":"The following APIs are scheduled to be sunset in the next 3 weeks: see :thread:. Jira Ticket: https://jira.mongodb.org/browse/'"${JIRA_TICKET_ID}"'","parse": "full",}' https://slack.com/api/chat.postMessage | jq '.ts')
134
+
--data '{"channel":"'"${SLACK_CHANNEL_ID}"'","text":"The following APIs are scheduled to be sunset in the next 3 weeks. See Jira Ticket: https://jira.mongodb.org/browse/'"${JIRA_TICKET_ID}"'","parse": "full",}' https://slack.com/api/chat.postMessage | jq '.ts')
127
135
echo "message_id=${message_id}"]
128
-
129
-
sleep 2 # wait for 2 seconds to avoid slack rate limit
130
-
131
-
# Add the JSON array as a reply to message thread
132
-
curl -X POST -H 'Authorization: Bearer '"${SLACK_BEARER_TOKEN}" \
0 commit comments