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

1332 Commits

Author SHA1 Message Date
crowci-bot
28a66d2e7d chore(deps): update module github.com/google/go-github/v69 to v70 (#115)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/google/go-github/v69](https://github.com/google/go-github) | require | major | `v69.2.0` -> `v70.0.0` |

---

### Release Notes

<details>
<summary>google/go-github (github.com/google/go-github/v69)</summary>

### [`v70.0.0`](https://github.com/google/go-github/releases/tag/v70.0.0)

[Compare Source](https://github.com/google/go-github/compare/v69.2.0...v70.0.0)

This release contains the following breaking API changes:

-   feat!: Add support for network-configurations endpoints for organization ([#&#8203;3511](https://github.com/google/go-github/issues/3511))
    BREAKING CHANGE: `EnterpriseNetwork*` structs have been replaced with `Network*` structs.
-   refactor!: Update package types to align with webhook event ([#&#8203;3515](https://github.com/google/go-github/issues/3515))
    BREAKING CHANGE: `PackageVersion.Body` and `PackageVersion.Metadata` are both now `json.RawMessage`.

...and the following additional changes:

-   build(deps): bump github.com/alecthomas/kong from 1.8.0 to 1.8.1 in /tools ([#&#8203;3485](https://github.com/google/go-github/issues/3485))
-   build(deps): bump github.com/google/go-github/v69 from 69.0.0 to 69.2.0 in /scrape ([#&#8203;3483](https://github.com/google/go-github/issues/3483))
-   build(deps): bump github.com/google/go-cmp from 0.6.0 to 0.7.0 in /tools ([#&#8203;3490](https://github.com/google/go-github/issues/3490))
-   Bump github.com/google/go-cmp from 0.6.0 to 0.7.0 ([#&#8203;3494](https://github.com/google/go-github/issues/3494))
-   build(deps): bump actions/cache from 4.2.0 to 4.2.1 in the actions group ([#&#8203;3492](https://github.com/google/go-github/issues/3492))
-   fix: Resolve '400 Custom domains' error on GitHub Enterprise Server ([#&#8203;3489](https://github.com/google/go-github/issues/3489))
-   Correct the runIDFromURLRE regex to properly match the callbackURL ([#&#8203;3495](https://github.com/google/go-github/issues/3495))
-   feat: Add support for GitHub-hosted runner API endpoints ([#&#8203;3487](https://github.com/google/go-github/issues/3487))
-   feat: Add support for network-configurations endpoints ([#&#8203;3497](https://github.com/google/go-github/issues/3497))
-   build(deps): bump codecov/codecov-action from 5.3.1 to 5.4.0 ([#&#8203;3500](https://github.com/google/go-github/issues/3500))
-   build(deps): bump actions/cache from 4.2.1 to 4.2.2 in the actions group ([#&#8203;3499](https://github.com/google/go-github/issues/3499))
-   Add created_at field to Reaction ([#&#8203;3501](https://github.com/google/go-github/issues/3501))
-   Add reason parameter to MergeGroupEvent ([#&#8203;3508](https://github.com/google/go-github/issues/3508))
-   fix(ci): ensure 'auto' toolchain applies to generate ([#&#8203;3436](https://github.com/google/go-github/issues/3436))
-   Bump dependency versions from dependabot warnings ([#&#8203;3512](https://github.com/google/go-github/issues/3512))
-   Bump go-jose to v4.0.5 ([#&#8203;3513](https://github.com/google/go-github/issues/3513))
-   build(deps): bump golang.org/x/net from 0.33.0 to 0.36.0 in /example ([#&#8203;3514](https://github.com/google/go-github/issues/3514))
-   docs: Update readme and examples for updated go-github-ratelimit and introduce go-github-pagination ([#&#8203;3504](https://github.com/google/go-github/issues/3504))
-   Add validity filter to secret scanning alert list options ([#&#8203;3516](https://github.com/google/go-github/issues/3516))
-   build(deps): bump github.com/alecthomas/kong from 1.8.1 to 1.9.0 in /tools ([#&#8203;3518](https://github.com/google/go-github/issues/3518))
-   build(deps): bump github.com/getkin/kin-openapi from 0.129.0 to 0.130.0 in /tools ([#&#8203;3517](https://github.com/google/go-github/issues/3517))
-   feat: Add automatic_copilot_code_review_enabled parameter to ruleset API ([#&#8203;3506](https://github.com/google/go-github/issues/3506))
-   Bump version of go-github to v70.0.0 ([#&#8203;3520](https://github.com/google/go-github/issues/3520))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "* * * * 0,6" (UTC), Automerge - "* 0-3 * * *" (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMTEuMCIsInVwZGF0ZWRJblZlciI6IjM5LjIxMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmN5IPCfk6bvuI8iXX0=-->

Reviewed-on: https://codeberg.org/crowci/crow/pulls/115
Co-authored-by: crowci-bot <admin@crowci.dev>
Co-committed-by: crowci-bot <admin@crowci.dev>
2025-03-27 18:06:43 +00:00
pat-s
4475f762e2 chore: update mocks 2025-03-10 13:58:57 +01:00
Jener Rasmussen
74f920e7ff fix: nil dereference in Bitbucket webhook handling (#4896) 2025-03-10 10:11:38 +01:00
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
qwerty287
f4f6eaadba fix: Correctly handle approval requirement if PR is closed (#4902) 2025-03-10 10:10:46 +01:00
qwerty287
6276ebf9e4 chore: include forge type in netrc (#4908) 2025-03-10 10:10:31 +01:00
Levy-Tal
1d9318849b fix: BitbucketDC: optimize repository search (#4919)
Co-authored-by: tal <tal@localhost>
2025-03-10 10:09:36 +01:00
Robert Kaussow
2e43d2fe76 fix: Add migration to fix zero forge_id in orgs table (#4924) 2025-03-10 10:09:22 +01:00
Robert Kaussow
638b703c44 Fix unique constraint for orgs (#4923) 2025-03-10 09:57:42 +01:00
pat-s
a28c366d14 feat: add CI_COMMIT_PULL_REQUEST_TITLE env var (#80)
fix #70

Reviewed-on: https://codeberg.org/crowci/crow/pulls/80
Co-authored-by: pat-s <patrick.schratz@gmail.com>
Co-committed-by: pat-s <patrick.schratz@gmail.com>
2025-02-23 19:53:33 +00:00
pat-s
d6137b74b8 fix: properly respect keepMinPipelines when filtering purgeable pipelines (#79)
### Before

- Only `totalCount - keepMin` pipelines were queried from the DB, causing the diff never to be evaluated
- The missing count then caused the later subsetting to be effectively non-functional, as it would include almost all pipelines due to the missing batch filtered out earlier

### After

- `totalCount`pipelines are queried from the DB in batches
- The sorting and filtering is done after the loop
- More helpful debug logs

Reviewed-on: https://codeberg.org/crowci/crow/pulls/79
Co-authored-by: pat-s <patrick.schratz@gmail.com>
Co-committed-by: pat-s <patrick.schratz@gmail.com>
2025-02-23 18:22:45 +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
pat-s
53c8eb44fb chore: remove go generate mockery 2025-02-19 15:46:17 +01:00
qwerty287
9ffb9ac1bd Directly fetch directory contents (#4842) 2025-02-19 15:05:11 +01: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
crowci-bot
558b69638e fix(deps): update module codeberg.org/mvdkleijn/forgejo-sdk/forgejo to v2 (#49)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| codeberg.org/mvdkleijn/forgejo-sdk/forgejo | require | major | `v1.2.0` -> `v2.0.0` |

---

### Configuration

📅 **Schedule**: Branch creation - "* * * * 0,6" (UTC), Automerge - "* 0-3 * * *" (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzAuMiIsInVwZGF0ZWRJblZlciI6IjM5LjE3MC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmN5IPCfk6bvuI8iXX0=-->

Co-authored-by: Patrick Schratz <pat-s@noreply.codeberg.org>
Co-authored-by: pat-s <patrick.schratz@gmail.com>
Reviewed-on: https://codeberg.org/crowci/crow/pulls/49
Co-authored-by: crowci-bot <admin@crowci.dev>
Co-committed-by: crowci-bot <admin@crowci.dev>
2025-02-15 12:50:21 +00: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
crowci-bot
19f051b0db fix(deps): update module github.com/google/go-github/v68 to v69 (#26)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/google/go-github/v68](https://github.com/google/go-github) | require | major | `v68.0.0` -> `v69.0.0` |
2025-02-10 10:43:04 +01:00
pat-s
7673d5253f refactor: migrate import paths from github to codeberg 2025-01-31 14:57:57 +01:00
pat-s
0bd5202468 chore: revert tab - spaces migration due to test errors 2025-01-20 22:00:29 +01:00
pat-s
5797d2c420 chore: editorconfig fixes 2025-01-20 15:34:57 +01:00
Robert Kaussow
434d6f4825 fix: sql identifier escaping in datastore feed 2025-01-20 14:24:51 +01:00
Robert Kaussow
8f8e3018d6 fix: log folder permissions 2025-01-20 14:24:47 +01:00
pat-s
db61cd3f23 refactor: recreate all mocks 2025-01-19 20:51:22 +01:00
pat-s
4c4c01e6f5 refactor: more env var changes and renamings 2025-01-19 16:22:04 +01:00
pat-s
81d89cc79f fix: grpc renamings 2025-01-19 13:41:56 +01:00
Patrick Schratz
f262ab5c08 refactor: add CROW_ vars (#21) 2025-01-19 13:01:18 +01:00
Patrick Schratz
38f39eeede refactor: use .crow (#8) 2025-01-18 01:23:51 +01:00
Patrick Schratz
35903bfa8c refactor: use alpine-golang images (#10) 2025-01-17 17:04:10 +01:00
Patrick Schratz
5e0dc2688f refactor: use own import paths (#5) 2025-01-17 00:36:19 +01:00
pat-s
a79c4e3366 test 2025-01-14 18:49:39 +01:00
qwerty287
5d281cd69a Check organization first (#4723) 2025-01-14 09:31:02 +01:00
qwerty287
9d8eed46a0 Fix org creation (#4722) 2025-01-14 09:30:20 +01:00
Patrick Schratz
628c0e8faa Don't fail user creation if org exists (#4687) 2025-01-10 18:12:21 +01:00
qwerty287
97d24ee1c9 Remove deprecated API field (#4676) 2025-01-08 16:40:53 +01:00
Levy-Tal
d022bf229a feat(bitbucketdatacenter): Add support for fetching and converting projects to teams (#4663)
Co-authored-by: tal <tal@localhost>
2025-01-08 00:44:31 +01:00
qwerty287
ba68b446c0 Fix addon nil values (#4666) 2025-01-05 13:45:53 +02: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
renovate[bot]
828298bcf3 fix(deps): update module github.com/google/go-github/v67 to v68 (#4635)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: qwerty287 <qwerty287@posteo.de>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2024-12-28 09:28:01 +01:00
qwerty287
fdfabe6368 Support Git as only VCS (#4346)
Co-authored-by: Patrick Schratz <patrick.schratz@gmail.com>
2024-12-27 22:49:19 +01:00
qwerty287
81b74025d4 Update Go imports paths (#4605)
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
2024-12-22 10:44:34 +01:00
qwerty287
8788794748 Do not log forge tokens (#4551)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
Co-authored-by: Robert Kaussow <xoxys@rknet.org>
2024-12-18 15:13:01 +01:00
Robert Kaussow
7fa474c5c3 Ignore blocked pipelines for badge rendering (#4582) 2024-12-18 08:58:08 +01:00
Robert Kaussow
e8216bc123 Remove related pipeline logs during pipeline deletion (#4572) 2024-12-17 09:09:03 +01:00
renovate[bot]
591f256d1e fix(deps): update golang-packages (#4553)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: qwerty287 <qwerty287@posteo.de>
2024-12-12 16:40:36 +01:00