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

feat: Improvements in the GitHub integration BE #3962

Merged

Conversation

novakzaballa
Copy link
Contributor

@novakzaballa novakzaballa commented May 15, 2024

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

  • I have run pre-commit to check linting
  • 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

  • Add delete request to GitHub endpoint: /app/installations/{installation_id}
  • Fix flaky unit test
  • Move GitHub API requests to integration/github/client.py file.
  • Obtaining the name and state of the GitHub resource.

How did you test this code?

  • Unit test added and updated

Copy link

vercel bot commented May 15, 2024

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

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2024 9:23pm
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2024 9:23pm
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2024 9:23pm

Copy link
Contributor

github-actions bot commented May 15, 2024

Uffizzi Preview deployment-52170 was deleted.

Copy link

codecov bot commented May 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.28%. Comparing base (fb2191b) to head (3884545).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3962      +/-   ##
==========================================
+ Coverage   96.22%   96.28%   +0.06%     
==========================================
  Files        1142     1143       +1     
  Lines       36775    36992     +217     
==========================================
+ Hits        35386    35618     +232     
+ Misses       1389     1374      -15     

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

}

response = requests.delete(url, headers=headers, timeout=10)
response.raise_for_status()
Copy link
Member

Choose a reason for hiding this comment

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

We're assuming we're returning 500 in case of any errors from Github here?

Do we want to return the error message to the client or at least log it in some way?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, good catch. Done.

Copy link
Member

@khvn26 khvn26 left a comment

Choose a reason for hiding this comment

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

Requested a couple of changes, see comments.

Copy link

flagsmith bot commented May 22, 2024

Flagsmith feature linked: 15
Default Values:

Environment Enabled Value Last Updated (UTC)
Production ❌ Disabled 2024-04-23 03:16:42
Development ❌ Disabled 2024-04-23 03:16:42
feature version ❌ Disabled 2024-04-23 03:16:42
Development ❌ Disabled 2024-05-22 19:30:22

Segment power_users values:

Environment Enabled Value Last Updated (UTC)
Development ✅ Enabled segment v2 2024-05-22 19:30:31

Copy link

flagsmith bot commented May 22, 2024

Flagsmith Feature 15 has been updated:

Environment Enabled Value Last Updated (UTC)
Development ✅ Enabled feature value v2 2024-05-22 19:34:21

Copy link

flagsmith bot commented May 22, 2024

The feature flag 15 was unlinked from the issue/PR

try:
return func(*args, **kwargs)
except requests.RequestException as e:
logger.error(f"{error or default_error} Error: {str(e)}")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
logger.error(f"{error or default_error} Error: {str(e)}")
logger.error(f"{error or default_error} Error: {str(e)}", exc_info=e)

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants