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: Solve API GitHub integration issues #4502

Merged
merged 5 commits into from
Aug 19, 2024

Conversation

novakzaballa
Copy link
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • I have added information to docs/ if required so people know about the feature!
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Changes

Solve #4500, and #4501

How did you test this code?

Unit test added

@novakzaballa novakzaballa requested a review from a team as a code owner August 14, 2024 22:02
@novakzaballa novakzaballa requested review from zachaysan and removed request for a team August 14, 2024 22:02
Copy link

vercel bot commented Aug 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview Aug 19, 2024 3:57pm
flagsmith-frontend-preview ⬜️ Ignored (Inspect) Visit Preview Aug 19, 2024 3:57pm
flagsmith-frontend-staging ⬜️ Ignored (Inspect) Visit Preview Aug 19, 2024 3:57pm

@github-actions github-actions bot added api Issue related to the REST API fix labels Aug 14, 2024
Copy link
Contributor

github-actions bot commented Aug 14, 2024

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-e2e:pr-4502 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api-test:pr-4502 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-frontend:pr-4502 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-api:pr-4502 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-4502 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-4502 Finished ✅ Results

Copy link
Contributor

github-actions bot commented Aug 14, 2024

Uffizzi Preview deployment-55277 was deleted.

@github-actions github-actions bot added fix and removed fix labels Aug 15, 2024
Copy link

codecov bot commented Aug 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.91%. Comparing base (f9cc1b0) to head (e57a7c4).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4502      +/-   ##
==========================================
- Coverage   96.92%   96.91%   -0.01%     
==========================================
  Files        1178     1178              
  Lines       39474    39515      +41     
==========================================
+ Hits        38260    38296      +36     
- Misses       1214     1219       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot added fix and removed fix labels Aug 15, 2024
Copy link
Contributor

@zachaysan zachaysan left a comment

Choose a reason for hiding this comment

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

Overall looks good. Just a few small comments that you're free to ignore if you want.

Comment on lines +83 to +86
if self.type == "GITHUB_PR":
pattern = r"github.com/([^/]+)/([^/]+)/pull/\d+$"
elif self.type == "GITHUB_ISSUE":
pattern = r"github.com/([^/]+)/([^/]+)/issues/\d+$"
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe to future proof this it could be helpful to add an else keyword and raise an exception.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think it's necessary to implement this, because I am already validating it before creating the feature external resource here:

Comment on lines 588 to 589
github_configuration: GithubConfiguration,
github_repository: GithubRepository,
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit:

Suggested change
github_configuration: GithubConfiguration,
github_repository: GithubRepository,
github_configuration: GitHubConfiguration,
github_repository: GitHubRepository,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can't change this because it is the model's name.

class GithubConfiguration(SoftDeleteExportableModel):

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok I guess it's too much work to change the name of the model?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I decided to rename the model, thanks for the suggestion. I will merge this PR afterward.

@novakzaballa novakzaballa requested a review from zachaysan August 16, 2024 16:35
@github-actions github-actions bot added fix and removed fix labels Aug 19, 2024
@novakzaballa novakzaballa added this pull request to the merge queue Aug 19, 2024
Merged via the queue into main with commit 19bc58e Aug 19, 2024
35 checks passed
@novakzaballa novakzaballa deleted the fix/solve-api-github-integration-issues branch August 19, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue related to the REST API fix
Projects
None yet
2 participants