Commit Graph

111 Commits

Author SHA1 Message Date
qwerty287
bd8e2f350e Use require to exit tests (#5998) 2026-01-22 09:41:20 +01:00
6543
c8a2b2f81a Add migration tests for postgres (#669) 2025-10-21 12:19:39 +02:00
Robert Kaussow
80dd288f4a Fix forge oauth columns migration (3) (#5551) 2025-09-26 07:07:41 +02:00
Robert Kaussow
7707e843f2 Show human readable information in queue info (#5516)
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2025-09-23 09:35:49 +02:00
Robert Kaussow
92ebabe568 Ensure columns to drop exists in forges migration (#5539) 2025-09-23 08:53:53 +02:00
Robert Kaussow
8a69a1cfc6 Fix formatting and version formatting tools (#5540) 2025-09-23 00:36:46 +02:00
Robert Kaussow
68d690ad9b Fix forge oauth columns migration (2) (#5526) 2025-09-19 22:23:28 +02:00
Robert Kaussow
7800d13605 Fix forge oauth columns migration (#5525) 2025-09-19 21:40:31 +02:00
Robert Kaussow
d69fdff51b Cleanup columns in forges table (#5517) 2025-09-16 11:50:53 +02:00
renovate[bot]
c45657721f fix(deps): update golang-packages (#5121)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
2025-04-25 15:55:30 +03:00
Robert Kaussow
9beb91828c Avoid db errors while executing migrations check (#5072) 2025-04-04 14:24:02 +02:00
Robert Kaussow
780f838578 Add migration to fix zero forge_id in orgs table (#4924) 2025-03-04 07:56:52 +01:00
Patrick Schratz
a6e468afd8 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 21:41:04 +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
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
qwerty287
6f7f7692e1 Rename token fields (#4471)
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
2024-11-28 10:27:28 +02: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
qwerty287
5c2204716c Fix migration sorting (#4408) 2024-11-18 20:48:51 +02:00
Anbraten
5e2fa8164b Extend approval options (#3348) 2024-11-18 14:49:12 +01:00
6543
07baae28af address review lint issues (#4354) 2024-11-11 15:25:31 +01:00
6543
5139401b53 Inline model types for migrations (#4293) 2024-11-09 16:05:32 +01:00
6543
4fa3a8e578 Add migration to autofix corrupted users.org_id entrys in db (#4307) 2024-11-06 14:51:12 +02:00
qwerty287
29474fc7d9 Split repo trusted setting (#4025) 2024-11-01 21:37:31 +01:00
6543
f8cfda1ea9 Report custom labels set by agent admins back (#4141) 2024-10-06 17:13:41 +02:00
6543
febb8c5276 Implement org/user agents (#3539) 2024-09-30 12:33:16 +01:00
qwerty287
c45e0885ac Require upgrade from 2.x (#4112)
Remove old DB migrations and require users to upgrade to 2.x first.
2024-09-16 21:09:42 +02:00
qwerty287
84c1b92899 Fix migration registries table (#4111) 2024-09-14 14:41:14 +03:00
qwerty287
67a9c7991c Fix cron migration (#4020) 2024-08-10 21:32:21 +02:00
qwerty287
2081ca85db Refactor JSON and SDK fields (#3968) 2024-08-07 10:49:03 +02:00
qwerty287
c864f24ae4 Migrate to maintained cron lib and remove seconds (#3785)
Co-authored-by: Patrick Schratz <patrick.schratz@gmail.com>
2024-08-06 19:22:28 +02:00
6543
757f5a58e2 Gracefully shutdown server (#3896) 2024-07-14 01:46:01 +02:00
Lauris BH
40b496f13b Fix helper functions for MySQL syntax (#3874) 2024-07-12 18:18:55 +02:00
Anbraten
b23fdaa6dc Fix registry migration (#3871) 2024-07-04 01:29:56 -07: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
qwerty287
92cd0d04a3 Unify DB tables/columns (#3806)
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
2024-06-27 09:32:06 +02:00
Robert Kaussow
89e100cfd1 Add godot linter to harmonitze toplevel comments (#3650) 2024-05-13 22:58:21 +02:00
Anbraten
d494b6a959 Use forge from db (#1417)
This is the first step towards support for multiple forges (#138). It
inserts a forge using the currently existing env varaibles into db and
uses this forge from db later on in all places of the code.

closes #621

addresses #138 

# TODO
- [x] add forges table
- [x] add id of forge to repo
- [x] use forge of repo
- [x] add forge from env vars to db if not exists
- [x] migrate repo.ForgeID to the newly generated forge
- [x] support cache with forge from repo
- [x] maybe add forge loading cache? (use LRU cache for forges, I expect
users to have less than 10 forges normally)

---------

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2024-04-16 08:04:55 +02:00
qwerty287
00f0fcd416 Rework addons (use rpc) (#3268)
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
2024-04-15 10:04:21 +02:00
Robert Kaussow
a6e054f9fe Remove datastore testfiles (#3584)
Ref: https://github.com/woodpecker-ci/woodpecker/pull/3227/files
2024-04-02 10:10:29 +02:00
Anbraten
0b91317cde Fix linter (#3354) 2024-02-08 22:49:07 +01:00
qwerty287
6892a9ca57 Parse backend options in backend (#3227)
Currently, backend options are parsed in the yaml parser.
This has some issues:
- backend specific code should be in the backend folders
- it is not possible to add backend options for backends added via
addons
2024-02-08 18:39:32 +01:00
Lukas
94b882fb95 Add spellcheck config (#3018)
Part of #738 

```
pnpx cspell lint --gitignore '{**,.*}/{*,.*}'
```

---------

Co-authored-by: Anbraten <anton@ju60.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-01-27 21:15:10 +01:00
qwerty287
5e2f7d81b3 Clean up models (#3228) 2024-01-22 07:56:18 +01:00
qwerty287
b9f6f3f9fb Replace goimports with gci (#3202)
`gci` seems to be much more strict.
2024-01-14 18:22:06 +01:00
Robert Kaussow
7756c60a33 Enable golangci linter stylecheck (#3167)
This PR only fixes error string formatting, log message strings are
still mixed upper/lowercase (see
https://github.com/woodpecker-ci/woodpecker/pull/3161#issuecomment-1885140649)
and I'm not aware of a linter to enforce it.
2024-01-10 22:56:42 +01:00
qwerty287
12c40eb957 Enable gocritic and don't ignore globally (#3159)
Use `nolint` directives instead.

From #2960
2024-01-10 15:34:44 +01:00
runephilosof-karnovgroup
adb2c82790 Update go module path for major version 2 (#2905)
https://go.dev/doc/modules/release-workflow#breaking

Fixes https://github.com/woodpecker-ci/woodpecker/issues/2913 fixes
#2654
```
runephilosof@fedora:~/code/platform-woodpecker/woodpecker-repo-configurator (master)$ go get go.woodpecker-ci.org/woodpecker@v2.0.0
go: go.woodpecker-ci.org/woodpecker@v2.0.0: invalid version: module contains a go.mod file, so module path must match major version ("go.woodpecker-ci.org/woodpecker/v2")
```

---------

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2023-12-08 08:15:08 +01:00
qwerty287
2f963d70e7 Add linting for any (#2893)
Add gofmt rules to make sure `interface{}` is not used but only `any`.
2023-11-29 20:21:18 +01:00
qwerty287
7bacbd5699 Migrate to Xormigrate (#2711)
Co-authored-by: Anbraten <anton@ju60.de>
2023-11-28 10:31:54 +01:00