Commit graph

60 commits

Author SHA1 Message Date
qwerty287
eeec084293
Set refspec for gitlab MR (#4021) 2024-08-10 21:43:50 +03:00
Anbraten
1a39d57f71
Enhance authentication UX (#3807) 2024-06-21 09:55:30 +02:00
qwerty287
d28e150534
Use http constants (#3766) 2024-06-06 11:16:45 +02:00
renovate[bot]
37ea906958
fix(deps): update golang-packages (#3713)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: qwerty287 <qwerty287@posteo.de>
2024-05-23 17:37:21 +02:00
Anbraten
5527d9bf86
Cleanup server env settings (#3670)
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
Co-authored-by: Robert Kaussow <xoxys@rknet.org>
2024-05-15 15:45:08 +02:00
Robert Kaussow
89e100cfd1
Add godot linter to harmonitze toplevel comments (#3650) 2024-05-13 22:58:21 +02:00
qwerty287
c9a3bfb321
Fix spellcheck and enable more dirs (#3603) 2024-04-09 09:04:53 +02:00
Robert Kaussow
a779eed3df
Enable golangci linter gomnd (#3171) 2024-03-15 18:00:25 +01:00
qwerty287
451af535d3
Replace http types on forge interface (#3374) 2024-02-13 16:19:02 +01:00
qwerty287
e1521ef460
Set correct link for commit (#3368)
Closes https://github.com/woodpecker-ci/woodpecker/issues/2657
Closes https://github.com/woodpecker-ci/woodpecker/issues/906
2024-02-11 10:44:50 +01:00
Anbraten
9e96c9c25e
Fix correctly handle gitlab pr closed events (#3362)
closes #3355
2024-02-09 16:49:04 +01:00
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
qwerty287
5e2f7d81b3
Clean up models (#3228) 2024-01-22 07:56:18 +01:00
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`
([#&#8203;467](https://togithub.com/antonmedv/expr/issues/467))
- Docs: categorize Language Definition functions
([#&#8203;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