Skip to content

Creating fork and submit PR to origin automatically when editing file from UI with read-only permission #9017

Open
@divansantana

Description

@divansantana

versions

  • Gitea version : 2.16.5
  • Git version: 1.10
  • Operating system: linux
  • Database (use [x]):
    • MySQL
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes

Description

I'm got a site with docs as code using a static site
generator.

It gives the end user an edit button.

The edit button takes them to the repo at this URL:

https://gitea.example.com/org/project/_edit/master/docs/index.md

This opens and works fine, if the user has write access to the repo.

If the user does have write access to the repo all is well and one can
edit the doc and save to master.

If one has read access but not write to repo this however fails with a 404.

On GitLab/GitHub, instead the page renders and in the background a
fork is automatically created and a PR is submitted to origin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/featureCompletely new functionality. Can only be merged if feature freeze is not active.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions