Skip to content

GitHub Projects v2 Roadmap: auto-create content calendar on project_register #4

@aleks1k

Description

@aleks1k

Problem

project_register scaffolds the content repo (campaigns/, social/, etc.) but does NOT create a GitHub Projects v2 board. The content calendar (Roadmap view by Publish Date) was designed as a key feature but is missing.

What's needed

In lib/tools/admin/project-register.tsscaffoldContentRepo() (or a new scaffoldGitHubProject()):

  1. Create a GitHub Projects v2 project via GraphQL API:
mutation {
  createProjectV2(input: { ownerId: $orgId, title: "MarketClaw: <project-name>" }) {
    projectV2 { id url }
  }
}
  1. Add custom field Publish Date (DATE type):
mutation {
  addProjectV2Field(input: { projectId: $projectId, dataType: DATE, name: "Publish Date" }) {
    projectV2Field { id }
  }
}
  1. Link the repo to the project:
mutation {
  linkProjectV2ToRepository(input: { projectId: $projectId, repositoryId: $repoId }) { clientMutationId }
}
  1. Create two views:

    • Board view (by workflow state label) — default
    • Roadmap view (by Publish Date field) — the content calendar
  2. Auto-add all open issues to the project on creation.

Notes

  • Must be best-effort: if GitHub Projects API fails (permissions, rate limit), log warning but don't fail project registration
  • Store projectId and publishDateFieldId in project config for heartbeat use (scheduled publish dispatch)
  • The heartbeat needs publishDateFieldId to read Publish Date when deciding whether to dispatch Publisher
  • GraphQL endpoint: https://api.github.com/graphql

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions