Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 29 additions & 7 deletions types/bitbucket-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,42 @@
},
"namespace_definition": {
"requirement": "required",
"note": "The namespace is the user or organization. It is not case sensitive and must be lowercased.",
"native_name": "user or organization",
"is_case_sensitve": false
"note": "The namespace is the user or organization (for Bitbucket Cloud), or the Project Key (for Bitbucket Server/Data Center). It is not case sensitive and must be lowercased.",
"native_name": "user, organization, or project key",
"case_sensitive": false,
"normalization_rules": [
"It is not case sensitive and must be lowercased."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

case_sensitive implies this alright

]
},
"name_definition": {
"requirement": "required",
"note": "The name is the repository name. It is not case sensitive and must be lowercased.",
"native_name": "repository name",
"is_case_sensitve": false
"case_sensitive": false,
"normalization_rules": [
"It is not case sensitive and must be lowercased."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is redundant with case_sensitive, so we would not add this IMHO

]
},
"version_definition": {
"note": "The version is a commit or tag.",
"requirement": "required",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is unnecessarily restricting the usefulness of PURL to require a version here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, @prabhu let's not make versions required

"note": "The version is an immutable commit hash (full or short) or a tag. Branch names (e.g., 'main') should not be used as they are mutable pointers.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't work. Tags are also mutable. Software that works with PURLs cannot reasonably knowing whether a reference is intended to be mutable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. The original wording is simple enough and does not specify too little nor too much IMHO

"native_name": "commit or tag"
},
"subpath_definition": {
"requirement": "optional",
"note": "The subpath is used to specify a subdirectory within the repository, which is essential for monorepos."
},
"qualifiers_definition": [
{
"key": "repository_url",
"requirement": "optional",
"description": "Custom repository URL for self-hosted Bitbucket Server/Data Center instances."
}
],
"examples": [
"pkg:bitbucket/birkenfeld/pygments-main@244fd47e07d1014f0aed9c"
"pkg:bitbucket/birkenfeld/pygments-main@244fd47e07d1014f0aed9c",
"pkg:bitbucket/atlassian/[email protected]",
"pkg:bitbucket/atlassian/[email protected]#packages/analytics",
Comment on lines +46 to +48
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of these examples exist? Where did these new examples come from? The Pygments one might date back to when Bitbucket still supported Mercurial.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, the pygments example should go since the project long moved to GitHub from Mercurial. ... for other examples too, let's use something real

"pkg:bitbucket/proj/internal-repo@abcdef123?repository_url=https://bitbucket.company.com"
]
}
}