-
Notifications
You must be signed in to change notification settings - Fork 213
feat(types): githubactions definition #702
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
Open
nicorikken
wants to merge
2
commits into
package-url:main
Choose a base branch
from
nicorikken:feature/githubactions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| { | ||
| "$schema": "https://packageurl.org/schemas/purl-type-definition.schema-1.0.json", | ||
| "$id": "https://packageurl.org/types/githubactions-definition.json", | ||
| "type": "githubactions", | ||
| "type_name": "GitHub Actions", | ||
| "description": "GitHub Actions including workflows", | ||
| "repository": { | ||
| "use_repository": true, | ||
| "note": "Github.com is the Actions repository." | ||
| }, | ||
| "namespace_definition": { | ||
| "requirement": "required", | ||
| "case_sensitive": false, | ||
| "note": "The namespace must be lowercased." | ||
| }, | ||
| "name_definition": { | ||
| "requirement": "required", | ||
| "case_sensitive": true, | ||
| "note": "The name contains both the repository name and optionally a path within the repository to a certain action or workflow. The first section before the slash is the repository name, this is not case sensitive and should be lowercase. The rest is the path within the repository, which is case sensitive." | ||
| }, | ||
| "note": "GitHub Actions, including workflows.", | ||
| "version_definition": { | ||
| "requirement": "optional", | ||
| "note": "The version is often empty when a commit is not specified and should be the commit in most cases when available." | ||
| }, | ||
| "examples": [ | ||
| "pkg:githubactions/myorg/myaction", | ||
| "pkg:githubactions/myorg/myworkflows/.github/workflows/general.yml", | ||
| "pkg:githubactions/myorg/myaction@v1", | ||
| "pkg:githubactions/myorg/myworkflows/.github/workflows/general.yml@v1" | ||
| ] | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't accurate. The name begins at the last slash. The complicated part with the partial case sensitivity is in the namespace.
There's sort of a precedent for this.
pkg:golangdoesn't really have namespace and name and you get the same kind of thing where the PURL "namespace" is just the part of the Go name before the first slash, but the Go module system enforces case sensitivity even when GitHub (or wherever the package is hosted) allows the files to be retrieved with different case and that avoids having to write custom normalization rules. Some people don't likepkg:golangand want to redo it with everything being in PURL name and nothing in the PURL namespace, in which case every slash would need to be percent encoded.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, looking at Go test cases https://github.com/package-url/purl-spec/blob/505dca561f6d6f1f1f0ebb6b5c36c6aa2516d98d/tests/types/golang-test.json
So in this case most of it would be the name, would have to be url encoded or the base purl format would need to be changed. Leveraging the subpath doesn't seem fitting.