Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Hierarchial Patch URLs

Open
#6 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
api, backend

Research direction

Start with the Patch model's id field and the existing patch URL handling described in the issue. Define how a project-scoped identifier should coexist with legacy URLs, then verify that project-specific URLs resolve correctly while the old references remain supported.

Written by the indexing model from the issue text.

Description

enhancement

From @stephenfin on June 29, 2015 21:24

Overview

At the moment, patchwork uses the Patch model id field for referencing patches via URL. This means if multiple projects exist then patch IDs won't be sequential (some IDs will be allocated to patches of one project, others to another). This works, but it doesn't allow for easy programmatic scanning of projects and doesn't translate well to REST APIs. Instead, IDs should be unique to the project. We can do this by adding a second ID field and allowing users to reference this. This will lead to a transformation like so:

/10234 --> /project_a/1000
/10245 --> /project_b/567
/10246 --> /project_c/8236
/10247 --> /project_a/1001

We should also keep the old way of referencing such resources but with an eye on deprecating these in the future.

Dependencies

N/A

Additional Work Items

N/A

Alternatives

We continue to use the patch URLs we use currently.

Useful resources

N/A

Copied from original issue: stephenfin/patchwork#21

Dominant language
Python
Stars
317
Forks
91
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from getpatchwork/patchwork

All issues in getpatchwork/patchwork

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.