1
0
mirror of https://codeberg.org/crowci/crow.git synced 2025-04-19 15:22:22 +03:00

226 Commits

Author SHA1 Message Date
qwerty287
817987dd92
fix: use forge IDs for hook tokens (#4897)
Co-authored-by: Robert Kaussow <xoxys@rknet.org>
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
2025-03-10 10:11:06 +01:00
Jack Gleeson
918f41ddc0
Add default option for allowing pull requests on repositories (#4873) 2025-02-23 18:22:43 +01:00
pat-s
901a614246 feat: add log purge setting as repo setting (#34)
follow-up #10 (which was a git hickup)

![image](/attachments/a7655406-b492-4912-873b-d3d6f692be9e)

![image](/attachments/fe365dce-65dd-40cc-aeb8-3d9ca95a52ad)

## Behaviour

Log purging is attempted in an asynchronous process before a new pipeline of a specific repo is started.
It does so by

1. Getting all existing pipelines
2. Filtering by `keepMin` and `keepDuration` settings
3. Calling `LogDelete` for all remaining pipelines

Deleting only logs instead of the full pipeline (which `crow-cli pipeline purge` does) is preferred to keep historic pipeline information. Storing this in the DB is just a single line and doesn't contain much content (in contrast to logs).

## Defaults

- No minimum count is kept (`CROW_DEFAULT_LOGS_PIPELINES_KEEP_MIN`)
- All pipelines of the last 90 days (per repo) are kept (`CROW_DEFAULT_LOGS_KEEP_DURATION`)

## Todo

- [x] implement purge call during pipeline start
- [x] add settings to DB column and repo settings
- [x] tests
- [x] think about defaults
- [x] Currently the purge happens on all pipelines in scope, including ones which have already been cleared. To avoid these unnecessary calls, which also will add up for repos with many pipelines, an indicator is needed which allows filtering these pipelines out.

fix #9

Co-authored-by: crowci-bot <admin@crowci.dev>
Reviewed-on: https://codeberg.org/crowci/crow/pulls/34
Co-authored-by: pat-s <patrick.schratz@gmail.com>
Co-committed-by: pat-s <patrick.schratz@gmail.com>
2025-02-19 21:19:13 +00:00
pat-s
a554f93226 refactor: frontend error handler & notification system (#56)
- Use title and message in error message
- Errors: don't auto-remove popup, force click
- Show API method and endpoint in error message title
- Use black/white bg and notification type color only on the side
- Return errors as JSON instead of strings. Include the api endpoint in the error message.
- improve error messages when missing access token
- improve pipeling config load error messages
- Error messages are shown for 9s (instead of 3)
- remove custom `notifyError` function
- Increase popup width from 300px to 340px

Co-authored-by: crowci-bot <admin@crowci.dev>
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
Reviewed-on: https://codeberg.org/crowci/crow/pulls/56
Co-authored-by: pat-s <patrick.schratz@gmail.com>
Co-committed-by: pat-s <patrick.schratz@gmail.com>
2025-02-19 16:04:31 +00:00
Anbraten
74b0cc2d13
Fix org assign on login (#4817)
Co-authored-by: qwerty287 <qwerty287@posteo.de>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2025-02-19 15:03:20 +01:00
pat-s
cecfb22099 refactor: mocking (#38)
- `mockery` can now be run in one call instead of multiple ones
- Use the recommended "packages" approach which will be the new default moving forward
- Enforce consistent naming of mock files
- Remove warnings when invoking `mockery`
- Get rid of *many* linter warnings 🎉️

Reviewed-on: https://codeberg.org/crowci/crow/pulls/38
Co-authored-by: pat-s <patrick.schratz@gmail.com>
Co-committed-by: pat-s <patrick.schratz@gmail.com>
2025-02-15 10:23:47 +00:00
Patrick Schratz
323a1e2463
Unsanitize user and org names in DB (#4762)
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
Co-authored-by: Anbraten <anton@ju60.de>
2025-02-12 23:48:31 +01:00
qwerty287
7c78d6be26
fix: Store/delete repos after forge communication (#4827) 2025-02-10 10:43:12 +01:00
Lauris BH
b829fc2f3b
feat: Optimize repository list loading to return also latest pipeline info (#4814) 2025-02-10 10:43:12 +01:00
pat-s
7673d5253f
refactor: migrate import paths from github to codeberg 2025-01-31 14:57:57 +01:00
Patrick Schratz
f262ab5c08
refactor: add CROW_ vars (#21) 2025-01-19 13:01:18 +01:00
Patrick Schratz
5e0dc2688f
refactor: use own import paths (#5) 2025-01-17 00:36:19 +01:00
qwerty287
97d24ee1c9
Remove deprecated API field (#4676) 2025-01-08 16:40:53 +01:00
qwerty287
afa6dee30b
Migrate away from goblin (#4624)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
2024-12-30 08:08:53 +02:00
qwerty287
81b74025d4
Update Go imports paths (#4605)
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
2024-12-22 10:44:34 +01:00
Robert Kaussow
7fa474c5c3
Ignore blocked pipelines for badge rendering (#4582) 2024-12-18 08:58:08 +01:00
6543
6e18a44880
Set new default approval mode based on repo visibility (#4456)
Co-authored-by: Patrick Schratz <patrick.schratz@gmail.com>
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
2024-12-05 09:16:25 +01:00
Robert Kaussow
8cfb8f93fa
Fix events filter in GetPipelines API (#4498) 2024-12-01 23:32:46 +01:00
Robert Kaussow
289239d1b3
Add status filter to list pipeline API (#4494) 2024-12-01 05:35:05 +01:00
6543
52fb493495
Add filter to list repository pipelines API (#4416) 2024-11-28 22:33:52 +01:00
Patrick Schratz
6327dcd36f
Enforce exact matching for GitLab groups (#4473) 2024-11-28 15:32:21 +01:00
qwerty287
5bb7cef08b
Allow to set custom trusted clone plugins (#4352)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Thomas Anderson <127358482+zc-devs@users.noreply.github.com>
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-11-26 14:27:05 +01:00
Anbraten
07c8765b72
Cleanup openapi generation (#4331)
Co-authored-by: oauth <woodpecker-bot@obermui.de>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
2024-11-23 09:17:19 +01:00
Anbraten
53d6421940
Support github refresh tokens (#3811) 2024-11-22 19:12:43 +01:00
Anbraten
5e2fa8164b
Extend approval options (#3348) 2024-11-18 14:49:12 +01:00
6543
04e8309e60
Add server config to disable user registered agents (#4206) 2024-11-11 18:51:14 +01:00
qwerty287
d72c26c08c
Use repo user to fetch branches (#4339) 2024-11-08 15:05:17 +02:00
qwerty287
6ef7cddde8
Refresh token before loading branches (#4284) 2024-11-02 19:38:57 +01:00
qwerty287
29474fc7d9
Split repo trusted setting (#4025) 2024-11-01 21:37:31 +01:00
6543
98d7b1b500
Use middleware to load org (#4208)
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
Co-authored-by: Anbraten <anton@ju60.de>
2024-10-09 12:05:01 +02:00
6543
febb8c5276
Implement org/user agents (#3539) 2024-09-30 12:33:16 +01:00
6543
fcc57dfc38
Replay pipeline using cli exec by downloading metadata (#4103)
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
2024-09-25 07:20:51 +02:00
Lukas
79aeb92e0c
Set repo user to repairing user when old user is missing (#4128) 2024-09-20 22:39:22 +02:00
hg
276b279b7f
Process workflow logs in batches (#4045) 2024-09-18 16:29:56 +02:00
qwerty287
92ff320429
Remove various deprecations (#4017) 2024-08-09 16:50:35 +02:00
qwerty287
0d9e57d3da
Drop repo name fallback for hooks (#4013) 2024-08-08 07:50:38 +02:00
qwerty287
2d1bc9f15c
Move manual popup to own page (#3981) 2024-08-07 09:31:17 +02:00
qwerty287
8e2ff338d8
Fix panic if forge is unreachable (#3944) 2024-07-20 11:46:51 +02:00
Anbraten
43b82ba047
Convert to openapi 3.0 (#3897)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
2024-07-13 15:55:13 +02:00
Anbraten
b12d676546
Allow login using multiple forges (#3822) 2024-07-13 01:41:35 -07:00
Anbraten
ceb14cadc5
Fix deploy task env (#3878) 2024-07-07 13:43:07 +02:00
Lauris BH
28e982fffb
Global and organization registries (#1672)
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
2024-07-03 06:33:11 -07:00
Anbraten
2bda19024e
Use proper oauth state (#3847) 2024-06-27 16:52:09 +02:00
Anbraten
b8b6efb352
Enhance token checking (#3842) 2024-06-27 00:08:59 +02:00
Anbraten
b0f3883bd5
Cleanup of the login flow and tests (#3810) 2024-06-21 16:25:27 +02:00
Anbraten
1a39d57f71
Enhance authentication UX (#3807) 2024-06-21 09:55:30 +02:00
Anbraten
fbb96ff8f5
Add api for forges (#3733) 2024-06-20 13:08:54 +02:00
Anbraten
8b387e73ee
Improve step logging (#3722) 2024-06-13 17:18:32 +02:00
Anbraten
1953a0ec5a
Fix repo creation (#3756) 2024-06-10 12:28:54 +02:00
qwerty287
c72468478d
Allow to store logs in files (#3568)
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
2024-06-06 14:34:57 +02:00