feat(reviewer): Galaxy Keeper Slack bot#614
Open
rupnil-codes wants to merge 4 commits into
Open
Conversation
NeonGamerBot-QK
suggested changes
Jun 24, 2026
| ).call | ||
|
|
||
| GalaxySlack.client.chat_postMessage( | ||
| channel: "#goi-logs", |
Member
There was a problem hiding this comment.
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" | ||
| } | ||
| ] |
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" | ||
| } | ||
| ] | ||
| ) |
Member
There was a problem hiding this comment.
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 |
Member
There was a problem hiding this comment.
Why are we adding a whole new slack bot? This should just use the SendSlackDmJob :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
ai?
Yeah, used ChatGPT for the slack bot formatting, and Co-pilot to scan the repo for making my seeds.rb