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(github): add github integration #368

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ReenigneArcher
Copy link
Member

@ReenigneArcher ReenigneArcher commented Nov 9, 2024

Description

This PR aims to more tightly integrate GitHub with our discord bot.

Main features to add

  1. Assign roles based on GitHub sponsorship status
  2. Assign dev-user role based on GitHub account... (whether it exists, has contributed, or something along those lines)

TODO:

  • Persist OAuth status?
  • Periodically check GitHub user's for sponsor status, and add user to sponsor roles, or revoke accordingly
  • Callback to public URL
  • Possible to hide disocrd bot IP?
  • Improved SSL certs
  • Update dockerfile
  • Update readme/docs
  • Add/update unit tests
    • Unit tests hang on unix due to async nonsense
    • Unit tests do not post comment even though tests pass (on Windows)

Screenshot

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Copy link

codecov bot commented Nov 9, 2024

Codecov Report

Attention: Patch coverage is 32.96703% with 122 lines in your changes missing coverage. Please review.

Project coverage is 44.90%. Comparing base (362aef2) to head (715d5ab).

Files with missing lines Patch % Lines
src/common/webapp.py 0.00% 56 Missing ⚠️
src/common/crypto.py 0.00% 34 Missing ⚠️
src/discord/cogs/github_commands.py 43.58% 22 Missing ⚠️
src/__main__.py 0.00% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #368      +/-   ##
==========================================
- Coverage   46.81%   44.90%   -1.92%     
==========================================
  Files          15       19       +4     
  Lines         786      922     +136     
==========================================
+ Hits          368      414      +46     
- Misses        418      508      +90     
Files with missing lines Coverage Δ
src/common/common.py 96.00% <ø> (ø)
src/common/database.py 100.00% <100.00%> (ø)
src/common/globals.py 100.00% <100.00%> (ø)
src/discord/bot.py 80.64% <100.00%> (+11.41%) ⬆️
src/discord/cogs/base_commands.py 32.00% <100.00%> (ø)
src/discord/cogs/fun_commands.py 42.10% <100.00%> (ø)
src/discord/cogs/moderator_commands.py 29.68% <100.00%> (ø)
src/discord/cogs/support_commands.py 83.13% <100.00%> (ø)
src/discord/tasks.py 11.11% <100.00%> (ø)
src/discord/views.py 33.33% <100.00%> (ø)
... and 5 more
---- 🚨 Try these New Features:

@ReenigneArcher ReenigneArcher force-pushed the feat/github/add-github-integration branch 2 times, most recently from 14cb7f9 to 69a160c Compare November 10, 2024 05:37
@ReenigneArcher ReenigneArcher force-pushed the feat/github/add-github-integration branch 4 times, most recently from d539168 to 0480459 Compare November 19, 2024 04:43
globals.DISCORD_BOT.send_message_to_channel(
channel_id=os.getenv("DISCORD_REDDIT_CHANNEL_ID"),
embeds=[embed],
), globals.DISCORD_BOT.loop)
Copy link
Member Author

Choose a reason for hiding this comment

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

@ReenigneArcher ReenigneArcher force-pushed the feat/github/add-github-integration branch 10 times, most recently from b3225f9 to 7e18524 Compare November 20, 2024 01:56
@ReenigneArcher ReenigneArcher force-pushed the feat/github/add-github-integration branch from 7e18524 to 3991e77 Compare November 20, 2024 02:48
Copy link

sonarcloud bot commented Nov 21, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
2 New issues
3 Security Hotspots
2 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

Receive and process external webhooks
1 participant