qwerty287
cb3efd2cd9
Simplify store interfaces ( #3437 )
...
Use `store.Store` interface if possible.
2024-02-25 10:37:10 +01: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
qwerty287
2eec1ce909
Fix agent updating ( #3287 )
2024-01-28 12:29:56 +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
6543
7b29d1da49
Make PipelineConfig unique again ( #3215 )
...
fix https://github.com/woodpecker-ci/woodpecker/issues/3093
reverts https://github.com/woodpecker-ci/woodpecker/pull/3128
2024-01-18 23:50:29 +02:00
qwerty287
001b5639a6
Use assert
for test ( #3201 )
...
instead of `if`s
2024-01-14 19:33:58 +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
6543
ebbac258a2
Add check for storage where repo/org name is empty ( #2968 )
...
I just discovered that there is an organization created with name being empty.
we should at least catch it for now in the storage - and later trace
down why we get it in the first place
2023-12-19 06:03:56 +01:00
Anbraten
16803d6217
Show secrets from org and global level ( #2873 )
...
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2023-12-16 10:29:13 +01:00
Robert Kaussow
6de5922408
Fix skipped pipelines model ( #2923 )
...
Fixes: https://github.com/woodpecker-ci/woodpecker/issues/2901
---------
Co-authored-by: Lauris BH <lauris@nix.lv>
2023-12-12 22:30:52 +02: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
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
70711ed9db
Replace interface{}
with any
( #2807 )
...
like golang:
2580d0e08d
2023-11-12 18:23:48 +01:00
Thomas Anderson
08f47afbd1
Sort agents list by ID ( #2795 )
2023-11-10 01:11:11 +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
Anbraten
731d4713c0
Fix pipeline error migration ( #2735 )
...
Co-authored-by: Patrick Schratz <patrick.schratz@gmail.com>
2023-11-06 13:20:28 +01:00
Anbraten
5ff006614f
Enhance linter and errors ( #1572 )
...
Co-authored-by: 6543 <m.huber@kithara.com>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2023-11-03 11:44:03 +01:00
qwerty287
9c07b15c99
Fix where syntax ( #2676 )
2023-10-31 12:43:06 +01:00
qwerty287
e74115027b
Add some tests ( #2652 )
...
and some cleanups
2023-10-28 13:37:54 +02:00
Anbraten
f44aa8a6fd
Remove plugin-only option from secrets ( #2213 )
2023-10-24 20:38:47 +02:00
renovate[bot]
3d19d863d1
fix(deps): update module github.com/tevino/abool to v2 ( #2460 )
2023-09-14 07:34:36 +02:00
Sebastian P
07094558a8
fix: change config.config_data column type to longblob in mysql ( #2434 )
...
See
https://github.com/woodpecker-ci/woodpecker/pull/2418#discussion_r1320832841
for context.
2023-09-10 22:24:51 +02:00
Sebastian P
47b9dab016
Fix: change tasks.task_data column type to longblob in mysql ( #2418 )
...
Fix #2206
Changes are copied and adapted from #1050
2023-09-10 13:33:48 +02:00
qwerty287
d04bb72e5e
Add repos list for admins ( #2347 )
2023-09-08 12:26:20 +02:00
qwerty287
56b8ba151a
Delete repos/secrets on org deletion ( #2367 )
2023-09-02 15:00:13 +02:00
qwerty287
3e563ef198
Use API error helpers and improve response codes ( #2366 )
2023-09-02 13:31:10 +02:00
qwerty287
479ced3b25
Add org list ( #2338 )
...
![Screenshot 2023-08-28 at 10-08-20
Woodpecker](https://github.com/woodpecker-ci/woodpecker/assets/80460567/e3248b05-7899-43ca-a0cf-4834eae078d8 )
Closes #2307
2023-08-28 11:15:16 +02:00
qwerty287
7adfa6c2ba
Fix migration ( #2319 )
2023-08-22 17:37:29 +02:00
qwerty287
81ead7cbf2
Support user secrets ( #2126 )
2023-08-21 15:04:12 +02:00
qwerty287
8cdac56d8f
Check for correct license header ( #2137 )
2023-08-10 11:06:00 +02:00
6543
17ab945825
Fix 'add-orgs' migration ( #2117 )
...
close #2096
~~blocked by https://gitea.com/xorm/xorm/pulls/2320~~
2023-08-08 00:16:50 +03:00
Anbraten
e0ed1b3e49
Change master to main ( #2044 )
2023-07-31 05:47:23 +02:00
6543
bc2e2c7a1b
let generic datastore error include func name ( #2041 )
...
error logs like:
```
{"level":"warn","error":"sql: no rows in result set","time":"2023-07-25T21:29:56Z"}
```
have to less context to be helpfull.
this will cange it as the message now looks like:
```
{"level":"warn","error":"GetPipelineLast: sql: no rows in result set", "time":"2023-07-27T02:54:25+02:00"}
```
2023-07-27 21:22:24 +02:00
Anbraten
e5d5ec8b47
Use id to access orgs ( #1873 )
...
closes #1743
fixes: setting secrets for own user namespace
- create org in database
- use orgID for org related APIs
Co-authored-by: 6543 <6543@obermui.de>
2023-07-21 19:45:32 +02:00
Robert Kaussow
443c23c58a
Use global logger for xorm logs and add options ( #1997 )
...
Please let me know if this goes in the right direction. Needs some tests and docs.
2023-07-15 01:15:13 +02:00
6543
7c99c8b843
Adjust model database type mapping ( #1949 )
...
adjust definitions according to feedback from real world usage
(ci.codeberg.org)
close #1892
close #1865
2023-07-08 20:09:53 +02:00
6543
2961aaf72b
Harden datastore ( #1940 )
...
- only explicit when filters
- write all more complex filter with builder
- reuse builder
2023-07-07 13:10:16 +02:00
qwerty287
cd982fcbd1
Fix pipeline status calculation/reporting ( #1898 )
...
Closes #1895
Regression of #1784
2023-06-29 14:56:01 +02:00
6543
e1c31df6c6
Refactor AgentFindByToken ( #1891 )
...
followup of #1890
2023-06-28 06:59:58 +02:00
Anbraten
b57b6f27f6
Fix empty agent token ( #1890 )
...
Using an empty token for an agent was returning the first agent from the
database as the orm is not adding where clauses for empty strings of a
model when querying.
# Huge thanks for reporting and explaining the issue ❤️
- Dominik Heidler
- Timo Tomasini
2023-06-28 01:22:19 +02:00
qwerty287
3033abc3b4
Add own workflow model ( #1784 )
...
Closes #1287
---------
Co-authored-by: 6543 <6543@obermui.de>
2023-06-27 18:01:18 +02:00
6543
6be61e6c9a
logs table migration: skip on corrupted json and fail later ( #1856 )
...
enhance #1828
2023-06-13 12:50:11 +03:00
Anbraten
ff01a9ff1d
Access repos by their ids ( #1691 )
...
closes #1295
closes #648
# TODO
- [x] add new routes with `:repoID`
- [x] load repo in middleware using `:repoID` if present
- [x] update UI routes `:owner/:name` to `:repoID`
- [x] load repos using id in UI
- [x] add lookup endpoint `:owner/:name` to `:repoID`
- [x] redirect `:owner/:name` to `:repoID` in UI
- [x] use badge with `:repoID` route in UI
- [x] update `woodpecker-go`
- [x] check cli
- [x] add migrations / deprecation notes
- [x] check if #648 got solved directly
- [x] Test
- [x] create repo
- [x] repo pages
- [x] ui redirects
- [x] forge status links
2023-06-13 01:07:52 +02:00
6543
5139624cf8
Migrate old logs to new database schema ( #1828 )
...
address new models based on #1802
2023-06-12 22:43:14 +02:00