refactor: extract install_cron() and Woodpecker OAuth/token setup from bin/disinto into lib/ci-setup.sh #303

Closed
opened 2026-04-06 17:53:32 +00:00 by dev-bot · 1 comment
Collaborator

Context

Part of #284 — incremental extraction of bin/disinto into focused lib/ modules.

What to extract

The CI-related setup functions (~327 lines):

  • install_cron() / install_project_crons() — crontab generation
  • create_woodpecker_oauth() — OAuth2 app creation
  • generate_woodpecker_token() — token generation via OAuth2 flow
  • activate_woodpecker_repo() — repo activation in Woodpecker

How

  1. Create lib/ci-setup.sh with all CI setup functions
  2. Globals expected: FORGE_URL, FORGE_TOKEN, FACTORY_ROOT, PROJECT_NAME. Assert they are set.
  3. In bin/disinto, replace the function bodies with: source "${FACTORY_ROOT}/lib/ci-setup.sh"
  4. smoke-init CI must pass

Affected files

  • bin/disinto (remove CI setup function bodies, add source)
  • lib/ci-setup.sh (new file)

Acceptance criteria

  • lib/ci-setup.sh contains all CI/cron setup functions
  • bin/disinto sources lib/ci-setup.sh
  • disinto init installs cron correctly
  • smoke-init CI step passes
  • ShellCheck passes
## Context Part of #284 — incremental extraction of bin/disinto into focused lib/ modules. ## What to extract The CI-related setup functions (~327 lines): - install_cron() / install_project_crons() — crontab generation - create_woodpecker_oauth() — OAuth2 app creation - generate_woodpecker_token() — token generation via OAuth2 flow - activate_woodpecker_repo() — repo activation in Woodpecker ## How 1. Create lib/ci-setup.sh with all CI setup functions 2. Globals expected: FORGE_URL, FORGE_TOKEN, FACTORY_ROOT, PROJECT_NAME. Assert they are set. 3. In bin/disinto, replace the function bodies with: source "${FACTORY_ROOT}/lib/ci-setup.sh" 4. smoke-init CI must pass ## Affected files - bin/disinto (remove CI setup function bodies, add source) - lib/ci-setup.sh (new file) ## Acceptance criteria - [ ] lib/ci-setup.sh contains all CI/cron setup functions - [ ] bin/disinto sources lib/ci-setup.sh - [ ] disinto init installs cron correctly - [ ] smoke-init CI step passes - [ ] ShellCheck passes
dev-bot added the
backlog
label 2026-04-06 17:53:32 +00:00
dev-qwen self-assigned this 2026-04-06 19:42:05 +00:00
dev-qwen added
in-progress
and removed
backlog
labels 2026-04-06 19:42:06 +00:00
dev-bot added
blocked
and removed
in-progress
labels 2026-04-06 19:44:01 +00:00
Author
Collaborator

Stale in-progress issue detected

Field Value
Detection reason no_active_session_no_open_pr
Timestamp 2026-04-06T19:44:01Z

Status: This issue was labeled in-progress but no active tmux session exists.
Action required: A maintainer should triage this issue.

### Stale in-progress issue detected | Field | Value | |---|---| | Detection reason | `no_active_session_no_open_pr` | | Timestamp | `2026-04-06T19:44:01Z` | **Status:** This issue was labeled `in-progress` but no active tmux session exists. **Action required:** A maintainer should triage this issue.
disinto-admin added
in-progress
and removed
blocked
labels 2026-04-06 20:00:20 +00:00
dev-qwen was unassigned by dev-bot 2026-04-06 20:04:04 +00:00
dev-bot removed the
in-progress
label 2026-04-06 20:04:04 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: disinto-admin/disinto#303
No description provided.