[PR #2408] [MERGED] Make URL scheme unambiguous #16392

Closed
opened 2025-11-02 12:09:33 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/2408
Author: @ethantkoenig
Created: 8/27/2017
Status: Merged
Merged: 10/30/2017
Merged by: @lunny

Base: masterHead: fix/ambiguous_url


📝 Commits (3)

  • 6780594 Make URL scheme unambiguous
  • 7794a97 Fix redirects to new URL scheme, and update template
  • 865dd24 Fix branches/_new endpoints, and update integration test

📊 Changes

20 files changed (+279 additions, -144 deletions)

View changed files

📝 integrations/editor_test.go (+2 -2)
📝 integrations/links_test.go (+17 -1)
📝 integrations/repo_branch_test.go (+52 -52)
📝 integrations/repo_commits_test.go (+3 -3)
📝 models/webhook_slack.go (+15 -6)
📝 modules/context/repo.go (+99 -21)
📝 routers/api/v1/api.go (+1 -1)
📝 routers/repo/branch.go (+5 -5)
📝 routers/repo/commit.go (+1 -1)
📝 routers/repo/editor.go (+9 -9)
📝 routers/repo/repo.go (+15 -0)
📝 routers/repo/view.go (+2 -2)
📝 routers/routes/routes.go (+42 -25)
📝 templates/repo/branch_dropdown.tmpl (+2 -2)
📝 templates/repo/commits_table.tmpl (+4 -4)
📝 templates/repo/editor/edit.tmpl (+1 -1)
📝 templates/repo/home.tmpl (+1 -1)
📝 templates/repo/issue/list.tmpl (+1 -1)
📝 templates/repo/release/list.tmpl (+5 -5)
📝 templates/repo/view_file.tmpl (+2 -2)

📄 Description

Fixes #2364. Modifies URL schemes to remove ambiguity (see https://github.com/go-gitea/gitea/issues/2364#issuecomment-325174937)

The GET /:owner/:repo/src/* endpoint becomes three endpoints:

  • GET /:owner/:repo/src/branch/*
  • GET /:owner/:repo/src/tag/*
  • GET /:owner/:repo/src/commit/*

Similarly for GET /:owner/:repo/raw/* and GET /:owner/:repo/commits/*. The old routes are redirected to the new routes to maintain backward compatibility.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/2408 **Author:** [@ethantkoenig](https://github.com/ethantkoenig) **Created:** 8/27/2017 **Status:** ✅ Merged **Merged:** 10/30/2017 **Merged by:** [@lunny](https://github.com/lunny) **Base:** `master` ← **Head:** `fix/ambiguous_url` --- ### 📝 Commits (3) - [`6780594`](https://github.com/go-gitea/gitea/commit/6780594a17ec789992b3cd8edd65536045a29a52) Make URL scheme unambiguous - [`7794a97`](https://github.com/go-gitea/gitea/commit/7794a9740ec87930f923c9b11d92037158b1cfda) Fix redirects to new URL scheme, and update template - [`865dd24`](https://github.com/go-gitea/gitea/commit/865dd24d34ff0de7f192209ee8fc884f87fbee2b) Fix branches/_new endpoints, and update integration test ### 📊 Changes **20 files changed** (+279 additions, -144 deletions) <details> <summary>View changed files</summary> 📝 `integrations/editor_test.go` (+2 -2) 📝 `integrations/links_test.go` (+17 -1) 📝 `integrations/repo_branch_test.go` (+52 -52) 📝 `integrations/repo_commits_test.go` (+3 -3) 📝 `models/webhook_slack.go` (+15 -6) 📝 `modules/context/repo.go` (+99 -21) 📝 `routers/api/v1/api.go` (+1 -1) 📝 `routers/repo/branch.go` (+5 -5) 📝 `routers/repo/commit.go` (+1 -1) 📝 `routers/repo/editor.go` (+9 -9) 📝 `routers/repo/repo.go` (+15 -0) 📝 `routers/repo/view.go` (+2 -2) 📝 `routers/routes/routes.go` (+42 -25) 📝 `templates/repo/branch_dropdown.tmpl` (+2 -2) 📝 `templates/repo/commits_table.tmpl` (+4 -4) 📝 `templates/repo/editor/edit.tmpl` (+1 -1) 📝 `templates/repo/home.tmpl` (+1 -1) 📝 `templates/repo/issue/list.tmpl` (+1 -1) 📝 `templates/repo/release/list.tmpl` (+5 -5) 📝 `templates/repo/view_file.tmpl` (+2 -2) </details> ### 📄 Description Fixes #2364. Modifies URL schemes to remove ambiguity (see https://github.com/go-gitea/gitea/issues/2364#issuecomment-325174937) The `GET /:owner/:repo/src/*` endpoint becomes three endpoints: - `GET /:owner/:repo/src/branch/*` - `GET /:owner/:repo/src/tag/*` - `GET /:owner/:repo/src/commit/*` Similarly for `GET /:owner/:repo/raw/*` and `GET /:owner/:repo/commits/*`. The old routes are redirected to the new routes to maintain backward compatibility. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 12:09:33 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#16392