Skip to content

An API call to sync a non-mirror repository should fail #19299

Closed
@petergardfjall

Description

@petergardfjall

Description

An attempt to mirror-sync (/api/v1/repos/<user>/<repo>/mirror-sync) a repository that isn't a mirror should probably fail with a 400 (Bad Request).

Currently Gitea happily answers 200 (OK) which is an surprising result from a client perspective.

Gitea Version

tip of main

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.25.1

Operating System

Ubuntu 20.04

How are you running Gitea?

Local binary.

Database

PostgreSQL

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions