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

Fix two bugs in PR properties #4346

Merged
merged 2 commits into from
Sep 3, 2024
Merged

Fix two bugs in PR properties #4346

merged 2 commits into from
Sep 3, 2024

Conversation

jhrozek
Copy link
Contributor

@jhrozek jhrozek commented Sep 3, 2024

Summary

  • Save the refreshed PR properties, not the lookup ones - I mixed up the properties that we use to look up the PR and those that we actually fetch from the provider. Let's save those that we use to look up the PR to ensure that we have all the data available. In this particular case, we were missing the SHA.
  • GitHub's PR number is not int64, but our protobuf is - Our protobuf defines the PR number as int64, but I didn't notice that the GH API returns the PR number as plain int. It's easiest to upcast the GH value to int64.

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

manually followed the steps in our 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.

I mixed up the properties that we use to look up the PR and those that
we actually fetch from the provider. Let's save those that we use to
look up the PR to ensure that we have all the data available.

In this particular case, we were missing the SHA.
Our protobuf defines the PR number as int64, but I didn't notice that
the GH API returns the PR number as plain int. It's easiest to upcast
the GH value to int64.
@coveralls
Copy link

Coverage Status

coverage: 53.285% (-0.002%) from 53.287%
when pulling bb165e2 on jhrozek:pr_fail
into f6bff2f on stacklok:main.

@jhrozek jhrozek merged commit 823245e into mindersec:main Sep 3, 2024
22 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