FAQ

Home > FAQs > The gh-issues blank

What is the gh-issues blank in OpenCues?

Type gh-issues opencues/opencues _ and the _ becomes the repo's open-issue count. The gh-issues blank is small on purpose: it's the shipped, working demonstration of a user-written JavaScript blank running under OpenCues' capability sandbox.

What you type

The keyword is gh-issues, followed by an owner/repo path, then the _. The blank validates the path shape before doing anything (anything that isn't owner/repo gets a visible invalid repo answer), and the bare form clears the command span, leaving a self-contained opencues/opencues: 42 open.

Where the data comes from

The public GitHub API (api.github.com), reading the repository's open-issue count. Results are cached for 5 minutes per repo specifically to avoid GitHub's rate limiting on repeated invocations; a cached answer says so (42 open (cached)). Errors are visible in place (github http 404), never silent.

Why this blank matters: it's the sandbox demo

The implementation is a single blank.js file sitting next to the BLANK.md, and it runs capability-constrained: no filesystem, no process, no DOM, no runtime internals. Everything it can do is declared in frontmatter and handed in through a context object:

  • ctx.fetch, allowed only for api.github.com because the frontmatter declares network: [api.github.com].
  • ctx.storage, a namespaced key-value store declared as storage: gh-issues, used for the cache.
  • ctx.now() for cache-freshness checks.

If you want to ship your own JavaScript blank, this folder is the template to copy: the whole author surface is visible in about fifty lines, and the capability model means a reviewer can read the frontmatter and know the blast radius before reading the code.

Related: Write your own blank · The security model · GitHub repo