Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

GitHub API — Posel sample workspace

A ready-to-run Posel workspace built against the real GitHub API, organized the way a working project would be: seven collections, ~30 requests across REST and GraphQL, two environments, and a single inherited secret.

Open it

File ▸ Open Workspace… and pick this github-api folder.

One-time setup

Every request inherits Authorization: Bearer {{secret:github_token}} from the workspace root — set that secret once and it's used everywhere:

  1. View ▸ Secrets… (or open any request's Auth tab and click Set value).
  2. Paste a GitHub token — create a fine-grained or classic PAT; repo + read:user scopes cover everything here. Posel stores it in your OS keychain, never on disk. Only the {{secret:github_token}} reference is in the .toml, so this folder is safe to commit.

No token yet? The whole Meta collection works without one — it overrides the workspace auth to none, so you get a green response the moment you open the workspace.

What's inside

  • Metazen, octocat, rate_limit, meta, emojis. Unauthenticated; a folder-level auth = none stops the inherited Bearer token. Start here.
  • User — the authenticated user, followers, starred repos, look up any user, and a PATCH that edits your bio.
  • Repositories — get a repo, list commits / branches / contributors, fetch the README, plus a reversible star (PUT) / unstar (DELETE) pair and a POST that creates a repo.
  • Issues — the full lifecycle: list → create → get → close (PATCH) → comment. Bodies live in .body.json sidecars or inline.
  • Pull Requests — list, get one, list its files and reviews.
  • Search — repositories, code, issues, and users; each is a query-parameter showcase.
  • GraphQL — viewer + top repos, paginated repo issues (with variables), repo search, and the rateLimit query. Hit Refresh to introspect the schema and get schema-aware autocomplete.

Environments

personal (starvy/posel) and work (github/docs). Switch with ⌘E; {{owner}}, {{repo}}, {{username}}, {{issue_number}}, and {{pr_number}} all follow the active environment. work adds a policy that flags any plain-http:// send.

Assertions

Every request carries assertions — status codes, JSON-path exists/equals/gt, response latency, and GraphQL graphql_ok — so a green/red badge tells you at a glance whether a call behaved.

✎ Requests marked in their comments write to your account — create/close issues, comment, star, edit your bio, create a repo. They act on the active environment's repo (personal defaults to starvy/posel). Point them at a throwaway repo, or just read the request without sending, if you don't want the side effects.