qwerty287
001b5639a6
Use assert
for test ( #3201 )
...
instead of `if`s
2024-01-14 19:33:58 +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
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
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
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
6543
5a7b689e30
Switch to go vanity urls ( #2706 )
...
Co-authored-by: Anbraten <anton@ju60.de>
2023-11-07 08:04:33 +01: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
renovate[bot]
64951d6a9e
fix(deps): update golang deps non-major ( #2500 )
2023-09-30 09:23:11 +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
Michalis Zampetakis
8a517a8596
Do not list archived repos for all forges ( #2374 )
...
Bitbucket seems that does not support repository archiving.
Resolves: https://github.com/woodpecker-ci/woodpecker/issues/2235
---------
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2023-09-06 21:40:25 +02:00
guangwu
287590acfb
Import packages only once ( #2362 )
...
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2023-09-01 17:02:21 +02:00
qwerty287
4d83ea0de8
Add SSH clone URL env var ( #2198 )
...
to improve https://github.com/woodpecker-ci/plugin-git/pull/75
2023-08-12 17:39:13 +02:00
qwerty287
67b7de5cc2
Fix UI and backend paths with subpath ( #1799 )
...
I'm not sure if this is an ideal fix for this, but it seems to work for
me. If you have another idea just let me know.
Closes #1798
Closes #1773
2023-08-07 16:05:18 +02:00
runephilosof-karnovgroup
8487ed92cd
Forge Github Org: Use login
instead of name
( #2104 )
...
For "woodpecker-ci" the `name` is "Woodpecker CI"
and the `login` is "woodpecker-ci"
Fixes #2092
This was causing the organization lookup to fail, because it looks up
using the `login`, when it did not find the organization, it would try
to create it. The creation would fail, because it uses the `name`, and
an organization with that `name` already exists.
Resulting in:
```
pq: duplicate key value violates unique constraint "UQE_orgs_name"
```
2023-08-03 17:30:56 +02:00
Anbraten
e0ed1b3e49
Change master to main ( #2044 )
2023-07-31 05:47:23 +02:00
Anbraten
5a812e3254
Remove default branch fallbacks ( #2065 )
2023-07-30 18:28:52 +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
6543
d9991e67e5
let HookParse func explicit ignore events ( #1942 )
...
for now it's not clear defined, what to do on an unsupported event.
e.g. gitea webhook panel shows 500 error and no message.
now we have a successful webhook and a message to show an info
2023-07-14 02:03:54 +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
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
qwerty287
b59d654f45
Do not use oauth client without token ( #1803 )
...
Closes https://github.com/woodpecker-ci/woodpecker/issues/1370
2023-06-03 03:03:06 +02:00
6543
524611cf00
Add Forge Metadata ( #1789 )
...
close #1787
2023-05-31 18:30:41 +02:00
qwerty287
6d2240b2e6
Identify users using their remote ID ( #1732 )
2023-05-11 05:19:35 +02:00
qwerty287
54d4ec04c0
Drop Gogs private mode ( #1726 )
...
You should use `WOODPECKER_AUTHENTICATE_PUBLIC_REPOS` instead if repos
sent from forge as public should be authenticated
2023-04-30 14:01:11 +02:00
qwerty287
0f9188597e
Initiate Pagination Implementation for API and Infinite Scroll in UI ( #1651 )
...
- Add pagination support to the API endpoints that return lists of items
- Adjust UI to enable infinite scrolling via pagination
2023-04-30 03:40:13 +02:00
qwerty287
0970f35df5
Do not store inactive repos ( #1658 )
...
Do not sync repos with forge if the repo is not necessary in DB.
In the DB, only repos that were active once or repos that are currently
active are stored. When trying to enable new repos, the repos list is
fetched from the forge instead and displayed directly. In addition to
this, the forge func `Perm` was removed and is now merged with `Repo`.
Solves a TODO on RepoBatch.
---------
Co-authored-by: Anbraten <anton@ju60.de>
2023-03-21 23:01:59 +01:00
Lauris BH
46452fbd84
Update Go dependencies and minimal Go version to 1.20 ( #1650 )
...
Signed-off-by: 6543 <6543@obermui.de>
Co-authored-by: 6543 <6543@obermui.de>
2023-03-21 00:48:15 +01:00
qwerty287
42a115e19e
Add PR pipeline list ( #1641 )
...
Instead of viewing PR pipelines in the branches lists, add a separate
list for them. The API endpoint for PRs supports pagination (thus I
added a lot of pagination-related stuff), the UI doesn't yet though.
![wp](https://user-images.githubusercontent.com/80460567/226099133-bb4935d6-c357-4d73-8465-9157e25c0d82.png )
Closes #1619
Extends this part of #1640
---------
Co-authored-by: Anbraten <anton@ju60.de>
2023-03-19 10:43:57 +01:00
Lukas
1b43b0bf20
Add pull request labels as environment variable ( #1321 )
...
Closes #1308
Co-authored-by: Anbraten <anton@ju60.de>
2023-03-17 03:43:04 +01:00
6543
18d3139e9e
Use modern error handling and enforce it via lint ( #1327 )
...
Co-authored-by: Anbraten <anton@ju60.de>
2023-02-02 00:08:02 +01:00
Anbraten
de8ea95dd3
Rename forge-id to forge-remote-id ( #1418 )
2022-11-15 15:01:23 +01:00
Josh Soref
12cbe15de0
Fix spelling: gitlab ( #1411 )
...
This is most of the GitLab changes that I dropped from #1405 .
As before, I'm happy to adjust things...
<details><summary>Problematic Changes</summary>
Fwiw, this is the part that causes the tests to break (I don't
understand why, but I'm leaving this change out):
```patch
commit 703cbe3ed398bf32535120ead733b80aa145c8db
Author: Josh Soref <2119212+jsoref@users.noreply.github.com>
Date: Tue Nov 8 17:09:06 2022 -0500
event?! -- this seems broken
diff --git a/server/forge/gitlab/testdata/hooks.go b/server/forge/gitlab/testdata/hooks.go
index 7d39306..e394afc 100644
--- a/server/forge/gitlab/testdata/hooks.go
+++ b/server/forge/gitlab/testdata/hooks.go
@@ -27,7 +27,7 @@ var (
ServiceHookHeaders = http.Header{
"Content-Type": []string{"application/json"},
"User-Agent": []string{"GitLab/14.3.0"},
- "X-Gitlab-Event": []string{"Service Hook"},
+ "X-GitLab-Event": []string{"Service Hook"},
}
)
diff --git a/shared/token/token.go b/shared/token/token.go
index 3f15537..191e5ee 100644
--- a/shared/token/token.go
+++ b/shared/token/token.go
@@ -64,7 +64,7 @@ func ParseRequest(r *http.Request, fn SecretFunc) (*Token, error) {
return parse(bearer, fn)
}
- token = r.Header.Get("X-Gitlab-Token")
+ token = r.Header.Get("X-GitLab-Token")
if len(token) != 0 {
return parse(token, fn)
}
```
</details>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2022-11-09 17:16:17 +01:00
Josh Soref
023d03dd61
Spelling ( #1405 )
...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-11-09 08:12:17 +01:00
6543
18311d4360
Split and refactor ( #1394 )
...
Closes #974
2022-11-06 12:44:04 +01:00
qwerty287
3372d1a87c
Rename remote
to forge
( #1357 )
...
As of #745
Co-authored-by: Anbraten <anton@ju60.de>
2022-11-05 00:35:06 +01:00