Skip to content

Develop#1

Open
gambe94 wants to merge 6 commits into
mainfrom
develop
Open

Develop#1
gambe94 wants to merge 6 commits into
mainfrom
develop

Conversation

@gambe94

@gambe94 gambe94 commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

gambe94 and others added 6 commits February 11, 2026 14:12
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Make the repo a portable shared-actions platform: shrink each
.github/actions/<name>/src to a thin GitHub Actions adapter and move all
reusable logic into packages/core (portable) and a new
packages/github-actions-runtime (the @actions/core-bound runtime).

- Replace the factory with singleton statics on OctokitGitHubService:
  getInstance (cached, throws on token mismatch) / newInstance / resetInstance.
- Move input validation, Raw/Validated types, validated->request run seams,
  and parseRepoRef into packages/core; add shared ActionContext.
- New @gforce/github-actions-runtime: ActionsLogger, readRepoFromEnvironment,
  and the common runGitHubAction loop (read->validate->context->execute->write).
- Reduce each action to index/main/inputReader/outputWriter; drop @octokit/rest
  from action deps; main.ts declares a GitHubActionDefinition and delegates.
- Make CI actionlint strict (no continue-on-error).
- Fix lint-staged dist re-stage pathspec (:(glob) magic pathspec).
- Tests for the singleton, parseRepoRef, validators, run seams, and
  runGitHubAction; rebuild committed dist bundles. npm run all passes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…rge action entrypoints

Decompose the monolithic GitHubService into one service per domain, each its own
singleton sharing a single authenticated client, behind a composing facade; and
collapse each action's index.ts/main.ts into a single guarded entrypoint.

github-service/:
- client/GitHubClient: owns the one Octokit (getInstance/newInstance/resetInstance).
- branch/BranchService + OctokitBranchService and
  pull-request/PullRequestService + OctokitPullRequestService: per-domain ports +
  impls, each with singleton statics that wrap the shared GitHubClient.
- github/GitHubService facade = BranchService & PullRequestService;
  OctokitGitHubService composes the sub-services and delegates, so use cases keep
  depending on one object (unchanged interface = contained blast radius).
- action/ActionsService stub (workflow dispatch) mirrors the git/sfdx stubs.
- client/octokitSupport: shared runOctokit/toGitHubApiError error wrapping.
- Remove the old flat githubService.ts / octokitGitHubService.ts.

actions:
- Merge index.ts + main.ts into a single index.ts (GitHubActionDefinition + run),
  self-invoking only under a require.main === module guard so tests can import it.

Split tests into gitHubClient / octokitBranchService / octokitPullRequestService /
octokitGitHubService (facade) suites; update fakes; rebuild dist bundles. Docs
updated. npm run all passes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Merge each domain's interface + single Octokit implementation into one file,
cutting file sprawl and keeping each domain's port and adapter side by side:
- branch/branchService.ts        (BranchService + OctokitBranchService)
- pull-request/pullRequestService.ts (PullRequestService + OctokitPullRequestService)
- github/gitHubService.ts         (GitHubService facade + OctokitGitHubService)

Behavior, class names, singleton semantics, and the shared GitHubClient are
unchanged. Update index.ts exports, facade imports, and test import paths;
the merged files now carry implementations so jest coverage no longer excludes
them (only the interface-only ActionsService stub stays excluded).

Docs: architecture.md service table reflects port+impl-per-file; authoring guide
gains a copy/paste action index.ts skeleton and an "Extending a GitHub service
domain" template for AI-assisted authoring, plus a least-privilege reminder.

npm run all passes (129 tests, core >=90% coverage); dist bundles rebuilt.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Add required-permissions comments to sync-branches, create-release-pr,
  and get-aws-secret action.yml files
- Clarify in README/CLAUDE.md that get-aws-secret exposes secret fields as
  env vars (reference via ${{ env.FIELD }}, not step outputs) and needs
  id-token: write + contents: read
- Test renderReleaseBody: repeated tokens replaced, unknown tokens left literal

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… TS review)

Install github-actions-docs, requesting/receiving-code-review, and a
TypeScript code-review skill under .agents/skills (symlinked into .claude/skills),
and document them in CLAUDE.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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