Skip to content

Edit button doesn't work for versions based on tags #102

@medubelko

Description

@medubelko

Background

We changed the edit button to point to the editable links in GitHub. It used to be:

https://github.com/canonical/snapcraft/blob/8.11.1/docs/index.rst

For projects where versions were based on tags, the user could see the state of the repo at that tag. While it wasn't ideal, because there was no editable interface, at least the user could see the code.

It's since become:

https://github.com/canonical/snapcraft/edit/8.11.1/docs/index.rst

Now the button fails critically because the link is a 404.

Request

Tag-based versions are the most common case for semantically-versioned projects, so we must support them.

  1. Make the edit button detect the project's tags.
  2. When the project has tags, point to a branch (usually hotfix-semver) where the editing interface is available.

This will likely require some manual configuration where the project maps hotfix branch semantics to tags, because there's no way to guarantee that a tag has an available branch associated with it.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions