- JavaScript 100%
|
All checks were successful
Renovate / renovate (push) Successful in 1m52s
Reviewed-on: #2 |
||
|---|---|---|
| .forgejo/workflows | ||
| .gitignore | ||
| config.js | ||
| README.md | ||
| renovate.json | ||
renovate-config
Central Renovate configuration for the Forgejo instance at http://10.0.2.146:3000.
What this repo does
- Runs Renovate hourly via Forgejo Actions (see
.forgejo/workflows/renovate.yml). - Autodiscovers every repo the
renovate-botuser has write access to. - Opens an onboarding PR in each new repo; merging it activates Renovate for that repo.
One-time setup
- Create bot user in Forgejo:
renovate-bot(emailrenovate-bot@strscrm.io). - Generate access token for that user. Scopes:
read:user,write:repository,write:issue. - Add secret
RENOVATE_TOKENto this repo (Settings → Actions → Secrets) with the token value. - Grant access: add
renovate-botas a member (write) of every org/repo you want managed, or invite per-repo. - Push this repo to Forgejo and enable Actions on it.
- Trigger first run via
workflow_dispatchin the Actions UI.
Files
config.js— global Renovate config (platform, endpoint, autodiscover, onboarding defaults)..forgejo/workflows/renovate.yml— hourly cron workflow that invokes the Renovate container.
Per-repo config
After onboarding, each managed repo gets its own renovate.json. Customize there, not here, unless the change should apply globally.
Pinning
Renovate image pinned to major 39 in the workflow. Bump deliberately after reading release notes.
Auto-merge
config.js enables auto-merge for:
- Any
patch,minor,pin, ordigestupdate - Major bumps of
devDependencies - All
github-actionsupdates (treated as low-risk pinned digests)
Major bumps of runtime dependencies require manual review.
platformAutomerge: true delegates the actual merge to Forgejo's native "merge when checks pass" feature. If a repo has no required status checks configured, the PR is merged immediately. Set up branch protection on the target repos if you want CI to gate auto-merges.
Telegram notifications
Forgejo has built-in Telegram webhook support. Because webhooks are repo- or instance-scoped (not part of this config repo), they have to be configured in the Forgejo UI.
One-time bot setup
- Talk to
@BotFatheron Telegram, create a bot, save the bot token. - Add the bot to the target Telegram chat.
- Send any message in the chat, then hit
https://api.telegram.org/bot<TOKEN>/getUpdatesand copy thechat.idvalue from the response.
Forgejo-side setup
For instance-wide coverage (recommended — fires for every repo, including future ones):
- Site Admin → Integrations → System Webhooks → Add Webhook → Telegram
- Bot Token: the token from BotFather
- Chat ID: the chat id from
getUpdates - Trigger On → Custom Events → check only Pull Request (and sub-filter to "Merged" if the UI exposes it; otherwise all PR events fire and you filter downstream)
- Save
For a single repo, use repo Settings → Webhooks instead.
Limitation: Forgejo webhooks do not filter by PR author, so every merged PR fires — not just Renovate's. Since Renovate is currently the only automated PR source, this is acceptable for now. If the noise grows, run a small filter proxy (e.g. a one-file Go service) that accepts the Forgejo webhook, checks pull_request.user.login == "renovate-bot", and forwards to Telegram only on match.