Skip to content

push mirror sync_on_commit api call parameter not working #22990

Closed
@blob42

Description

@blob42

Description

I am trying to add a push mirror using the push_mirrors api endpoint but the sync_on_commit parameter is not taken into account. The reply returns sync_on_commit: false every time.

However manually enabling the option the UI works ! I tested by manually adding a push mirror on the UI then making a commit+push which produces a sync. The problem is only on the Gitea API's side with the json field parameter.

I am sure there is no issue with my query, it's clean json data, the push mirror api endpoint adds the mirrors that I specify but does not want to enable the sync_on_commit parameter. The rest works including the interval one.

I tried dev run mode and debug logging there is no error. The query runs fine.

I don't have time to dig into the code but it looks like the endpoint simply does not handle the json field sync_on_commit

Gitea Version

1.18.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

there is no error in the log just a successful API post query to push mirrors

Screenshots

No response

Git Version

2.36.4, Wire Protocol Version 2 Enabled

Operating System

Linux Debian

How are you running Gitea?

Self hosted at https://git.blob42.xyz

Database

SQLite

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions