Skip to content

Release (2026-03-25)#121

Merged
dan2k3k4 merged 18 commits intoprodfrom
dev
Mar 25, 2026
Merged

Release (2026-03-25)#121
dan2k3k4 merged 18 commits intoprodfrom
dev

Conversation

@github-actions
Copy link
Copy Markdown

Changes in this release:

440ce98 chore: add tests
79b29a2 chore: fix docblock
dccdc33 chore: batch user info data updates into single DB write during instance provisioning
8685253 fix: use filled() for first_name/last_name defaults in firstOrCreate
369044f Initial plan
23dfde9 Update app/Http/Controllers/Api/AuthenticatedApiController.php
d637557 Initial plan
563b560 chore: support first and last name for api/instance
b1ff761 chore: adapt ssh trigger deploy
d6f1eb7 Apply suggestions from code review
56dcfde chore: fix trigger deploy button
5be19a9 Add git_url to /store-apps API endpoint and tests

pmelab and others added 17 commits March 24, 2026 12:07
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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

Release bundle that extends the external authenticated API to expose store app git URLs and support user first/last names during instance provisioning, while also adjusting Lagoon SSH token retrieval and instance stage progression logic.

Changes:

  • Add git_url to /api/store-apps responses and update tests accordingly.
  • Enhance /api/instance provisioning to accept first_name/last_name, update placeholder names for existing users, and persist user identity data onto the instance for claiming.
  • Update Lagoon SSH key selection/token retrieval behavior and tweak stage progression to allow claiming when user-email data is present.

Reviewed changes

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

File Description
tests/Feature/Api/AuthenticatedApiTest.php Adds coverage for git_url and name-handling behavior during instance provisioning.
app/Services/LagoonClientService.php Improves error messaging and changes SSH key resolution + token fetch implementation.
app/Jobs/ProcessPolydockAppInstanceJobs/ProgressToNextStageJob.php Allows progressing to claim stage when instance has user-email data (even without remote registration).
app/Http/Controllers/Api/AuthenticatedApiController.php Adds git_url to store-app output and supports first_name/last_name in instance creation while persisting user identity to instance data.

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

Comment on lines +85 to +86
// Fallback or override via content if provided (from config, not env())
$keyContent = config('polydock.ftlagoon_private_key_content');
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

config('polydock.ftlagoon_private_key_content') is referenced here, but there is no ftlagoon_private_key_content key defined under config/polydock.php. As-is, this override-by-content path will always be null unless something sets it at runtime. Define this config key (likely from an env var) or change this to read the intended env/config source so key content provisioning actually works.

Suggested change
// Fallback or override via content if provided (from config, not env())
$keyContent = config('polydock.ftlagoon_private_key_content');
// Fallback or override via content if provided (prefer config, then env)
$keyContent = config('polydock.ftlagoon_private_key_content', env('FTLAGOON_PRIVATE_KEY_CONTENT'));

Copilot uses AI. Check for mistakes.
Comment thread app/Services/LagoonClientService.php Outdated
Comment on lines +261 to +267
// Add user information to the app instance data - this enables claiming
$instance->data = array_merge($instance->data ?? [], [
'user-email' => $user->email,
'user-first-name' => $user->first_name,
'user-last-name' => $user->last_name,
]);
$instance->save();
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

These reserved user-* keys are set on the instance here, but later in this method the generic config loop can overwrite them (e.g. a client can pass config: {"user-email": "other@example.com"}), which would desync claiming/stage-progression data from the provisioning email. Prevent config from setting reserved keys (blacklist/whitelist), or apply these user-* keys after processing config so they always win.

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@dan2k3k4 dan2k3k4 merged commit 05e7ea4 into prod Mar 25, 2026
5 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.

4 participants