Skip to content

Feature/cleanup#374

Merged
Pierre-Demessence merged 30 commits into
masterfrom
feature/cleanup
Mar 31, 2026
Merged

Feature/cleanup#374
Pierre-Demessence merged 30 commits into
masterfrom
feature/cleanup

Conversation

@Pierre-Demessence

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings March 29, 2026 22:27
@github-actions

Copy link
Copy Markdown

🚀 Deploy this PR to an environment

You can deploy this PR to either development or staging environment:

  • Comment /deploy_dev to deploy to the development environment

Alternatively, you can:

  1. Go to Actions tab
  2. Click on "Manual Deploy to Firebase" workflow
  3. Click the "Run workflow" button
  4. Select branch: feature/cleanup
  5. Choose environment: DEV
  6. Enter a deployment message
  7. Click "Run workflow"

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR cleans up and simplifies the bot by removing unused/legacy services (reaction roles + auto-threading), while also adding/bundling new profile-card skin assets and updating the Docker build to bake static assets and install required fonts.

Changes:

  • Added new skin JSON configs and related image assets under SERVER/skins and SERVER/images.
  • Updated Dockerfile and added .dockerignore to improve build caching, bake static assets into the container, and install MS core fonts.
  • Removed the Reaction Roles feature and Auto-Thread feature (services, modules, settings, and preconditions), plus associated settings cleanup.

Reviewed changes

Copilot reviewed 18 out of 37 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
SERVER/skins/skin.json Adds a new “Sleek” profile card skin configuration (currently invalid JSON).
SERVER/skins/skin.default.json Adds a “Default” skin configuration.
SERVER/skins/skin.alaanor.json Adds a “flat” skin configuration (currently not valid JSON due to comments/typos).
SERVER/skins/resources/foreground_sleek.png Adds the Sleek foreground image asset.
SERVER/skins/foreground.png Adds a foreground image asset used by skins.
SERVER/skins/alpha.png Adds an alpha mask/asset used by skins.
SERVER/images/triangle.png Adds triangle image asset (rank decoration).
SERVER/images/levelupcardbackground.png Adds level-up card background image asset.
SERVER/images/levelupcard.png Adds level-up card image asset.
SERVER/images/foreground.png Adds/duplicates a foreground image asset under SERVER/images.
SERVER/images/default.png Adds default avatar placeholder image.
SERVER/images/Layout.txt Adds layout notes/spec for image composition.
Dockerfile Improves build layering, bakes static assets into runtime image, and installs MS core fonts.
DiscordBot/Utils/Utils.cs Removes GetMaxThreadDuration helper (auto-thread feature removal).
DiscordBot/Settings/Settings.example.json Removes unused settings entries related to removed features.
DiscordBot/Settings/ReactionRoles.json Deletes reaction role settings file.
DiscordBot/Settings/Deserialized/Settings.cs Removes settings classes/fields tied to removed features (reaction roles + auto-thread).
DiscordBot/Settings/Deserialized/ReactionRole.cs Deletes deserialized reaction role settings models.
DiscordBot/Services/UserService.cs Unsubscribes/removes auto-thread handler code.
DiscordBot/Services/ReactRoleService.cs Deletes the reaction role service implementation.
DiscordBot/Program.cs Removes DI registration for ReactRoleService.
DiscordBot/Modules/UserModule.cs Removes auto-thread commands and related code.
DiscordBot/Modules/ReactionRoleModule.cs Deletes the reaction role command module.
DiscordBot/Extensions/ReactMessageExtensions.cs Deletes reaction message extension helpers.
DiscordBot/Attributes/ThreadAttributes.cs Deletes thread/auto-thread precondition attributes.
.dockerignore Adds Docker ignore rules to reduce build context and avoid baking runtime Settings into the image.

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

Comment thread DiscordBot/Assets/skins/skin.json
Comment thread DiscordBot/Assets/skins/skin.json
Comment thread SERVER/skins/skin.alaanor.json
Comment thread DiscordBot/Assets/skins/skin.alaanor.json
Comment thread SERVER/skins/skin.default.json
Comment thread Dockerfile Outdated
Co-authored-by: Copilot <copilot@github.com>
@Pierre-Demessence

Copy link
Copy Markdown
Member Author

/deploy_dev

@github-actions

Copy link
Copy Markdown

🚀 Starting deployment of Unity-Developer-Community/UDC-Bot:feature/cleanup to development...

@Pierre-Demessence

Copy link
Copy Markdown
Member Author

/deploy_dev

@github-actions

Copy link
Copy Markdown

🚀 Starting deployment of Unity-Developer-Community/UDC-Bot:feature/cleanup to development...

- Add Assets/ directory inside DiscordBot/ for read-only static files
  (fonts, images, skins) with new AssetsRootPath setting
- Move FAQs.json from SERVER/ to Settings/ (human-authored config)
- Move reminders.json path from Settings/ to SERVER/ (bot-generated)
- Update UserService to read skins/images from AssetsRootPath
- Update Dockerfile to COPY assets from DiscordBot/Assets/
- Add read-only volume mount for Assets in docker-compose
- Add DiscordBot/SERVER/ to .gitignore (runtime-generated data)
- Remove stale .psd source files and duplicate static assets

Co-authored-by: Copilot <copilot@github.com>
@Pierre-Demessence

Copy link
Copy Markdown
Member Author

/deploy_dev

@github-actions

Copy link
Copy Markdown

🚀 Starting deployment of Unity-Developer-Community/UDC-Bot:feature/cleanup to development...

Copilot AI left a comment

Copy link
Copy Markdown

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 24 out of 49 changed files in this pull request and generated 5 comments.

Comments suppressed due to low confidence (2)

DiscordBot/Assets/skins/skin.default.json:96

  • The Layers array no longer includes a layer with "Image": "avatar". UserService.GenerateProfileCard composites the user picture only when a layer’s Image is "avatar", so removing that layer will result in profile cards without an avatar unless the rendering code is updated to use the new AvatarX/AvatarY fields.
    DiscordBot/Assets/skins/skin.alaanor.json:115
  • The newly added module uses "TextAlignmnent" (misspelled). The skin text modules expect TextAlignment (see BaseTextSkinModule.TextAlignment), so this field will be ignored and alignment will default, likely producing incorrect layout. Rename the key to TextAlignment in the skin JSON.

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

Comment thread docs/plans/done/directory-reorganization.md
Comment thread .dockerignore
Comment thread DiscordBot/Services/ReminderService.cs
Comment thread DiscordBot/Assets/skins/skin.json
Comment thread DiscordBot/Assets/skins/skin.json
Pierre-Demessence and others added 4 commits March 31, 2026 04:45
- Namespace, bot deployment, MySQL, backup, phpMyAdmin, ExternalSecrets
- ConfigMaps for bot settings (Settings.json, Rules.json, FAQs.json, UserSettings.json)
- Moved from GitOps cluster repo to live alongside application code
Co-authored-by: Copilot <copilot@github.com>
- Add deploy-dev.yml: push to dev -> build -> GHCR -> update manifest
- Add deploy-prod.yml: push to master -> build -> GHCR -> update manifest
- Add deploy-pr-to-dev.yml: /deploy_dev PR command for GitOps
- Add pr-deploy-instructions.yml: PR deploy instructions comment
- Update Dotnet.yml: action versions v4, add permissions
- Fix prod bot.yaml: use udc-bot image instead of udc-bot-dev
- Remove old SSH-based workflows (Build&Deploy, DeployDev, DeployProd,
  AddCommentOnPR, HandleDeployCommand)
Comment thread .github/workflows/deploy-pr-build.yml Fixed
@Pierre-Demessence

Copy link
Copy Markdown
Member Author

/deploy_dev

@github-actions

Copy link
Copy Markdown

🚀 Starting deployment of Unity-Developer-Community/UDC-Bot:feature/cleanup to development...

Copilot AI left a comment

Copy link
Copy Markdown

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 51 out of 76 changed files in this pull request and generated 5 comments.

Comments suppressed due to low confidence (1)

DiscordBot/Assets/skins/skin.alaanor.json:91

  • The JSON uses TextAlignmnent (misspelled) instead of the TextAlignment property expected by BaseTextSkinModule. This means alignment settings from this skin won't be applied (and may leave text mis-positioned). Rename these keys to TextAlignment (and keep the value formatting consistent with other skins).

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

Comment thread .github/workflows/deploy-pr-to-dev.yml Outdated
Comment thread k8s/prod/mysql-backup.yaml
Comment thread k8s/dev/mysql-backup.yaml
Comment thread k8s/prod/phpmyadmin.yaml
Comment thread k8s/dev/phpmyadmin.yaml
- phpmyadmin:5 -> phpmyadmin:5.2.3
- databack/mysql-backup:latest -> databack/mysql-backup:1.4.0
Add author_association check to deploy-pr-to-dev workflow.
Only MEMBER, COLLABORATOR, and OWNER can trigger PR deploys,
preventing untrusted users from building arbitrary code.
Replace single deploy-pr-to-dev.yml with two workflows to resolve
CodeQL untrusted-checkout alert (actions/untrusted-checkout/high):
- deploy-pr-build.yml: unprivileged, builds and pushes image (no contents:write)
- deploy-pr-push.yml: privileged, updates manifest (no untrusted code checkout)
Comment thread .github/workflows/deploy-pr-build.yml Fixed
Comment thread .github/workflows/deploy-pr-push.yml Fixed
Comment thread .github/workflows/deploy-pr-push.yml Fixed
Comment thread .github/workflows/deploy-pr-push.yml Fixed
Comment thread .github/workflows/deploy-pr-push.yml Fixed
Comment thread .github/workflows/deploy-pr-push.yml Fixed
Comment thread .github/workflows/deploy-pr-push.yml Fixed
Pierre-Demessence and others added 6 commits March 31, 2026 09:44
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
- Create build-and-deploy.yml reusable workflow (workflow_call)
- Simplify deploy-dev.yml and deploy-prod.yml to thin wrappers
- Replace issue_comment trigger with workflow_dispatch for PR deploys
  (resolves CodeQL untrusted-checkout/high alert)
- Delete deploy-pr-build.yml and deploy-pr-push.yml (two-workflow split)
- Update pr-deploy-instructions.yml to reference Actions tab
@Pierre-Demessence

Copy link
Copy Markdown
Member Author

/deploy dev

@Pierre-Demessence

Copy link
Copy Markdown
Member Author

/deploy_dev

@github-actions

Copy link
Copy Markdown

🚀 Starting deployment of Unity-Developer-Community/UDC-Bot:feature/cleanup to development...

Copilot AI left a comment

Copy link
Copy Markdown

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 52 out of 77 changed files in this pull request and generated 8 comments.

Comments suppressed due to low confidence (1)

DiscordBot/Assets/skins/skin.alaanor.json:115

  • TextAlignmnent is misspelled and won’t bind to BaseTextSkinModule.TextAlignment, so alignment will silently fall back to the enum default. Rename this field to TextAlignment (including in the newly added TotalXp module) to get the intended text positioning.

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

Comment thread k8s/prod/bot.yaml
Comment thread k8s/prod/mysql.yaml
Comment on lines +72 to +79
readinessProbe:
exec:
command:
- mysqladmin
- ping
- -h
- localhost
initialDelaySeconds: 15

Copilot AI Mar 31, 2026

Copy link

Choose a reason for hiding this comment

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

mysqladmin ping is executed without any credentials. With MYSQL_ROOT_PASSWORD set, mysqladmin typically returns "Access denied" and the readiness probe will fail continuously. Update the probe command to authenticate (e.g., pass -u root and a password via env) and consider using 127.0.0.1 to avoid DNS issues.

Copilot uses AI. Check for mistakes.
Comment thread k8s/dev/mysql.yaml
Comment on lines +72 to +79
readinessProbe:
exec:
command:
- mysqladmin
- ping
- -h
- localhost
initialDelaySeconds: 15

Copilot AI Mar 31, 2026

Copy link

Choose a reason for hiding this comment

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

Same issue as prod: mysqladmin ping is run without credentials while MYSQL_ROOT_PASSWORD is set, so the readiness probe is likely to fail ("Access denied"). Update the probe to provide -u/-p (from env) so the pod can become Ready.

Copilot uses AI. Check for mistakes.
types: [opened]

permissions:
pull-requests: write

Copilot AI Mar 31, 2026

Copy link

Choose a reason for hiding this comment

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

This workflow calls github.rest.issues.createComment(...), but the workflow permissions only grant pull-requests: write. Add issues: write (or switch to the pulls API) so the comment creation isn’t rejected with a 403 due to insufficient permissions.

Suggested change
pull-requests: write
pull-requests: write
issues: write

Copilot uses AI. Check for mistakes.
Comment thread DiscordBot/Assets/skins/skin.json
Comment thread k8s/prod/bot-settings-config.yaml Outdated
Comment thread k8s/dev/bot-settings-config.yaml Outdated
Comment thread .dockerignore
@Pierre-Demessence Pierre-Demessence merged commit 5e6e35c into master Mar 31, 2026
5 checks passed
@Pierre-Demessence Pierre-Demessence deleted the feature/cleanup branch March 31, 2026 22:56
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