Skip to content

stale tickets config#175

Merged
MMK21Hub merged 5 commits intohackclub:mainfrom
System-End:stale-ticket-config
Apr 14, 2026
Merged

stale tickets config#175
MMK21Hub merged 5 commits intohackclub:mainfrom
System-End:stale-ticket-config

Conversation

@System-End
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings March 12, 2026 06:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an admin-managed “Settings” area in the Slack App Home to configure stale ticket auto-close, persisting configuration in the database and making the stale-close task use the configured threshold.

Changes:

  • Introduces a new Prisma Settings model for key/value configuration storage.
  • Adds Slack App Home “Settings” tab + modal/actions to configure/enable/disable stale_ticket_days.
  • Enables and updates the stale-ticket closer task to use the DB-configured threshold and run on a scheduler.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
prisma/schema.prisma Adds DB model for persisted settings (key/value + timestamps).
nephthys/views/modals/configure_stale_days.py New modal UI for editing stale-days threshold.
nephthys/views/home/settings.py New App Home Settings view (admin-gated) showing stale-close status and actions.
nephthys/views/home/__init__.py Adds “Settings” to App Home navigation.
nephthys/utils/slack.py Registers new Slack action + view handlers for settings flows.
nephthys/utils/env.py Adds helper to read/parse stale_ticket_days from DB settings.
nephthys/tasks/close_stale.py Uses configured stale-days threshold; disables task when unset.
nephthys/events/app_home_opened.py Routes App Home navigation to the new settings view.
nephthys/actions/settings.py Implements Slack callbacks to configure / toggle the stale-close feature.
nephthys/__main__.py Schedules the stale-close job to run hourly.
docs/deployment.md Documents how to configure bot settings from Slack App Home.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread prisma/schema.prisma Outdated
Comment thread nephthys/views/home/settings.py Outdated
Comment thread nephthys/utils/env.py Outdated
Comment thread nephthys/tasks/close_stale.py Outdated
Comment thread docs/deployment.md Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 14, 2026 00:09
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread nephthys/tasks/close_stale.py Outdated
Comment thread nephthys/views/home/settings.py Outdated
Comment thread docs/deployment.md Outdated
Copy link
Copy Markdown
Collaborator

@MMK21Hub MMK21Hub left a comment

Choose a reason for hiding this comment

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

Just forwarding the context from DMs:

Heads up that #175 (stale tickets config) introduces a new config system to the DB which I don't want to do rn (I do want to add a new config system at some point, but that requires a lot of thought)

right now similar things are configured through environment variables so I don't want to add a whole new mechanism just to configure this

happy to accept this w/o the new config system and just with an env var to configure it!

@System-End System-End requested a review from MMK21Hub March 28, 2026 14:07
Copilot AI review requested due to automatic review settings April 14, 2026 19:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread nephthys/__main__.py
Comment thread docs/deployment.md
Copy link
Copy Markdown
Collaborator

@MMK21Hub MMK21Hub left a comment

Choose a reason for hiding this comment

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

Works well! FYI I've adjusted the logging to be a bit more structured :)

@MMK21Hub MMK21Hub added this pull request to the merge queue Apr 14, 2026
Merged via the queue into hackclub:main with commit c8bbe72 Apr 14, 2026
8 checks passed
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.

3 participants