github - speced/respec GitHub Wiki

github

Type: string | GithubOptions Default: undefined

Associates the specification with a GitHub repository. Adds a "Feedback:" section to the document header with links to file issues, view open issues, and see pull requests. Also auto-sets edDraftURI and issueBase.

Basic usage

var respecConfig = {
  github: "w3c/payment-request",
};
var respecConfig = {
  github: "https://github.com/w3c/payment-request",
};

With options

var respecConfig = {
  github: {
    repoURL: "https://github.com/w3c/payment-request",
    branch: "main",
  },
};
var respecConfig = {
  github: {
    repoURL: "https://github.com/w3c/aria",
    pullsURL: "https://github.com/w3c/aria/pulls?q=is%3Apr+is%3Aopen+label%3Acore-aam",
    commitHistoryURL: "https://github.com/w3c/aria/commits/main/core-aam/",
  },
};

Options

Option Type Default Description
repoURL string Full URL to the GitHub repository
branch string "gh-pages" Branch used for GitHub Pages
pullsURL string auto Filtered pull requests URL (useful for monorepos)
commitHistoryURL string auto Filtered commits URL (useful for monorepos)

Notes

  • Setting github auto-populates edDraftURI — no need to set it separately
  • For monorepos where multiple specs share one repository, use pullsURL and commitHistoryURL to filter to your spec's files