Skip to content

Using GitHub

Practical guide for working with GitHub repositories, issues, pull requests, and code through Fp Switchboard.

  • Always provide owner AND repo params (e.g., owner:"octocat", repo:"hello-world")
  • Issues and PRs share the same number sequence per repository
  • File content is returned decoded (not Base64)
  • Use sha parameter when updating files to prevent conflicts
  • Rate limit: 5,000 requests/hour, 30/minute for search

Secret Detection Blocks Writes Critical

Section titled “Secret Detection Blocks Writes ”

All write operations are scanned for secrets like API keys, tokens, and passwords. Operations are blocked if secrets are detected.

Example
WrongCommitting a file containing ghp_abc123... or AWS keys
CorrectRemove all secrets; use environment variables instead

Read-Only vs Full Access Critical

Section titled “Read-Only vs Full Access ”

Users connect with either Read-only (default) or Full Access. Write operations fail in read-only mode. Suggest reconnecting with Full Access if write fails.

Issues and PRs Share Number Sequence Critical

Section titled “Issues and PRs Share Number Sequence ”

Each repo has one number sequence shared between issues and PRs. Issue #5 might actually be a PR.

Always Specify owner/repo Critical

Section titled “Always Specify owner/repo ”

Most GitHub tools require both owner (username or org) and repo name.

Example
Wronggithub_list_issues({repo: "my-app"})
Correctgithub_list_issues({owner: "octocat", repo: "hello-world"})

File Updates Require sha Important

Section titled “File Updates Require sha ”

When updating a file, provide the sha of the current version to prevent conflicts.

Example
Wronggithub_update_file without sha
CorrectFirst github_get_file to get sha, then github_update_file with that sha

Error: 409 Conflict - sha required

  1. github_get_repo to get default branch name
  2. github_create_branch from default branch
  3. github_create_file or github_update_file with changes
  4. github_create_pr from new branch to base branch
  1. github_get_pr to see PR details and description
  2. github_list_pr_files to see changed files
  3. github_get_file for each file to review code
  4. github_create_pr_review with approval or changes requested
  1. github_get_file to get current content and sha
  2. Modify content as needed
  3. github_update_file with new content and sha from step 1
ID TypeFormatExample
Repositoryowner/repooctocat/hello-world
Issue/PR NumberInteger42
SHA40-char hexa1b2c3d4e5f6...
BranchStringmain, feature/login
Gist ID20-char hexaa5a315d61ae9438b18d
  • “List open issues on the switchboard repo”
  • “Create a branch called feature/new-api”
  • “Show the contents of README.md”
  • “Create a pull request from feature/login to main”
  • “Search for issues labeled ‘bug’ in the project”
EndpointLimit
General API5,000/hour
Search API30/minute
Content creation80/minute