Skip to content
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

Added missing 'container' property in metadata on a package version. #2696

Merged

Conversation

thomaslem
Copy link
Contributor

@thomaslem thomaslem commented Apr 8, 2023

Resolves #2683

The class was already there. It was just not being used in PackageVersionMetadata.

From looking at the API it looks like only adding the the property to the model should work.

Example API response with a tag:

"metadata": {
  "package_type": "container",
  "container": {
    "tags": [
      "develop"
    ]
  }
}

Example API response without a tag:

"metadata": {
  "package_type": "container",
  "container": {
    "tags": []
  }
}

Example API response for other package type:

"metadata": {
  "package_type": "npm"
}

Behavior

Before the change?

  • No Container property is present on PackageVersionMetadata

After the change?

  • A Container property is present on PackageVersionMetadata

Other information

  • N/A

Additional info

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Added the appropriate label for the given change

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes (Please add the Type: Breaking change label)
  • No

If Yes, what's the impact:

  • N/A

Pull request type

Please add the corresponding label for change this PR introduces:

  • Bugfix: Type: Bug
  • Feature/model/API additions: Type: Feature
  • Updates to docs or samples: Type: Documentation
  • Dependencies/code cleanup: Type: Maintenance

@thomaslem
Copy link
Contributor Author

It looks like I can't add a label. Would be: Type: Feature

@kfcampbell kfcampbell added the Type: Feature New feature or request label Apr 10, 2023
@thomaslem
Copy link
Contributor Author

thomaslem commented Apr 13, 2023

Looked at the docs and did not see anything related to PackageVersion to update. I build the package locally and tested if I got tags on containers and I did. I don't see any existing unit/integration tests for checking if data is on a PackageVersion response. If you want me to add tests could you point me in the right direction?

Copy link
Member

@kfcampbell kfcampbell left a comment

Choose a reason for hiding this comment

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

Thanks! You're correct that there's not an existing way to test this but I'd rather get this in than hold it up on introducing new testing at the moment.

@kfcampbell kfcampbell merged commit 5292e18 into octokit:main Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[FEAT]: PackageVersion has no tag reported for container type
2 participants