Skip to content

feat(reviewer): Galaxy Keeper Slack bot#614

Open
rupnil-codes wants to merge 4 commits into
hackclub:mainfrom
rupnil-codes:main
Open

feat(reviewer): Galaxy Keeper Slack bot#614
rupnil-codes wants to merge 4 commits into
hackclub:mainfrom
rupnil-codes:main

Conversation

@rupnil-codes

Copy link
Copy Markdown

what's this do?

This is a Slack bot integration for the GOIs. Currently it logs new reviews in the queue (in 2 channels). I'll add the return, reject and approval review log soon (TM)

show it works

image

ai?

Yeah, used ChatGPT for the slack bot formatting, and Co-pilot to scan the repo for making my seeds.rb

@rupnil-codes rupnil-codes changed the title GOI: Galaxy Keeper Slack bot feat GOI: Galaxy Keeper Slack bot Jun 18, 2026
@rupnil-codes rupnil-codes changed the title feat GOI: Galaxy Keeper Slack bot feat(reviewer): Galaxy Keeper Slack bot Jun 18, 2026
).call

GalaxySlack.client.chat_postMessage(
channel: "#goi-logs",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use a channel ID here

Comment on lines +382 to +472
blocks: [
{
type: "header",
text: {
type: "plain_text",
text: ":yay: New YSWS Review in the queue! :yay:"
}
},
{
type: "section",
fields: [
{
type: "mrkdwn",
text: "*Project:*\n#{project.title}"
},
{
type: "mrkdwn",
text: "*Approved by:*\n#{reviewer.display_name}"
},
{
type: "mrkdwn",
text: "*Submitter:*\n#{owner.display_name}"
},
{
type: "mrkdwn",
text: "*Hours:*\n#{ship_event.hours_at_ship}"
},
{
type: "mrkdwn",
text: "*Devlogs:*\n#{project.devlogs.count}"
},
{
type: "mrkdwn",
text: "*Approved at:*\n#{Time.current.strftime("%d %b %Y • %I:%M %p UTC")}"
}
]
},
{
type: "section",
text: {
type: "mrkdwn",
text: "*Feedback:*\n#{feedback.presence || "_No feedback provided_"}"
}
},
{
type: "actions",
elements: [
{
type: "button",
text: {
type: "plain_text",
text: ":stardance_star: Project"
},
url: "https://stardance.hackclub.com/projects/#{project.id}",
style: "primary",
"action_id": "link_project_click"
},
{
type: "button",
text: {
type: "plain_text",
text: ":gotg: Review"
},
url: "https://stardance.hackclub.com/admin/certification/review/#{id}",
style: "danger",
"action_id": "link_review_click"
},
{
type: "button",
text: {
type: "plain_text",
text: ":github: GitHub"
},
url: project.repo_url,
"action_id": "link_github_click"
},
{
type: "button",
text: {
type: "plain_text",
text: ":stardance_star_purple: Demo"
},
url: project.demo_url,
"action_id": "link_demo_click"
}
]
},
{
type: "divider"
}
]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use slocks.

Comment on lines +475 to +568
GalaxySlack.client.chat_postMessage(
channel: "#new-certifications",
blocks: [
{
type: "header",
text: {
type: "plain_text",
text: ":yay: New YSWS Review in the queue! :yay:"
}
},
{
type: "section",
fields: [
{
type: "mrkdwn",
text: "*Project:*\n#{project.title}"
},
{
type: "mrkdwn",
text: "*Approved by:*\n#{reviewer.display_name}"
},
{
type: "mrkdwn",
text: "*Submitter:*\n#{owner.display_name}"
},
{
type: "mrkdwn",
text: "*Hours:*\n#{ship_event.hours_at_ship}"
},
{
type: "mrkdwn",
text: "*Devlogs:*\n#{project.devlogs.count}"
},
{
type: "mrkdwn",
text: "*Approved at:*\n#{Time.current.strftime("%d %b %Y • %I:%M %p UTC")}"
}
]
},
{
type: "section",
text: {
type: "mrkdwn",
text: "*Feedback:*\n#{feedback.presence || "_No feedback provided_"}"
}
},
{
type: "actions",
elements: [
{
type: "button",
text: {
type: "plain_text",
text: ":stardance_star: Project"
},
url: "https://stardance.hackclub.com/projects/#{project.id}",
style: "primary",
"action_id": "link_project_click"
},
{
type: "button",
text: {
type: "plain_text",
text: ":gotg: Review (Broken)"
},
url: "https://stardance.hackclub.com/admin/certification/review/#{id}",
style: "danger",
"action_id": "link_review_click"
},
{
type: "button",
text: {
type: "plain_text",
text: ":github: GitHub"
},
url: project.repo_url,
"action_id": "link_github_click"
},
{
type: "button",
text: {
type: "plain_text",
text: ":stardance_star_purple: Demo"
},
url: project.demo_url,
"action_id": "link_demo_click"
}
]
},
{
type: "divider"
}
]
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comments as above.

Comment on lines +3 to +9
class GalaxySlack
def self.client
@client ||= Slack::Web::Client.new(
token: Rails.application.credentials.dig(:galaxy_bot_token) || ENV["SLACK_GALAXY_BOT_TOKEN"]
)
end
end

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we adding a whole new slack bot? This should just use the SendSlackDmJob :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants