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

Access repos by their IDs #1691

Merged
merged 43 commits into from
Jun 12, 2023
Merged

Conversation

anbraten
Copy link
Member

@anbraten anbraten commented Apr 3, 2023

closes #1295
closes #648

TODO

  • add new routes with :repoID
  • load repo in middleware using :repoID if present
  • update UI routes :owner/:name to :repoID
  • load repos using id in UI
  • add lookup endpoint :owner/:name to :repoID
  • redirect :owner/:name to :repoID in UI
  • use badge with :repoID route in UI
  • update woodpecker-go
  • check cli
  • add migrations / deprecation notes
  • check if support nested repositories (GitLab) #648 got solved directly
  • Test
    • create repo
    • repo pages
    • ui redirects
    • forge status links

@anbraten anbraten added server enhancement improve existing features labels Apr 3, 2023
@anbraten anbraten added this to the 1.0.0 milestone Apr 3, 2023
server/api/user.go Outdated Show resolved Hide resolved
@anbraten anbraten marked this pull request as ready for review May 10, 2023 18:51
@woodpecker-bot
Copy link
Collaborator

woodpecker-bot commented May 10, 2023

Deployment of preview was successful: https://woodpecker-ci-woodpecker-pr-1691.surge.sh

@anbraten anbraten mentioned this pull request May 10, 2023
7 tasks
@lafriks
Copy link
Contributor

lafriks commented May 15, 2023

Maybe they could use different routes: /<owner>/<repo> and /repos/<id>?

@anbraten
Copy link
Member Author

Tried that at the beginning. One issue was that the links of the repo views need to distinguish pointing to the owner-repo or the repo-id route, so we would need to duplicate those views / add some routing helper or always use the repo-id in links again which would result in almost the same way as directly redirecting

@anbraten
Copy link
Member Author

@lafriks I changed some parts and removed some deprecation plannings. Would these changes be fine for you:

  • api routes via id only + lookup endpoint to find repo id
  • badges via id and owner/name combination
  • UI via id, owner/name combination will be redirected

@6543 6543 added the breaking will break existing installations if no manual action happens label May 31, 2023
server/api/repo.go Outdated Show resolved Hide resolved
server/api/repo.go Outdated Show resolved Hide resolved
@6543 6543 enabled auto-merge (squash) June 12, 2023 21:41
@6543 6543 changed the title Access repos by their ids Access repos by their IDs Jun 12, 2023
@6543 6543 merged commit ff01a9f into woodpecker-ci:master Jun 12, 2023
6543 pushed a commit that referenced this pull request Jun 13, 2023
@anbraten anbraten mentioned this pull request Jul 3, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking will break existing installations if no manual action happens enhancement improve existing features refactor delete or replace old code server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Access projects by their id support nested repositories (GitLab)
6 participants