Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from community:main #20

Merged
merged 4 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
5 changes: 5 additions & 0 deletions .github/actions/resolve_incident_discussion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
# first, we must identify the correct incident to update, in the case where there are multiple open incident discussions.
discussion = Discussion.find_open_incident_discussions(owner: "community", repo: "community").keep_if { |d| d.body.include?("#{ENV["INCIDENT_SLUG"]}") }.first

if discussion.nil?
puts "No applicable discussion, exiting"
exit
end

discussion.add_comment(body: "### Incident Resolved \n This incident has been resolved.")
# update the post body to include the resolved picture
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 \n #{discussion.body}"
Expand Down
Loading