Skip to content

Commit

Permalink
Merge pull request community#148838 from community/dont-double-post-i…
Browse files Browse the repository at this point in the history
…mage

Update close_incident_discussions.rb
  • Loading branch information
alidacodes authored Jan 9, 2025
2 parents afbc215 + a3f5bb7 commit 4c9e6cb
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 4c9e6cb

Please sign in to comment.