Commit Graph

34 Commits

Author SHA1 Message Date
Andras Bacsai a5576533fc Merge remote-tracking branch 'origin/next' into github-runner-integration 2026-06-02 11:58:53 +02:00
Andras Bacsai e9b8320d5f Fix source selection flow 2026-05-22 13:00:53 +02:00
Andras Bacsai 7188e45167 Merge remote-tracking branch 'origin/next' into github-runner-integration 2026-05-11 22:04:24 +02:00
Andras Bacsai 1a603a10ed fix(models): replace forceFill/forceCreate with fill/create and add fillable guards
Replace all uses of `forceFill`, `forceCreate`, and `forceFill` with their
non-force equivalents across models, actions, controllers, and Livewire
components. Add explicit `$fillable` arrays to all affected Eloquent models
to enforce mass assignment protection.

Add ModelFillableCreationTest and ModelFillableRegressionTest to verify that
model creation respects fillable constraints and prevent regressions.
2026-03-31 13:45:31 +02:00
Andras Bacsai 9f46586d4a refactor: define explicit fillable attributes on all Eloquent models
Replace $guarded usage with explicit $fillable arrays across all models.
Sync fillable definitions with current database schema and add tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 21:25:41 +02:00
Andras Bacsai 5c50ab6162 feat(github-runners): improve runner lifecycle and GitHub sync
Add runner execution observability and lifecycle hardening for self-hosted
GitHub Actions runners, including:
- scheduled artifact cleanup job for cached runner tarballs/templates
- workflow_job in_progress handling to mark executions as running
- safer cleanup failure handling and non-functional server fallback
- persisted workflow job HTML URLs with execution "Open" links in UI
- configurable runner group name sync (UI + provisioning + GitHub API)
- webhook events persistence and auto-fix for missing required events
- strict enum/status checks and related model cast/query improvements

Also includes migrations and expanded feature/unit coverage for webhook,
provisioning, cleanup, and runner group/event sync behaviors.
2026-03-03 22:21:13 +01:00
Andras Bacsai 576f38da1c feat(github): add self-hosted Actions runner orchestration
Implement end-to-end GitHub Actions runner support with provisioning,
tracking, and cleanup flows.

- handle `workflow_job` webhooks to provision and tear down runners
- add runner config/execution models, enum states, and relationships
- create jobs for provisioning, cleanup, and stale-runner reaping
- schedule periodic stale runner cleanup in the console kernel
- add Livewire server UI to manage runner configuration and executions
- store GitHub App runner permissions and runner group metadata
- add migrations for runner permissions, configs, executions, and group id
- update GitHub permissions URL generation for organization app settings
- include feature/unit tests for runner behavior and permission paths
2026-03-03 14:27:19 +01:00
ShadowArcanist 97e734e5ea fixed github app deleting private key when it is used by other resources 2025-10-30 01:16:59 +05:30
Andras Bacsai 06ee7d0132 fix: GitHub source creation and configuration issues
Fixed multiple issues with GitHub App source creation and management:

1. **Fixed null property assignment error on component mount**
   - Changed property types to nullable in Change component (appId, installationId, clientId, etc.)
   - Updated validation rules to allow nullable values
   - Allows mounting component with newly created GitHub Apps that don't have these fields set yet

2. **Fixed Livewire morphing error on manual creation**
   - Modified createGithubAppManually() to redirect after saving
   - Prevents "Cannot read properties of null" error when view structure changes
   - Fields now properly populated after manual creation without requiring page refresh

3. **Fixed is_system_wide not being saved on creation**
   - Removed backwards logic that only saved is_system_wide on cloud instances
   - Added is_system_wide to GithubApp model casts for proper boolean handling
   - System-wide checkbox now works correctly on self-hosted instances

4. **Fixed misleading preview deployment checkbox**
   - Removed instantSave attribute from permission checkboxes in unconfigured state
   - These are configuration options for GitHub App creation, not database fields
   - Prevents "GitHub App updated" success message when nothing was actually saved

