Skip to content

feat: support personal account - #326

Open
kholisrag wants to merge 2 commits into
hostinger:mainfrom
kholisrag:feat/support-personal-accounts
Open

feat: support personal account#326
kholisrag wants to merge 2 commits into
hostinger:mainfrom
kholisrag:feat/support-personal-accounts

Conversation

@kholisrag

@kholisrag kholisrag commented Jul 26, 2026

Copy link
Copy Markdown

Description

Support Personal Accounts for the fireactions
CleanShot_2026-07-27_02 20 25@2x

Related Issue(s)

#299

Checklist

  • I have read the contribution guidelines.
  • I have signed off my commits.
  • I have added necessary documentation (if appropriate).
  • I have added tests to cover my changes.

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 75cec164-df45-462f-bea5-aa3a19edf680

📥 Commits

Reviewing files that changed from the base of the PR and between c7d9a37 and 59132dd.

📒 Files selected for processing (4)
  • docs/help/troubleshooting.md
  • docs/user-guide/github-app.md
  • docs/user-guide/installation.md
  • server/pool.go
🚧 Files skipped from review as they are similar to previous changes (4)
  • docs/user-guide/installation.md
  • docs/help/troubleshooting.md
  • docs/user-guide/github-app.md
  • server/pool.go

📝 Walkthrough

Walkthrough

Changes

Fireactions now supports repository-scoped GitHub Actions runners alongside organization-scoped runners. Configuration validation, installation, runner lifecycle operations, metrics, API output, CLI pool output, tests, and documentation were updated accordingly.

Repository runner scope

Layer / File(s) Summary
Runner scope configuration and validation
server/config.go, server/config_test.go, server/testdata/config2.yaml
Runner configuration supports organization or repository scope, installation IDs, default runner groups, repository validation, and repository-scoped configuration tests.
Repository installation and pool output
install.sh, proto/server/v1/server.proto, server/convert.go, cmd/fireactions/printables.go
The installer accepts repository input, generated configuration preserves the selected scope, and pool API and table output include repository data and effective runner groups.
Scope-specific runner lifecycle
server/pool.go, server/rpc.go
Installation lookup, JIT configuration, runner deletion, and metrics use repository or organization scope as appropriate.
Runner scope and GitHub App documentation
docs/..., mkdocs.yml
Guides document runner scopes, GitHub App permissions, installation IDs, repository cleanup, installation options, metrics labels, and verification steps.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Pool
  participant GitHubAPI
  participant FirecrackerVM
  Pool->>GitHubAPI: Resolve installation ID by runner scope
  Pool->>GitHubAPI: Generate scope-specific JIT runner configuration
  Pool->>FirecrackerVM: Start VM with JIT runner configuration
  FirecrackerVM->>GitHubAPI: Register runner
  FirecrackerVM->>Pool: Exit
  Pool->>GitHubAPI: Remove repository or organization runner
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 30.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: adding support for personal accounts in Fireactions.
Description check ✅ Passed The description includes the required sections and checklist, and it links the related issue.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kholisrag

Copy link
Copy Markdown
Author

Hi @konradasb, please help to review this PR to address self-hosted in personal accounts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/help/troubleshooting.md`:
- Around line 118-124: Update the repository-scoped runner cleanup instructions
near the GH CLI commands to require authentication with administrator access to
the target repository, rather than organization-administrator access. Explicitly
distinguish repository cleanup for organization-owned repositories from
personal-account repositories, where organization-admin authentication does not
apply.
- Around line 129-132: Quote the <OWNER>/<REPOSITORY> placeholder in the REPO
assignment within the fish-shell example so fish treats it as a literal value
rather than redirection syntax; leave the surrounding GH_PAGER setup and API
commands unchanged.

In `@docs/user-guide/github-app.md`:
- Around line 110-114: Update the App-JWT lookup example near the API
authentication instructions to explicitly send the App JWT, either by adding an
Authorization Bearer header to the gh api command or replacing it with an
equivalent curl request. Preserve the repository and installation endpoint and
ensure the example uses the APP_JWT placeholder.

In `@docs/user-guide/installation.md`:
- Around line 416-419: The installation example should make the organization and
repository scopes explicitly mutually exclusive. Update the configuration
snippet around organization and repository so users must select exactly one
option, clearly disabling or separating the alternative rather than leaving
organization active alongside a merely commented repository setting.

In `@server/pool.go`:
- Around line 410-437: Add an installationIDMu sync.Mutex field to Pool and
update getInstallationID to lock around the uncached lookup path, then re-check
p.installationID after acquiring the lock before calling the GitHub installation
APIs. Preserve the existing configured-ID handling, caching, and error behavior
while ensuring concurrent callers perform at most one external lookup.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bf60fa68-7bcc-4197-a7de-42768309658c

📥 Commits

Reviewing files that changed from the base of the PR and between 31de22a and c7d9a37.

⛔ Files ignored due to path filters (1)
  • proto/server/v1/server.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing (18)
  • cmd/fireactions/printables.go
  • docs/help/troubleshooting.md
  • docs/reference/configuration.md
  • docs/user-guide/concepts.md
  • docs/user-guide/first-build.md
  • docs/user-guide/github-app.md
  • docs/user-guide/installation.md
  • docs/user-guide/metrics.md
  • docs/user-guide/overview.md
  • install.sh
  • mkdocs.yml
  • proto/server/v1/server.proto
  • server/config.go
  • server/config_test.go
  • server/convert.go
  • server/pool.go
  • server/rpc.go
  • server/testdata/config2.yaml

Comment thread docs/help/troubleshooting.md
Comment thread docs/help/troubleshooting.md
Comment thread docs/user-guide/github-app.md Outdated
Comment thread docs/user-guide/installation.md Outdated
Comment thread server/pool.go
- Serialise the GitHub App installation lookup with a mutex and a
  double-check, so concurrent createMachine goroutines on a cold pool
  issue one API call instead of one each.
- Document repository-admin (not organization-admin) authentication for
  cleaning up orphaned repository-scoped runners.
- Quote the placeholders in the fish examples; fish parses the unquoted
  angle brackets as an input redirection instead of a value.
- Replace the installation-ID lookup example with one that actually
  authenticates as the App, since that endpoint only accepts an App JWT
  and `gh api` sends the user token by default.
- Make the mutually exclusive organization/repository choice explicit in
  the sample configuration.

Claude-Session: https://claude.ai/code/session_01HP2nunxp5Ko9LbfAdkRYkx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant