Lukas
5cedc956e9
Ignore gitlab merge request events without code changes ( #3338 )
...
Closes #3320
From the gitlab docs at:
https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#merge-request-events
> The field object_attributes.oldrev is only available when there are
actual code changes
2024-02-07 01:45:00 +01:00
Lukas
baf2e645bc
Ignore gitlab push events without commits ( #3339 )
...
Example of the resulting buggy pipeline:
![image](https://github.com/woodpecker-ci/woodpecker/assets/32853499/1e4bedc6-465b-466e-8d89-a7348e374c7f )
2024-02-07 02:24:08 +02:00
Lukas
db4a50951c
Consider gitlab inherited permissions ( #3308 )
...
The gitlab projects endpoint does not include information about
permissions granted by namespace memberships. To get this information a
separate query to
https://docs.gitlab.com/ee/api/members.html#get-a-member-of-a-group-or-project-including-inherited-and-invited-members
is necessary.
2024-02-06 00:10:23 +01:00
qwerty287
9df572ef31
Add release
event trigger ( #3226 )
...
Supersedes #764
Bitbucket does not support release webhooks.
---------
Co-authored-by: Patrick Schratz <patrick.schratz@gmail.com>
2024-01-30 17:39:00 +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
Alconety
8cb86ddc68
fix bitbucket SSO using UUID from bitbucket api response as ForgeRemoteID ( #3265 )
2024-01-23 16:35:30 +01:00
qwerty287
5e2f7d81b3
Clean up models ( #3228 )
2024-01-22 07:56:18 +01:00
6543
8ca51971be
Add gitea/forgejo driver check, to handle ErrUnknownVersion error ( #3243 )
...
close #3240
2024-01-21 23:07:37 +02:00
Michalis Zampetakis
39c1beffc5
Fix Bitbucket get pull requests that ignores pagination ( #3235 )
...
Fixes #3180
2024-01-20 22:41:54 +01:00
qwerty287
b82790d54c
Remove some interfaces ( #3220 )
2024-01-19 16:20:35 +01:00
Alconety
07479dd645
Retrieve all user repo perms with a single API call ( #3211 )
...
This pull request addresses the issue https://github.com/woodpecker-ci/woodpecker/issues/3210 .
Ideally, the Bitbucket API should include repository permissions when
utilizing the 'get all repositories' endpoint. However, as it currently
does not provide this information, a viable solution is to fetch all
permissions for every repository and then employ a dictionary to
associate each repository with its respective permissions.
Without implementing this fix, logging in becomes problematic for users
with access to a substantial number of repositories (300+), as the
process takes over 2 minutes to complete.
---------
Co-authored-by: Alberto Alcón <albertoalcon@bit2me.com>
2024-01-19 04:15:47 +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
renovate[bot]
57dd88f94a
fix(deps): update module github.com/google/go-github/v57 to v58 ( #3187 )
2024-01-13 08:13:22 +01:00
Robert Kaussow
9bbba4441d
Enable golangci linter forcetypeassert ( #3168 )
...
Split out from https://github.com/woodpecker-ci/woodpecker/pull/2960
2024-01-12 02:01:02 +01: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
12c40eb957
Enable gocritic
and don't ignore globally ( #3159 )
...
Use `nolint` directives instead.
From #2960
2024-01-10 15:34:44 +01:00
qwerty287
1b380ff4b4
Enable nolintlint
( #3158 )
2024-01-10 12:11:18 +01:00
qwerty287
768fd71841
Enable some linters ( #3129 )
...
Mostly those that did not require much work.
From #2960
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-01-09 21:35:37 +01:00
qwerty287
72ae8828ca
Load changed files for closed PR ( #3067 )
2023-12-29 22:50:31 +01:00
Anbraten
f01ac3f0a3
Add pull request closed event ( #2684 )
...
- [x] updates docs
- [x] adjust UI
- [x] show correct icon
- [x] show correct link (to pr)
- [x] add as option in secret edit
- [x] parse webhook
- [x] update tests
- [x] github merged
- [x] github closed
- [x] gitea merged
- [x] gitea closed
- [x] bitbucket merged
- [x] bitbucket closed
- [x] gitlab merged
- [x] gitlab closed
closes #286
2023-12-26 19:22:52 +01:00
qwerty287
9d9bcbf363
Hide PR tab if PRs are disabled ( #3004 )
...
Closes https://github.com/woodpecker-ci/woodpecker/issues/2988
2023-12-24 11:04:18 +02:00
Anbraten
e5dbbd92c7
Fix gitlab project fetching ( #3000 )
2023-12-23 09:48:16 +01:00
Anbraten
619858e0e9
Ignore pipelines without config ( #2949 )
...
Co-authored-by: 6543 <6543@obermui.de>
2023-12-21 11:13:25 +01:00
6543
65c62e987f
gitlab: support nested repos ( #2981 )
...
close #2311
2023-12-21 00:55:16 +01:00
6543
2e7610379e
Update slogan & logo ( #2962 )
...
- Update woodpecker slogan to repo too
we are not just a simple fork anymore 🎉
- use https://github.com/woodpecker-ci/design/blob/main/logo/non-square.svg
2023-12-19 14:12:18 +01:00
6543
1ca549190b
Gitea driver: ignore GetOrg error if we get a valid user. ( #2967 )
...
`[POST] /api/repos?forge_remote_id=12345`
```json
{"level":"error","error":"GetOrgByName","time":"2023-12-19T01:03:36Z","caller":"/woodpecker/src/github.com/woodpecker-ci/woodpecker/server/api/repo.go:143","message":"Could not fetch organization from forge."}
```
because `https://codeberg.org/api/v1/orgs/6543 ` returns an error.
`https://codeberg.org/api/v1/users/6543 ` do not.
close #2714
2023-12-19 09:13:39 +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
renovate[bot]
621eed6205
Update module github.com/google/go-github/v56 to v57 ( #2899 )
2023-12-02 15:19:39 +01:00
qwerty287
237b2257f5
Fix bitbucket org fetching ( #2874 )
...
closes #2793
2023-12-01 20:45:42 +01:00
Michalis Zampetakis
981384b79a
Change PullRequest Index to ForgeRemoteID / string type ( #2823 )
...
Co-authored-by: Patrick Schratz <patrick.schratz@gmail.com>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
Co-authored-by: Anbraten <anton@ju60.de>
2023-11-26 00:52:52 +01:00
renovate[bot]
f0f57ec961
Update golang (packages) ( #2839 )
...
[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg )](https://renovatebot.com )
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/antonmedv/expr](https://togithub.com/antonmedv/expr ) |
require | patch | `v1.15.3` -> `v1.15.4` |
| [github.com/xanzy/go-gitlab](https://togithub.com/xanzy/go-gitlab ) |
require | minor | `v0.93.2` -> `v0.94.0` |
| [k8s.io/api](https://togithub.com/kubernetes/api ) | require | patch |
`v0.28.3` -> `v0.28.4` |
| [k8s.io/apimachinery](https://togithub.com/kubernetes/apimachinery ) |
require | patch | `v0.28.3` -> `v0.28.4` |
| [k8s.io/client-go](https://togithub.com/kubernetes/client-go ) |
require | patch | `v0.28.3` -> `v0.28.4` |
---
### Release Notes
<details>
<summary>antonmedv/expr (github.com/antonmedv/expr)</summary>
###
[`v1.15.4`](https://togithub.com/antonmedv/expr/releases/tag/v1.15.4 )
[Compare
Source](https://togithub.com/antonmedv/expr/compare/v1.15.3...v1.15.4 )
- Improved type checking for `$env`
- Added support for floats in `sort()` built-in
- Fixed: AST printing for `??` operator
- Fixed: only emit `OpEqual{Int,String}` for simple types
- Fixed: fetch without `OpDeref`
([#​467](https://togithub.com/antonmedv/expr/issues/467 ))
- Docs: categorize Language Definition functions
([#​452](https://togithub.com/antonmedv/expr/issues/452 ))
- Changed: `ast.Node` type now is not copied with `ast.Patch`
</details>
<details>
<summary>xanzy/go-gitlab (github.com/xanzy/go-gitlab)</summary>
###
[`v0.94.0`](https://togithub.com/xanzy/go-gitlab/compare/v0.93.2...v0.94.0 )
[Compare
Source](https://togithub.com/xanzy/go-gitlab/compare/v0.93.2...v0.94.0 )
</details>
<details>
<summary>kubernetes/api (k8s.io/api)</summary>
###
[`v0.28.4`](https://togithub.com/kubernetes/api/compare/v0.28.3...v0.28.4 )
[Compare
Source](https://togithub.com/kubernetes/api/compare/v0.28.3...v0.28.4 )
</details>
<details>
<summary>kubernetes/apimachinery (k8s.io/apimachinery)</summary>
###
[`v0.28.4`](https://togithub.com/kubernetes/apimachinery/compare/v0.28.3...v0.28.4 )
[Compare
Source](https://togithub.com/kubernetes/apimachinery/compare/v0.28.3...v0.28.4 )
</details>
<details>
<summary>kubernetes/client-go (k8s.io/client-go)</summary>
###
[`v0.28.4`](https://togithub.com/kubernetes/client-go/compare/v0.28.3...v0.28.4 )
[Compare
Source](https://togithub.com/kubernetes/client-go/compare/v0.28.3...v0.28.4 )
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "before 4am" (UTC), Automerge -
"before 4am" (UTC).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions ) if
that's undesired.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/ ). View
repository job log
[here](https://developer.mend.io/github/woodpecker-ci/woodpecker ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: qwerty287 <ndev@web.de>
2023-11-20 08:23:01 +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
Patrick Schratz
9d5ef117a2
Fix listing Gitea repos ( #2768 )
2023-11-07 20:18:42 +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
d284aeb545
Fix default status ( #2715 )
...
Regression #2695
probably closes #2716
2023-11-03 13:00:34 +01:00
qwerty287
abb2f280eb
Unique status for matrix ( #2695 )
...
implement this fix but with an additional field on workflows to not
change the workflow name
closes #1840
closes #713
---------
Co-authored-by: 6543 <6543@obermui.de>
2023-11-01 17:28:02 +01:00
qwerty287
e74115027b
Add some tests ( #2652 )
...
and some cleanups
2023-10-28 13:37:54 +02:00
qwerty287
9232db06dd
Use pagination utils ( #2633 )
...
1. replace custom pagination code with pagination util
2. add pagination if it could be necessary (hook deactivation)
2023-10-23 18:44:25 +02:00
qwerty287
ce85a60e32
Dynamic forge request size ( #2622 )
...
and remove checks for gitea 1.18 which is quite old already and
shouldn't be used anymore
closes https://github.com/woodpecker-ci/woodpecker/issues/1038
2023-10-23 09:22:00 +02:00
Oskars
afef609f3c
Adjust github scopes and clarify documentation. ( #2578 )
...
Add scopes needed when creating Github application.
Removed "repo:status" scope, because it is included in already requested
"repo" scope.
Fixes : #1081
2023-10-14 13:26:25 +02:00
renovate[bot]
b1cedecc42
fix(deps): update module github.com/google/go-github/v55 to v56 ( #2573 )
2023-10-12 15:28:00 +02:00
Michalis Zampetakis
259ff78a62
Fix PR event trigger and list for bitbucket repos ( #2539 )
...
Co-authored-by: Anbraten <anton@ju60.de>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2023-10-08 14:18:49 +02:00
qwerty287
22dfd2ef62
Refactor pipeline parsing and forge refreshing ( #2527 )
...
- refactor pipeline parsing
- do not parse the pipeline multiple times to perform filter checks, do
this once and perform checks on the result directly
- code deduplication
- refactor forge token refreshing
- move refreshing to a helper func to reduce code
---------
Co-authored-by: Anbraten <anton@ju60.de>
2023-10-08 14:05:06 +02:00
qwerty287
3bd53b379e
Fix gitlab hooks and simplify config extension ( #2537 )
...
- closes #2534
- remove `IsConfigured` func from config extension.
If `server.Config.Services.ConfigService != nil` it is always configured
2023-10-07 16:41:25 +02:00
renovate[bot]
14fb564629
fix(deps): update golang deps non-major ( #2533 )
2023-10-06 17:33:06 +02:00