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

Store properties for artifacts #4345

Merged
merged 3 commits into from
Sep 3, 2024
Merged

Conversation

jhrozek
Copy link
Contributor

@jhrozek jhrozek commented Sep 3, 2024

Summary

  • Add isOrg to the property wrapper signature - The wrapper for artifacts will call a different github provider call depending on whether we need to fetch an property for a user artifact or an organizational artifact. Let's extend the wrapper with a bool to allow that.
  • Add property fetching for artifacts - Adds the properties that will be fetched and stored for artifacts as well as the wrapper fetching it.
  • Use properties for artifacts in the github webhook - Amends the webhook code to refresh artifact properties in the webhook handler and store them for later use.

Fixes #4399

Change Type

  • Bug fix (resolves an issue without affecting existing features)
  • Feature (adds new functionality without breaking changes)
  • Breaking change (may impact existing functionalities or require documentation updates)
  • Documentation (updates or additions to documentation)
  • Refactoring or test improvements (no bug fixes or new functionality)

Testing

manual + make test. Will run the smoke tests

Review Checklist:

  • Reviewed my own code for quality and clarity.
  • Added comments to complex or tricky code sections.
  • Updated any affected documentation.
  • Included tests that validate the fix or feature.
  • Checked that related changes are merged.

The wrapper for artifacts will call a different github provider call
depending on whether we need to fetch an property for a user artifact or
an organizational artifact. Let's extend the wrapper with a bool to
allow that.

Related: mindersec#4339
Adds the properties that will be fetched and stored for artifacts as
well as the wrapper fetching it.

Fixes: mindersec#4339
Amends the webhook code to refresh artifact properties in the webhook
handler and store them for later use.

Fixes: mindersec#4339
@coveralls
Copy link

Coverage Status

coverage: 53.066% (-0.2%) from 53.287%
when pulling 516052c on jhrozek:entity_artifact
into f6bff2f on stacklok:main.

Copy link
Contributor

@JAORMX JAORMX left a comment

Choose a reason for hiding this comment

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

LGTM, let's see if the local running of smoke tests agrees.

@jhrozek
Copy link
Contributor Author

jhrozek commented Sep 3, 2024

LGTM, let's see if the local running of smoke tests agrees.

I got failures in the PR tests because I was stupid and didn't rebase the artifact branch atop the recent PR fixes, but all other tests succeeded.

@jhrozek jhrozek merged commit 5428799 into mindersec:main Sep 3, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants