Skip to content

Commit

Permalink
Update close_incident_discussions.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
alidacodes authored Jan 9, 2025
1 parent afbc215 commit a3f5bb7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/actions/close_incident_discussions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@
Discussion.mark_comment_as_answer(comment_id:)
end

updated_body = "![A dark background with two security-themed abstract shapes positioned in the top left and bottom right corners. In the center of the image, bold white text reads \\\"Incident Resolved\\\" with a white Octocat logo.](https://github.com/community/community/blob/main/.github/src/incident_resolved.png?raw=true) \n #{d.body}"
d.update_discussion(body: updated_body)
# an incident that has been declared as "resolved" should have already updated the post body, this is in case that step failed.
unless d.body.include?("https://github.com/community/community/blob/main/.github/src/incident_resolved.png?raw=true")
updated_body = "![A dark background with two security-themed abstract shapes positioned in the top left and bottom right corners. In the center of the image, bold white text reads \\\"Incident Resolved\\\" with a white Octocat logo.](https://github.com/community/community/blob/main/.github/src/incident_resolved.png?raw=true) \n #{d.body}"
d.update_discussion(body: updated_body)
end
end

d.close_as_resolved
Expand Down

0 comments on commit a3f5bb7

Please sign in to comment.