Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repo should be fetched by OWNER+NAME #1

Open
4 tasks done
langecode opened this issue Apr 25, 2023 · 0 comments
Open
4 tasks done

Repo should be fetched by OWNER+NAME #1

langecode opened this issue Apr 25, 2023 · 0 comments

Comments

@langecode
Copy link
Member

langecode commented Apr 25, 2023

Clear and concise description of the problem

Currently repository is fetched by concatenating "owner" and "name" from the path of the API and then searching for this as the name of the repository.

This means that if the "full name" of the repo does not follow a convention of concatenating "owner" + "name" then repository cannot be found. Effectively the "fullname" property could as well be removed. I.e., the links are rendered from "owner" and "name" which effectively is the semantic key of repo.

https://github.com/neticdk/woodpecker/blob/main/server/router/middleware/session/repo.go#L60

Suggested solution

Store should be extended with a function to fetch repository by owner+name instead of the concatenated string.

https://github.com/neticdk/woodpecker/blob/main/server/store/store.go#L54

Alternative

No response

Additional context

No response

Validations

  • Checked that the feature isn't part of the next version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]
  • Read the Contributing Guidelines.
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant