Skip to content

[Feat]: Implement GitHub OAuth Authentication for Contributor Blog Publishing #350

Description

@AgnibhaDebnath

Describe the feature

The current blog publishing workflow successfully creates a branch, commits the generated blog file, and opens a Pull Request against the upstream repository using a contributor-fork-based workflow.

However, the current implementation relies on a hardcoded GitHub username for testing purposes. To support real contributors, the system should authenticate users with GitHub OAuth and use the authenticated user's account when creating branches, commits, and Pull Requests.

Proposed Workflow

  1. User clicks Sign in with GitHub.
  2. User authorizes the application through GitHub OAuth.
  3. The application retrieves the authenticated user's GitHub username and access token.
  4. The publishing workflow uses the user's access token with Octokit.
  5. The system creates or detects the contributor's fork.
  6. A new branch is created in the contributor fork.
  7. The generated blog file is committed to the branch.
  8. A Pull Request is opened against the upstream repository.

Maintainer Configuration Required

  • Create a GitHub OAuth App.
  • Configure the OAuth callback URL.
  • Provide:
    GITHUB_CLIENT_ID
    GITHUB_CLIENT_SECRET
  • Configure production environment variables.

Motivation

The current workflow works for local testing but cannot support independent contributors because the application has no way to determine:

  • The contributor's GitHub username.
  • Which fork belongs to the contributor.
  • Which GitHub credentials should be used when creating branches and Pull Requests.

GitHub OAuth would allow contributors to authenticate with their own GitHub accounts, enabling a fully automated blog submission workflow while distributing GitHub API usage across individual user accounts rather than relying on a shared token.

Alternatives considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions