Skip to content

Conversation

@Moueen-Togarvi
Copy link
Contributor

No description provided.

@Moueen-Togarvi
Copy link
Contributor Author

Hi @tim-schilling and team! 👋

I'd like to work on this issue. I've reviewed @raffaellasuardini's library and analyzed how to integrate it into SessionAdmin.

My approach would be:
*Add a new admin action to SessionAdmin

  • Integrate GitHub API to fetch PR/Issue stats
  • Display results for selected session's Djangonauts

Would it be okay if I take this on? Happy to discuss the implementation approach first if needed!

@tim-schilling
Copy link
Member

@Moueen-Togarvi yup, yup that sounds good. If you feel like you're making some complex decisions, let us know and we can discuss. Otherwise I think this should be relatively contained.

@Moueen-Togarvi
Copy link
Contributor Author

Thanks
! I’ll move ahead with the SessionAdmin action and will reach out if I encounter any complex decisions.

Copy link
Member

@tim-schilling tim-schilling left a comment

Choose a reason for hiding this comment

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

Hi @Moueen-Togarvi, it looks like you're using an LLM to work on this. That's fine, but please review the code it's generating (tests are different). I mention this because this is a lot of code for something I'm hoping is a very small feature. I've also got some small comments since the codebase is currently under active development, so things have changed.


class CustomUser(AbstractUser):
pass
github_username = models.CharField(
Copy link
Member

Choose a reason for hiding this comment

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

Please be aware we've added this field to the UserProfile model already.

Comment on lines +82 to +86
def collect_stats_view(self, request, session_id):
"""Handle GitHub stats collection for a session."""
from .views.sessions import collect_stats_view

return collect_stats_view(request, session_id)
Copy link
Member

Choose a reason for hiding this comment

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

I think having this as an actual link rather than an action is probably best. I just introduced this in #619

Comment on lines +207 to +212
except GithubException as e:
logger.error(f"GitHub API error for {owner}/{repo_name}: {e}")
raise
except Exception as e:
logger.error(f"Error collecting PRs from {owner}/{repo_name}: {e}")
raise
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure these provide a lot of benefit since we have sentry configured for the project. If an error is going to occur, we're still going to get the exception.

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.

2 participants