github RayLabsHQ/gitea-mirror v3.63.0

2 hours ago

Features

  • Container images (#656, #633, thanks @zwimer). The images a repository publishes to GitHub Packages can now be copied into the container registry of its Gitea or Forgejo destination, under the mirror's owner. Turn on Container images under Mirror Content, or set MIRROR_CONTAINER_IMAGES=true. The copy is exact, every platform and the same digests, so a docker pull from the mirror gets what a pull from ghcr.io gets. Keep latest (3 by default), Always copy (latest by default) and Skip tags decide which tags go over, and later syncs send only the layers the destination does not have yet. Each package is attached to its mirror, and nothing is ever deleted from the destination. It needs a classic GitHub token with read:packages and a destination token with write:package. See Configuration.
  • Pull request comments and reviews (#653, #630, thanks @zwimer). Mirrored pull requests now get their comments, their reviews and their comments on lines of code, like mirrored issues get their comments. A line comment names the file and line with a link to it in the mirror and quotes the last lines of the diff. The new option Copy comments and reviews under Pull Requests is on by default and can be set per organization and repository.
  • Discussions (#654, #632, thanks @zwimer). A repository's GitHub discussions can now be mirrored, off by default: turn on Discussions under Metadata to mirror, or set MIRROR_DISCUSSIONS=true. Each one becomes an issue titled [GH-DISCUSSION #n] and labeled discussion, category: <name> and the discussion's own labels, with its comments and replies, the accepted answer named, and closed when the discussion is. Later syncs read only the discussions that changed. Discussions come from GitHub's GraphQL API, which has its own hourly limit: when it runs out, only discussions wait. They need a GitHub source with a token, or a GitHub App with the Discussions permission.
  • Pull request issues carry the pull request's labels (#650, #631, thanks @zwimer). A mirrored pull request only got pull-request. Its own labels are now set next to it, and labels Gitea does not have yet are created with their GitHub color.
  • Incomplete pull request issues are completed later (#649, #629, thanks @zwimer). When GitHub did not give a pull request's details, its issue kept the short version until the pull request changed. These issues are now tried again on every sync until GitHub answers, and Sync on the repository tries right away. When only the commits or the changed files are missing, the issue gets everything else and that section says it is missing. See Pull requests become issues.
  • Log lines name their repository (#655, #652, thanks @zwimer). Lines written while a repository is mirrored or synced now carry it after the level, as in WARN [bar/foo] [Pull Requests] Could not sync PR #18174 in full, so grep -F 'bar/foo' finds everything about one repository.
  • Log times in your time zone (#648, #646, thanks @zwimer). Set TZ to a time zone name, such as TZ=Europe/Berlin, and log lines show the local time with its offset instead of UTC. Unset, nothing changes. See Logs.

Fixes

  • Every start sent refused requests to Gitea for each repository not yet mirrored (#647). A repair pass before the server started looked up every imported or failed repository in Gitea with the encrypted token, so every lookup was refused and it never repaired anything. The pass is gone: mirroring a repository already checks whether it exists on the destination.

Notes

  • No database migration.
  • Copy comments and reviews is on by default. Where pull requests are mirrored, the next sync of each repository goes through all of its pull requests once to add their comments, at about one GitHub request each. Pull request labels come with the next full pass at no extra cost.
  • Discussions and container images are off by default.
  • GITEA_REPAIR_REQUEST_TIMEOUT_MS and GITEA_REPAIR_PROGRESS_INTERVAL no longer do anything and can be removed.

As always, back up your Gitea before upgrading.

Full changelog: v3.62.2...v3.63.0

Don't miss a new gitea-mirror release

NewReleases is sending notifications on new releases.