1
0
mirror of https://codeberg.org/crowci/crow.git synced 2025-08-07 20:23:03 +03:00
Commit Graph

197 Commits

Author SHA1 Message Date
crowci-bot
28a66d2e7d chore(deps): update module github.com/google/go-github/v69 to v70 (#115)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/google/go-github/v69](https://github.com/google/go-github) | require | major | `v69.2.0` -> `v70.0.0` |

---

### Release Notes

<details>
<summary>google/go-github (github.com/google/go-github/v69)</summary>

### [`v70.0.0`](https://github.com/google/go-github/releases/tag/v70.0.0)

[Compare Source](https://github.com/google/go-github/compare/v69.2.0...v70.0.0)

This release contains the following breaking API changes:

-   feat!: Add support for network-configurations endpoints for organization ([#&#8203;3511](https://github.com/google/go-github/issues/3511))
    BREAKING CHANGE: `EnterpriseNetwork*` structs have been replaced with `Network*` structs.
-   refactor!: Update package types to align with webhook event ([#&#8203;3515](https://github.com/google/go-github/issues/3515))
    BREAKING CHANGE: `PackageVersion.Body` and `PackageVersion.Metadata` are both now `json.RawMessage`.

...and the following additional changes:

-   build(deps): bump github.com/alecthomas/kong from 1.8.0 to 1.8.1 in /tools ([#&#8203;3485](https://github.com/google/go-github/issues/3485))
-   build(deps): bump github.com/google/go-github/v69 from 69.0.0 to 69.2.0 in /scrape ([#&#8203;3483](https://github.com/google/go-github/issues/3483))
-   build(deps): bump github.com/google/go-cmp from 0.6.0 to 0.7.0 in /tools ([#&#8203;3490](https://github.com/google/go-github/issues/3490))
-   Bump github.com/google/go-cmp from 0.6.0 to 0.7.0 ([#&#8203;3494](https://github.com/google/go-github/issues/3494))
-   build(deps): bump actions/cache from 4.2.0 to 4.2.1 in the actions group ([#&#8203;3492](https://github.com/google/go-github/issues/3492))
-   fix: Resolve '400 Custom domains' error on GitHub Enterprise Server ([#&#8203;3489](https://github.com/google/go-github/issues/3489))
-   Correct the runIDFromURLRE regex to properly match the callbackURL ([#&#8203;3495](https://github.com/google/go-github/issues/3495))
-   feat: Add support for GitHub-hosted runner API endpoints ([#&#8203;3487](https://github.com/google/go-github/issues/3487))
-   feat: Add support for network-configurations endpoints ([#&#8203;3497](https://github.com/google/go-github/issues/3497))
-   build(deps): bump codecov/codecov-action from 5.3.1 to 5.4.0 ([#&#8203;3500](https://github.com/google/go-github/issues/3500))
-   build(deps): bump actions/cache from 4.2.1 to 4.2.2 in the actions group ([#&#8203;3499](https://github.com/google/go-github/issues/3499))
-   Add created_at field to Reaction ([#&#8203;3501](https://github.com/google/go-github/issues/3501))
-   Add reason parameter to MergeGroupEvent ([#&#8203;3508](https://github.com/google/go-github/issues/3508))
-   fix(ci): ensure 'auto' toolchain applies to generate ([#&#8203;3436](https://github.com/google/go-github/issues/3436))
-   Bump dependency versions from dependabot warnings ([#&#8203;3512](https://github.com/google/go-github/issues/3512))
-   Bump go-jose to v4.0.5 ([#&#8203;3513](https://github.com/google/go-github/issues/3513))
-   build(deps): bump golang.org/x/net from 0.33.0 to 0.36.0 in /example ([#&#8203;3514](https://github.com/google/go-github/issues/3514))
-   docs: Update readme and examples for updated go-github-ratelimit and introduce go-github-pagination ([#&#8203;3504](https://github.com/google/go-github/issues/3504))
-   Add validity filter to secret scanning alert list options ([#&#8203;3516](https://github.com/google/go-github/issues/3516))
-   build(deps): bump github.com/alecthomas/kong from 1.8.1 to 1.9.0 in /tools ([#&#8203;3518](https://github.com/google/go-github/issues/3518))
-   build(deps): bump github.com/getkin/kin-openapi from 0.129.0 to 0.130.0 in /tools ([#&#8203;3517](https://github.com/google/go-github/issues/3517))
-   feat: Add automatic_copilot_code_review_enabled parameter to ruleset API ([#&#8203;3506](https://github.com/google/go-github/issues/3506))
-   Bump version of go-github to v70.0.0 ([#&#8203;3520](https://github.com/google/go-github/issues/3520))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "* * * * 0,6" (UTC), Automerge - "* 0-3 * * *" (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMTEuMCIsInVwZGF0ZWRJblZlciI6IjM5LjIxMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmN5IPCfk6bvuI8iXX0=-->

Reviewed-on: https://codeberg.org/crowci/crow/pulls/115
Co-authored-by: crowci-bot <admin@crowci.dev>
Co-committed-by: crowci-bot <admin@crowci.dev>
2025-03-27 18:06:43 +00:00
pat-s
4475f762e2 chore: update mocks 2025-03-10 13:58:57 +01:00
Jener Rasmussen
74f920e7ff fix: nil dereference in Bitbucket webhook handling (#4896) 2025-03-10 10:11:38 +01:00
qwerty287
6276ebf9e4 chore: include forge type in netrc (#4908) 2025-03-10 10:10:31 +01:00
Levy-Tal
1d9318849b fix: BitbucketDC: optimize repository search (#4919)
Co-authored-by: tal <tal@localhost>
2025-03-10 10:09:36 +01:00
pat-s
53c8eb44fb chore: remove go generate mockery 2025-02-19 15:46:17 +01:00
qwerty287
9ffb9ac1bd Directly fetch directory contents (#4842) 2025-02-19 15:05:11 +01:00
crowci-bot
558b69638e fix(deps): update module codeberg.org/mvdkleijn/forgejo-sdk/forgejo to v2 (#49)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| codeberg.org/mvdkleijn/forgejo-sdk/forgejo | require | major | `v1.2.0` -> `v2.0.0` |

---

### Configuration

📅 **Schedule**: Branch creation - "* * * * 0,6" (UTC), Automerge - "* 0-3 * * *" (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzAuMiIsInVwZGF0ZWRJblZlciI6IjM5LjE3MC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmN5IPCfk6bvuI8iXX0=-->

Co-authored-by: Patrick Schratz <pat-s@noreply.codeberg.org>
Co-authored-by: pat-s <patrick.schratz@gmail.com>
Reviewed-on: https://codeberg.org/crowci/crow/pulls/49
Co-authored-by: crowci-bot <admin@crowci.dev>
Co-committed-by: crowci-bot <admin@crowci.dev>
2025-02-15 12:50:21 +00:00
pat-s
cecfb22099 refactor: mocking (#38)
- `mockery` can now be run in one call instead of multiple ones
- Use the recommended "packages" approach which will be the new default moving forward
- Enforce consistent naming of mock files
- Remove warnings when invoking `mockery`
- Get rid of *many* linter warnings 🎉️

Reviewed-on: https://codeberg.org/crowci/crow/pulls/38
Co-authored-by: pat-s <patrick.schratz@gmail.com>
Co-committed-by: pat-s <patrick.schratz@gmail.com>
2025-02-15 10:23:47 +00:00
crowci-bot
19f051b0db fix(deps): update module github.com/google/go-github/v68 to v69 (#26)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/google/go-github/v68](https://github.com/google/go-github) | require | major | `v68.0.0` -> `v69.0.0` |
2025-02-10 10:43:04 +01:00
pat-s
7673d5253f refactor: migrate import paths from github to codeberg 2025-01-31 14:57:57 +01:00
pat-s
5797d2c420 chore: editorconfig fixes 2025-01-20 15:34:57 +01:00
pat-s
db61cd3f23 refactor: recreate all mocks 2025-01-19 20:51:22 +01:00
pat-s
4c4c01e6f5 refactor: more env var changes and renamings 2025-01-19 16:22:04 +01:00
Patrick Schratz
f262ab5c08 refactor: add CROW_ vars (#21) 2025-01-19 13:01:18 +01:00
Patrick Schratz
38f39eeede refactor: use .crow (#8) 2025-01-18 01:23:51 +01:00
Patrick Schratz
5e0dc2688f refactor: use own import paths (#5) 2025-01-17 00:36:19 +01:00
pat-s
a79c4e3366 test 2025-01-14 18:49:39 +01:00
qwerty287
5d281cd69a Check organization first (#4723) 2025-01-14 09:31:02 +01:00
Levy-Tal
d022bf229a feat(bitbucketdatacenter): Add support for fetching and converting projects to teams (#4663)
Co-authored-by: tal <tal@localhost>
2025-01-08 00:44:31 +01:00
qwerty287
ba68b446c0 Fix addon nil values (#4666) 2025-01-05 13:45:53 +02:00
qwerty287
afa6dee30b Migrate away from goblin (#4624)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
2024-12-30 08:08:53 +02:00
renovate[bot]
828298bcf3 fix(deps): update module github.com/google/go-github/v67 to v68 (#4635)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: qwerty287 <qwerty287@posteo.de>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2024-12-28 09:28:01 +01:00
qwerty287
fdfabe6368 Support Git as only VCS (#4346)
Co-authored-by: Patrick Schratz <patrick.schratz@gmail.com>
2024-12-27 22:49:19 +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
qwerty287
8788794748 Do not log forge tokens (#4551)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
Co-authored-by: Robert Kaussow <xoxys@rknet.org>
2024-12-18 15:13:01 +01:00
Robert Kaussow
7fa474c5c3 Ignore blocked pipelines for badge rendering (#4582) 2024-12-18 08:58:08 +01:00
renovate[bot]
591f256d1e fix(deps): update golang-packages (#4553)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: qwerty287 <qwerty287@posteo.de>
2024-12-12 16:40:36 +01:00
Joan Flotats
21755bef4e Fix BB ambiguous commit status key (#4544)
Co-authored-by: Joan Flotats <joanflotats@bit2me.com>
2024-12-09 17:23:46 +02:00
John Olheiser
9f0611d1a1 fix: addon JSON pointers (#4508)
Signed-off-by: jolheiser <git@jolheiser.com>
2024-12-03 20:58:42 +02:00
renovate[bot]
6c641ae28d fix(deps): update module github.com/google/go-github/v66 to v67 (#4487)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-30 08:56:17 +02:00
Robert Kaussow
359e3af817 Add option to limit the resultset returned by paginate helper (#4475) 2024-11-29 10:39:01 +01:00
Patrick Schratz
6327dcd36f Enforce exact matching for GitLab groups (#4473) 2024-11-28 15:32:21 +01:00
Anbraten
53d6421940 Support github refresh tokens (#3811) 2024-11-22 19:12:43 +01:00
Anbraten
5e2fa8164b Extend approval options (#3348) 2024-11-18 14:49:12 +01:00
6543
4270eca597 gitea: add check if pull_request webhook is missing pull info (#4305) 2024-11-05 14:51:12 +01:00
Patrick Schratz
9a7623359e Delete GitLab webhooks with partial URL match (#4259) 2024-10-27 23:28:19 +01:00
Patrick Schratz
d37c138738 fix: repo/owner parsing for gitlab (#4255)
Co-authored-by: 6543 <6543@obermui.de>
2024-10-26 23:20:15 +02:00
renovate[bot]
254310556a fix(deps): update module github.com/google/go-github/v65 to v66 (#4205)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-07 07:56:59 +03:00
renovate[bot]
bc74af507e fix(deps): update module github.com/google/go-github/v64 to v65 (#4185)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-05 15:46:36 +03:00
renovate[bot]
8e0af15e85 fix(deps): update module github.com/google/go-github/v63 to v64 (#4073)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-01 17:41:02 +02:00
qwerty287
eeec084293 Set refspec for gitlab MR (#4021) 2024-08-10 21:43:50 +03:00
Jener Rasmussen
f20327eb03 [Bitbucket Datacenter] Return empty list instead of null (#4010) 2024-08-06 18:31:50 +02:00
Patrick Schratz
106b6e01c0 Overhaul README (#3995) 2024-08-05 01:27:25 +02:00
Joan Flotats
2d6e1ea015 Fix BB PR pipeline ref (#3985) 2024-08-02 21:42:04 +02:00
Joan Flotats
ec02379b04 Use Bitbucket PR title for pipeline message (#3984) 2024-07-30 20:37:33 +02:00
Joan Flotats
047eb19d42 Change Bitbucket PR hook to point the source branch, commit & ref (#3965)
## Description

This is the first fix for: https://github.com/woodpecker-ci/woodpecker/issues/3932

Change the Pull Request hook parser to return the source commit, branch, and ref instead of the destination. Right now, the workflow pulls the destination configuration and code. It should pull the source configuration and code to verify that the configuration and code work as expected before merging the changes.

In case of the close event, the hook parser returns the destination branch, ref and merge commit. Usually, the contributor automatically deletes the source branch after merging the changes to the destination branch. Using the source values will cause the workflow to fail.

After the changes, Woodpecker will correctly download the workflow from the source branch (Pull Request commit), but it will fail to clone the repository. This issue is related to the commit format returned by the Bitbucket webhook. This inconsistency has already been reported: https://jira.atlassian.com/browse/BCLOUD-21201. The webhook returns a short SHA. The problem is that the `git fetch` command requires the full SHA. 

A workaround for this issue is to use the ref to fetch the code:

```yaml
clone:
  git:
    image: woodpeckerci/plugin-git
    settings:
      ref: ${CI_COMMIT_REF}
```

This is not ideal, because the Pull Request head won't always match the workflow commit, but it solves 80% of the event use cases (e.g. trigger a pull request workflow on change). This workaround won't work when re-running a previous workflow pointing to another commit, it will pull the last commit, not the previous one.

## Solutions

The solution proposed by the community is to retrieve the full SHA from the Bitbucket API using the short one. This solution has drawbacks:
- The Bitbucket API rate limit is 1000 req/h. This solution will reduce the maximum number of workflow runs per hour.
- It requires a braking change in the forges interface because the ´Hook(...)´ method does not have an instance of the HTTP Client. 

We propose to allow the git plugin to fetch the source code from a URL. The Bitbucket returns a link pointing to the commit. 

This proposal only requires a small change to the git plugin:
- Add a new optional parameter (e.g. CommitLink)
- Add a clause to the following conditional: 7ac9615f40/plugin.go (L79C1-L88C3)
```go
if p.Pipeline.CommitLink != "" {...}
```
Git commands:
```shell
$ git fetch --no-tags --depth=1 --filter=tree:0 https://bitbucket.org/workspace/repo/commits/692972aabfec
$ git reset --hard -q 692972aabfec # It works with the short SHA
```
Woodpecker will set CommitLink to a blank string for the other forges, but Bitbuckket will use the one returned by the webhook.
2024-07-23 16:58:38 +02:00
Joan Flotats
3a4ffe951e Add updated, merged and declined events to bb webhook activation (#3963)
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2024-07-23 14:17:58 +02:00
Harri Avellan
1274de2b2d Handle empty repositories in gitea when listing PRs (#3925) 2024-07-18 04:30:45 -07:00
renovate[bot]
8aef8d2af9 fix(deps): update module github.com/google/go-github/v62 to v63 (#3910)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-14 07:58:35 +02:00