Skip to content

[r5n-0] gitlab support, actions command improvements/fixes#14

Merged
ice-chillios merged 20 commits into
developfrom
r5n-0-sisyphus-polish
Mar 28, 2026
Merged

[r5n-0] gitlab support, actions command improvements/fixes#14
ice-chillios merged 20 commits into
developfrom
r5n-0-sisyphus-polish

Conversation

@deralaxo

@deralaxo deralaxo commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Polish pass on Sisyphus — bug fixes, performance, and cleanup across providers, CI templates, and core commands.

Bug fixes

  • GitLab CI: Replace glab CLI dependency with direct REST API calls, fix JOB-TOKEN auth, filter findPr to open MRs only, fix CI templates for push-based triggers
  • GitHub API: URL-encode owner/repo in API paths
  • Providers: Call ensureAvailable in createGitProvider so auth is always initialized
  • Release orchestrator: Preserve API error details, throw Error instead of Exit (which exits 0) for release failures
  • Commit analyzer: Prevent processing entire git history by setting lastStone.commit to HEAD on init
  • Release PR: Use finally for branch restoration instead of duplicated git checkout calls, handle missing changelog files with nothrow
  • PR analyzer: Replace shell redirect with quiet/nothrow, fall back to git diff-tree for squash merge file detection
  • Roll command: Use newVersion in fallback stone message instead of current version
  • Changelog: Use function replacers in header templates to avoid $ interpolation issues

Performance

  • Commit.fetchFromRange: Batch git calls from 1+2N subprocess invocations to a single git log --name-only call using %x00 delimiters

Features

  • ConfigManager: Add delete method for removing config keys
  • CI templates: Add handle-push job to both GitHub and GitLab workflows for direct pushes to default branch
  • GitHub CI: Skip redundant handle-push on PR merges via web-flow committer check
  • actions init: Add provider-specific setup hints (GitHub workflow permissions, GitLab CI/CD variables)

Refactors

  • Deduplicate URL parsing between GitRemoteParser and providers/index.ts
  • Remove currentRelease cleanup from roll — it's a release marker meant to persist

deralaxo added 10 commits March 24, 2026 17:01
Replace glab CLI dependency with direct GitLab REST API calls in
GitLabProvider. Token resolves from GITLAB_TOKEN, CI_JOB_TOKEN, or glab
auth fallback. Switch CI templates to oven/bun:alpine with git.
- Use push-based triggers instead of merge_request_event (which
  doesn't fire after merge)
- Extract MR IID from CI_COMMIT_DESCRIPTION with basic grep
- Fall back to CI_JOB_TOKEN for git push when GITLAB_TOKEN is not set
- Use correct JOB-TOKEN header for CI_JOB_TOKEN API auth
- Remove redundant variables section (CI vars are auto-inherited)
git add fails when glob patterns like **/CHANGELOG.md match no files.
Add each file individually with nothrow to skip non-existent paths.
GitHub: remind to enable workflow permission for creating PRs.
GitLab: remind to add GITLAB_TOKEN with api + write_repository scopes.
Without state filter, findPr returns merged MRs causing release-pr to
update a closed MR instead of creating a new one.
Exit exits with code 0 (graceful), causing CI pipelines to report
success on failures. Also include response body in GitLab API errors.
The run() wrapper was only extracting stderr from shell errors, dropping
the message from API errors (e.g. GitLab 403 responses).
Provider auth was never initialized when callers forgot to call
ensureAvailable. Move it into the factory so providers are always ready
to use.
@deralaxo
deralaxo force-pushed the r5n-0-sisyphus-polish branch from f9540c5 to c40289c Compare March 26, 2026 12:02
@deralaxo
deralaxo marked this pull request as ready for review March 27, 2026 12:09
@deralaxo
deralaxo requested a review from ice-chillios March 27, 2026 12:09
@ice-chillios
ice-chillios merged commit 32916fb into develop Mar 28, 2026
6 checks passed
@ice-chillios
ice-chillios deleted the r5n-0-sisyphus-polish branch March 28, 2026 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants