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 1 commit 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? Unlikely, I guess
  • 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)
    • More test coverage
  • Add GitHub username to user_info_commmand
  • Add alternate authentication via GitHub directly instead of only Discord
  • Update the ephemeral command once the authorization flow has finished, errored, or timed out
  • Assign dev-user, contributor, etc. roles automatically

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 83.55856% with 73 lines in your changes missing coverage. Please review.

Project coverage is 67.06%. Comparing base (cb15726) to head (471be79).

Files with missing lines Patch % Lines
src/discord/cogs/github_commands.py 39.53% 26 Missing ⚠️
src/discord/tasks.py 84.48% 18 Missing ⚠️
src/__main__.py 0.00% 12 Missing ⚠️
src/discord/cogs/moderator_commands.py 16.66% 5 Missing ⚠️
src/common/webapp.py 96.66% 4 Missing ⚠️
src/discord/views.py 25.00% 3 Missing ⚠️
src/common/common.py 85.71% 1 Missing ⚠️
src/discord/bot.py 97.95% 1 Missing ⚠️
src/discord/cogs/base_commands.py 50.00% 1 Missing ⚠️
src/discord/cogs/fun_commands.py 50.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #368       +/-   ##
===========================================
+ Coverage   45.80%   67.06%   +21.26%     
===========================================
  Files          15       21        +6     
  Lines         786     1078      +292     
===========================================
+ Hits          360      723      +363     
+ Misses        426      355       -71     
Files with missing lines Coverage Δ
src/common/crypto.py 100.00% <100.00%> (ø)
src/common/database.py 100.00% <100.00%> (ø)
src/common/globals.py 100.00% <100.00%> (ø)
src/common/sponsors.py 100.00% <100.00%> (ø)
src/common/time.py 100.00% <100.00%> (ø)
src/reddit/bot.py 80.39% <100.00%> (+0.13%) ⬆️
src/common/common.py 92.85% <85.71%> (ø)
src/discord/bot.py 92.39% <97.95%> (+28.92%) ⬆️
src/discord/cogs/base_commands.py 32.00% <50.00%> (ø)
src/discord/cogs/fun_commands.py 42.10% <50.00%> (ø)
... and 7 more

... and 1 file with indirect coverage changes

@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
src/reddit/bot.py Outdated Show resolved Hide resolved
@ReenigneArcher ReenigneArcher force-pushed the feat/github/add-github-integration branch 22 times, most recently from 7bdfdcf to 04e118e Compare November 23, 2024 19:00
@ReenigneArcher ReenigneArcher force-pushed the feat/github/add-github-integration branch 22 times, most recently from 2f13e49 to 4bf189b Compare November 28, 2024 03:37
@ReenigneArcher ReenigneArcher force-pushed the feat/github/add-github-integration branch from 4bf189b to 8647567 Compare December 1, 2024 02:21
src/common/webapp.py Fixed Show fixed Hide fixed
src/common/webapp.py Fixed Show fixed Hide fixed
@ReenigneArcher ReenigneArcher force-pushed the feat/github/add-github-integration branch 4 times, most recently from 1df666a to d0682a7 Compare December 3, 2024 02:54
@ReenigneArcher ReenigneArcher force-pushed the feat/github/add-github-integration branch from d0682a7 to 471be79 Compare December 3, 2024 03:05
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