Commit Graph

89 Commits

Author SHA1 Message Date
6543
c3d1849673 Delete/Deactivate repo ignores missing repo at forge (#5953) 2026-01-11 13:00:27 +02:00
Anbraten
152b4760dc Correctly update repo permissions (#5928) 2026-01-09 14:53:14 +01:00
Anbraten
cdefb2842c Migrate to maintained tink-go (#5886) 2025-12-20 09:23:09 +01:00
6543
761cc67f11 server/forge: rename var to be more descriptive and test value (#5806) 2025-12-02 13:40:08 +01:00
6543
21ef4cac53 On set/get of repo make sure forge_id is set and on fetch respected (#5717) 2025-11-27 09:39:41 +01:00
Anbraten
92b48f813a Improve repair endpoints (#5767)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-20 22:44:05 +01:00
Gusted
650d6bd432 chore(deps): drop github.com/gorilla/securecookie (#5609) 2025-10-06 23:43:29 +02:00
Anbraten
677a2476b5 Allow to configure a config extension per repo (#3349)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2025-09-30 12:52:40 +02:00
qwerty287
40e383866a Allow to set default approval mode (#5406) 2025-08-11 12:59:02 +02:00
qwerty287
64578bff46 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-02-25 17:07:37 +02:00
Jack Gleeson
5ea4f0cfae Add default option for allowing pull requests on repositories (#4873) 2025-02-20 19:28:28 +02:00
Anbraten
45a92cd928 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-16 12:02:18 +02: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
b4df9e68fd Store/delete repos after forge communication (#4827) 2025-02-09 14:55:44 +02:00
qwerty287
8e99551d18 Add allow list for approvals (#4768)
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
Co-authored-by: Robert Kaussow <xoxys@rknet.org>
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
2025-01-30 00:21:33 +01:00
qwerty287
97d24ee1c9 Remove deprecated API field (#4676) 2025-01-08 16:40:53 +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
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
5e2fa8164b Extend approval options (#3348) 2024-11-18 14:49:12 +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
Lukas
79aeb92e0c Set repo user to repairing user when old user is missing (#4128) 2024-09-20 22:39:22 +02:00
qwerty287
2d1bc9f15c Move manual popup to own page (#3981) 2024-08-07 09:31:17 +02:00
Anbraten
1953a0ec5a Fix repo creation (#3756) 2024-06-10 12:28:54 +02:00
6543
4ec046e415 Spellcheck "server/*" (#3753)
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2024-06-04 08:30:54 +02:00
Anbraten
fd57e4ad05 Use IDs for tokens (#3695) 2024-05-27 11:52:43 +02:00
Anbraten
dbd91d3884 Cleanup api docs and ts api-client options (#3663) 2024-05-01 11:50:41 +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
eaf10611eb Allow to disable deployments (#3570)
…but if they're enabled, allow for all events. Also add warning that you
should only enable it if you trust the users with push access.

closes #3559

---------

Co-authored-by: Robert Kaussow <xoxys@rknet.org>
2024-04-02 22:03:37 +02:00
qwerty287
b0a2b1cf2d Lowercase all log strings (#3173)
from #3161

---------

Co-authored-by: 6543 <6543@obermui.de>
2024-01-11 19:17:07 +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
00df53e941 Clean up logging (#3161)
- use `Err` method instead of format strings
- use `Msg` if no format string is used
2024-01-10 20:57:12 +01:00
6543
3f1f563180 fix and lint swagger file (#3007)
Co-authored-by: qwerty287 <ndev@web.de>
2023-12-24 15:50:01 +01:00
6543
257a76c5ea Improve error handling when activating a repository (#2965)
Activate Repo:
- Don't drop errors and also always log them on the server.
- Show users only meaningful error messages.
2023-12-19 06:25:59 +01:00
6543
4974d4cffe ignore some errors on repairAllRepos (#2792)
close  #2791

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2023-12-13 14:53:38 +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
342b25826c Rename link to url (#2812)
As of https://woodpecker-ci.org/docs/next/usage/terminiology#conventions
2023-11-14 17:12:12 +01:00
qwerty287
fd77b2e9d7 Fix repo owner filter (#2808)
and move to server config instead of middleware

cc @xoxys 

closes #2784
2023-11-12 14:39:41 +01:00
6543
5a7b689e30 Switch to go vanity urls (#2706)
Co-authored-by: Anbraten <anton@ju60.de>
2023-11-07 08:04:33 +01:00
qwerty287
e74115027b Add some tests (#2652)
and some cleanups
2023-10-28 13:37:54 +02:00
qwerty287
387637bb4e Use repo user to repair (#2645)
Solve
https://github.com/woodpecker-ci/woodpecker/pull/2642#pullrequestreview-1694731501
2023-10-24 15:54:43 +02:00
qwerty287
69917c1a0d Add "Repair all" button (#2642)
to the admin repo list

ref #2639
2023-10-24 14:12:55 +02:00
Tom Kneiphof
baaf8b97e1 Fix usage of WOODPECKER_ROOT_PATH (#2485)
I had experienced some issues running Woodpecker behind a reverse-proxy,
resulting from not defining the `WOODPECKER_ROOT_PATH` environment
variable in #2477.

As suggested by @qwerty287, specifying `WOODPECKER_ROOT_PATH=/foo`
*mostly* solved the issue of running the woodpecker server at an url
like `https://example.org/foo`.
However, the webhook urls and badge urls were generated excluding the
configured `WOODPECKER_ROOT_PATH`.

This PR (mostly) fixes issues related to non-empty
`WOODPECKER_ROOT_PATH`.

---------

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2023-09-22 16:43:31 +02:00
qwerty287
d04bb72e5e Add repos list for admins (#2347) 2023-09-08 12:26:20 +02:00
Matheus Moraes
85e157bb10 fix(server/api/repo): Fix repair webhook host (#2372)
Fixes https://github.com/woodpecker-ci/woodpecker/issues/2371

Similar change to
https://github.com/woodpecker-ci/woodpecker/pull/1869/files#diff-3cd73db84155aa0447a17dadc8f50271d646fcf6132606cf2ab703cc7b80eb38R113
2023-09-06 12:17:23 +02:00
qwerty287
3e563ef198 Use API error helpers and improve response codes (#2366) 2023-09-02 13:31:10 +02:00