Skip to content

feat: add publisher tracking for GitHub issues (#650)#870

Draft
DarshanCode2005 wants to merge 5 commits intoNixOS:mainfrom
DarshanCode2005:username-issue-publish
Draft

feat: add publisher tracking for GitHub issues (#650)#870
DarshanCode2005 wants to merge 5 commits intoNixOS:mainfrom
DarshanCode2005:username-issue-publish

Conversation

@DarshanCode2005
Copy link
Copy Markdown
Contributor

Summary

Implements publisher tracking for GitHub issues in the security tracker.

When an issue is published from the UI, the logged-in user's GitHub username is now stored and displayed. The publisher information is also appended to the body of the GitHub issue for better traceability.

Changes

  • Added publisher field to NixpkgsIssue model
  • Created migration 0071_nixpkgsissue_publisher
  • Capture the logged-in user when publishing an issue
  • Append Published by @username to the GitHub issue body
  • Display publisher and GitHub profile link in the UI
  • Added tests to verify publisher tracking and display

Related Issue

Closes #650

@fricklerhandwerk
Copy link
Copy Markdown
Collaborator

Sorry for the delay, working off the backlog now...

Primarily: needs tests. (Maybe it makes more sense to fix the FIXMEs around mocking the GitHub API first, in a separate PR? The messy hack there is proliferating and I'd prefer stopping that before adding more stuff. Not sure, it requires much more care than adding a test with the existing pattern. If you don't have a clear idea after 20min, just use the existing one.)

I'm not convinced of the implementation approach. We do store the pghistory event for state change already, so we may as well grab the user from there. Then the implementation would boil down to tacking on a query in the issue views' get_queryset. Bonus points for reusing the activity log query itself (likely needs refactoring though, never mind if it's not an easy change.) And for the GH issue body rendering, grab the current user as you already do.

@fricklerhandwerk fricklerhandwerk marked this pull request as draft March 20, 2026 09:56
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.

Add the GitHub username of the user that publishes an issue in issues

2 participants