Organization-level GitHub configuration for DIRACGrid.
| Path | Purpose |
|---|---|
renovate-config.json |
The shared Renovate preset extended by the DIRACGrid repositories: digest-pinned GitHub Actions, grouped updates, a 7-day release-age cooldown, lock file maintenance, and no CI interpreter bumps |
rulesets/, scripts/rulesets.py |
The branch and tag rulesets every repository should have, and the script that compares them with GitHub or applies them |
profile/ |
The organization profile shown on https://github.com/DIRACGrid |
.github/workflows/ |
Workflows of this repository: pre-commit, Renovate config validation, PR review reminders for the diracx repositories, and the weekly drift check |
CONTRIBUTING.md, SECURITY.md |
Default community health files inherited by repositories without their own |
Add a renovate.json to your repository:
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["local>DIRACGrid/.github//renovate-config"]
}Repositories with maintained release branches also set baseBranchPatterns, e.g. ["$default", "/^rel-/"].
CI validates the preset on every change: a broken preset would break Renovate for the whole organization at once.
Every repository gets the same rulesets, defined in rulesets/:
branches: the protected branches only change through a reviewed pull request with signed commits.fork-only: nobody creates or pushes other branches in the repository, so pull requests come from forks. Renovate is the exception.tagsorno tags: only release managers create tags, or nobody does.required-checks(whererepos.tomllists checks): the named CI jobs must pass before a merge. Only results reported by GitHub Actions count, so a status with the same name posted by a token or another app is ignored. Repository admins can bypass it when merging a pull request ("Merge without waiting for requirements"), and only then: a security advisory's pull requests come from a temporary private fork where GitHub Actions does not run, so their checks never report.
The branches ruleset also asks for the approval of a code owner. This only has an effect in repositories with a CODEOWNERS file; a one-line file such as /.github/ @DIRACGrid/dirac-release-manager makes every workflow change go through a release manager.
What differs per repository (protected branches, whether it has releases, required checks) is in rulesets/repos.toml. The same file names the accounts the templates refer to ([actors]: Renovate, the release managers' team, GitHub Actions, the repository admin role). A template lists an actor by name, or as {"actor": name, "bypass_mode": "pull_request"} for a bypass that only applies when merging a pull request..
scripts/rulesets.py # show what differs on GitHub, for every repository
scripts/rulesets.py diff --repo diracx
scripts/rulesets.py apply --repo diracx --yes # create or update the rulesetsdiff only reads and exits with 1 when something differs. apply needs admin rights on the repository; add --prune to also delete rulesets that are not in the template. Both need the gh CLI. The fork-only ruleset can only be applied where the Renovate app is installed.
To change the rules, edit the template or repos.toml in a pull request, then run apply once it is merged. Organization-level rulesets would replace this script, but they need a paid GitHub plan.
Nothing applies the rulesets automatically, so GitHub can drift from them: an apply that was forgotten after a merge, or a change made by hand on GitHub. The Configuration drift workflow compares the two every Monday. When they differ it opens an issue named Configuration drift, or updates it, and it closes the issue once they agree again.
The workflow has no secret: it uses its own token, which only sees what is public. It does not see the bypass lists of the rulesets: an admin of the repositories runs scripts/rulesets.py diff to compare those too.
- CONTRIBUTING.md — how to contribute to DIRACGrid projects
- Security policy
- Ongoing organization-wide hardening work is tracked in issue #5