5. **Added validation for Refetch Permissions button**
   - Validates App ID and Private Key are set before attempting to fetch
   - Shows clear error messages: "Cannot fetch permissions. Please set the following required fields first: App ID, Private Key"
   - Prevents crash when private key is null or invalid

6. **Better error handling for unsupported private key formats**
   - Detects OpenSSH format keys vs RSA PEM format
   - Shows helpful message: "Please use an RSA private key in PEM format (BEGIN RSA PRIVATE KEY). OpenSSH format keys are not supported."
   - GitHub Apps require RSA PEM format, not OpenSSH format

7. **Made GitHub App view mobile responsive**
   - Updated all flex layouts to stack vertically on mobile (flex-col sm:flex-row)
   - Form fields, buttons, and sections now properly responsive
   - No more cut-off fields on small screens

Added comprehensive test coverage:
- GithubSourceChangeTest.php with 7 tests
- GithubSourceCreateTest.php with 6 tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-25 10:49:09 +02:00
🏔️ Peak e73c9b5f98 fix: system-wide GitHub apps (#5114)
- fix(ui): system-wide GitHub Apps are not shown in the create a new Application dialog
- fix: query logic error that shows all system-wide apps, regardless of whether they are public or private.
- fix: clicking on a system-wide GitHub app from a team other than the one that created it resulted in a 404 error.
2025-02-11 17:07:57 +01:00
Andras Bacsai 1fe4dd722b Revert "rector: arrrrr"
This reverts commit 16c0cd10d8.
2025-01-07 15:31:43 +01:00
Andras Bacsai 16c0cd10d8 rector: arrrrr 2025-01-07 14:52:08 +01:00
Lucas Michot c5403b0b3f Always prefer ::class notation 2024-10-28 14:56:13 +01:00
Andras Bacsai bdf9b98596 fix: access team's github apps only 2024-10-24 13:28:31 +02:00
Andras Bacsai b86924bc0e feat: private gh deployments through api 2024-06-30 11:30:31 +02:00
Thijmen d86274cc37 Fix styling 2024-06-10 20:43:34 +00:00
Andras Bacsai ac133875fa fix: remove private key in case you removed a github app 2023-09-29 11:01:40 +02:00
Andras Bacsai b39ca51d41 wip: boarding 2023-08-22 17:44:49 +02:00
Andras Bacsai 619d395331 feat: dockerfile build pack 2023-08-11 22:41:47 +02:00
Andras Bacsai 833e45155d switch to auth()->user from session 2023-08-11 17:31:53 +02:00
Andras Bacsai f2228cec7b testing php storm code cleanup and styling 2023-08-08 11:51:36 +02:00
Andras Bacsai 8daad8f8b8 fixes 2023-06-16 12:00:36 +02:00
Andras Bacsai eaf31eb946 fix 2023-06-13 11:04:11 +02:00
Andras Bacsai 87547d5622 fix 2023-06-13 10:59:27 +02:00
Andras Bacsai ce265e1f91 wip 2023-05-16 12:17:39 +02:00
Andras Bacsai b5b36a8eb1 deletion improvement 2023-05-10 11:02:59 +02:00
Andras Bacsai 76bf601e1b github webhooks 2023-05-09 14:42:10 +02:00
Andras Bacsai bba8b25b48 wip 2023-05-09 09:54:43 +02:00
Andras Bacsai ec3fe284b6 wip 2023-05-08 21:56:44 +02:00
Andras Bacsai d77d32853f save things 2023-05-08 13:36:49 +02:00
Andras Bacsai a37f748639 feat: add private gh repos 2023-05-08 11:51:03 +02:00
Andras Bacsai 2e8b1134b9 wip 2023-04-19 14:00:31 +02:00
Andras Bacsai 3b191fa73e fix: settings for apps and projects
add: coolify version config
fix: private key for private git based apps
2023-03-30 11:09:39 +02:00
Andras Bacsai 54441ddfde Add GitHub, GitLab, DeployKeys 2023-03-28 12:09:34 +02:00