[PR #64] [MERGED] Transfer a resource to another site #787

Closed
opened 2025-11-13 12:10:53 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fosrl/pangolin/pull/64
Author: @j4n-e4t
Created: 1/16/2025
Status: Merged
Merged: 2/2/2025
Merged by: @oschwartz10612

Base: devHead: j4n-e4t/transfer-resource-to-new-site


📝 Commits (4)

  • a039168 add ability to transfer a resource to another site
  • 962c5fb Merge branch 'dev' into transfer-resource-to-new-site
  • b5420a4 Clean up and add target manipulation
  • 53660a1 minor changes to verbiage and id value

📊 Changes

11 files changed (+427 additions, -70 deletions)

View changed files

📝 server/routers/external.ts (+7 -0)
📝 server/routers/gerbil/getConfig.ts (+2 -14)
📝 server/routers/newt/targets.ts (+4 -4)
📝 server/routers/resource/deleteResource.ts (+2 -17)
📝 server/routers/resource/index.ts (+1 -0)
server/routers/resource/transferResource.ts (+192 -0)
📝 server/routers/target/createTarget.ts (+1 -1)
📝 server/routers/target/deleteTarget.ts (+2 -17)
📝 server/routers/target/helpers.ts (+18 -0)
📝 server/routers/target/updateTarget.ts (+1 -1)
📝 src/app/[orgId]/settings/resources/[resourceId]/general/page.tsx (+197 -16)

📄 Description

Community Contribution License Agreement

By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.

Of course.

Description

I've added the functionality to move a resource to a new site as mentioned in the roadmap.

Changes made:

  • New Card on settings/resources/[id]/general in the Next app
  • New API route in server/routers/resource/transferResource.ts to handle the transfer server-side

How to test?

  1. clone the project and checkout the j4n-e4t/transfer-resource-to-new-site branch
  2. run the project according to the docs
  3. create two sites and a resource
  4. Edit the resource and to to /general

🔄 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/fosrl/pangolin/pull/64 **Author:** [@j4n-e4t](https://github.com/j4n-e4t) **Created:** 1/16/2025 **Status:** ✅ Merged **Merged:** 2/2/2025 **Merged by:** [@oschwartz10612](https://github.com/oschwartz10612) **Base:** `dev` ← **Head:** `j4n-e4t/transfer-resource-to-new-site` --- ### 📝 Commits (4) - [`a039168`](https://github.com/fosrl/pangolin/commit/a03916821728b72de88e332fdff4b6343049485c) add ability to transfer a resource to another site - [`962c5fb`](https://github.com/fosrl/pangolin/commit/962c5fb8868f63f4e8573b525bc912f0743708ba) Merge branch 'dev' into transfer-resource-to-new-site - [`b5420a4`](https://github.com/fosrl/pangolin/commit/b5420a40ab401bf9b67c9e10129ce449a1193c67) Clean up and add target manipulation - [`53660a1`](https://github.com/fosrl/pangolin/commit/53660a163c85d53e20c3cc0915205d36cb7b00d0) minor changes to verbiage and id value ### 📊 Changes **11 files changed** (+427 additions, -70 deletions) <details> <summary>View changed files</summary> 📝 `server/routers/external.ts` (+7 -0) 📝 `server/routers/gerbil/getConfig.ts` (+2 -14) 📝 `server/routers/newt/targets.ts` (+4 -4) 📝 `server/routers/resource/deleteResource.ts` (+2 -17) 📝 `server/routers/resource/index.ts` (+1 -0) ➕ `server/routers/resource/transferResource.ts` (+192 -0) 📝 `server/routers/target/createTarget.ts` (+1 -1) 📝 `server/routers/target/deleteTarget.ts` (+2 -17) 📝 `server/routers/target/helpers.ts` (+18 -0) 📝 `server/routers/target/updateTarget.ts` (+1 -1) 📝 `src/app/[orgId]/settings/resources/[resourceId]/general/page.tsx` (+197 -16) </details> ### 📄 Description ## Community Contribution License Agreement By creating this pull request, I grant the project maintainers an unlimited, perpetual license to use, modify, and redistribute these contributions under any terms they choose, including both the AGPLv3 and the Fossorial Commercial license terms. I represent that I have the right to grant this license for all contributed content. ✅ Of course. ## Description I've added the functionality to move a resource to a new site as mentioned in the [roadmap](https://docs.fossorial.io/roadmap). Changes made: * New Card on `settings/resources/[id]/general` in the Next app * New API route in `server/routers/resource/transferResource.ts` to handle the transfer server-side ## How to test? 1. clone the project and checkout the `j4n-e4t/transfer-resource-to-new-site` branch 2. run the project according to the [docs](https://docs.fossorial.io/development) 3. create two sites and a resource 4. `Edit` the resource and to to `/general` --- <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-13 12:10:53 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#787