Update for the latest gitea.

This commit is contained in:
Tom Alexander
2026-05-02 16:35:31 -04:00
parent 5fb1982930
commit 6e209bdcef
4 changed files with 181 additions and 128 deletions

48
flake.lock generated Normal file
View File

@@ -0,0 +1,48 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1777578337,
"narHash": "sha256-Ad49moKWeXtKBJNy2ebiTQUEgdLyvGmTeykAQ9xM+Z4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "15f4ee454b1dce334612fa6843b3e05cf546efab",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1777691680,
"narHash": "sha256-sdCAzrPAaKu+yo7L2pWddy5PN6U9bO++WEWc1zcr7aQ=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "4757db4358c77c1cbe878fa5990e6ea88d82f6b5",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

55
flake.nix Normal file
View File

@@ -0,0 +1,55 @@
{
description = "webhook-bridge development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
};
outputs =
{
self,
nixpkgs,
rust-overlay,
}:
let
forAllSystems =
func:
builtins.listToAttrs (
map (system: {
name = system;
value = func system;
}) nixpkgs.lib.systems.flakeExposed
);
in
{
devShells = forAllSystems (
system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit system overlays;
};
rustToolchain = pkgs.pkgsBuildHost.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
in
{
default = pkgs.mkShell {
nativeBuildInputs = [
pkgs.pkg-config
rustToolchain
pkgs.openssl
];
buildInputs = with pkgs; [
# sqlx-cli # For sqlx CLI to manage migrations
# sqlite # To access the database (sqlite is bundled into the together_alone binary but this is for manually accessing the db).
];
};
}
);
};
}

View File

@@ -1,115 +1,70 @@
{
"ref": "refs/heads/main",
"before": "69b891b59b1ee026e5bf2e7bee357eead5cbe546",
"after": "5bd07a34780a5b4aaa9b5d0eef22b6e4ac1880a1",
"compare_url": "https://code.fizz.buzz/mirror/org-mode/compare/69b891b59b1ee026e5bf2e7bee357eead5cbe546...5bd07a34780a5b4aaa9b5d0eef22b6e4ac1880a1",
"ref": "refs/heads/kubernetes",
"before": "e767de378a478fa41615cee71a9ba04830520d7d",
"after": "c83b8afd7910f25eb94d90325f3765b5d19900e4",
"compare_url": "https://code.fizz.buzz/talexander/machine_setup/compare/e767de378a478fa41615cee71a9ba04830520d7d...c83b8afd7910f25eb94d90325f3765b5d19900e4",
"commits": [
{
"id": "5bd07a34780a5b4aaa9b5d0eef22b6e4ac1880a1",
"message": "; Fix eaten escaping backslash in the documentation\n\n* lisp/org-keys.el (org-use-speed-commands): Add a missing backslash\nto the documentation string of the custom variable. Also, update\n`setq' to `setopt' and re-indent for clarity.\n",
"url": "https://code.fizz.buzz/mirror/org-mode/commit/5bd07a34780a5b4aaa9b5d0eef22b6e4ac1880a1",
"id": "c83b8afd7910f25eb94d90325f3765b5d19900e4",
"message": "Delete images after 24 hours of being unused.\n",
"url": "https://code.fizz.buzz/talexander/machine_setup/commit/c83b8afd7910f25eb94d90325f3765b5d19900e4",
"author": {
"name": "Rudolf Adamkovič",
"email": "rudolf@adamkovic.org",
"name": "Tom Alexander",
"email": "tom@fizz.buzz",
"username": ""
},
"committer": {
"name": "Rudolf Adamkovič",
"email": "rudolf@adamkovic.org",
"name": "Tom Alexander",
"email": "tom@fizz.buzz",
"username": ""
},
"verification": null,
"timestamp": "2025-08-17T14:12:07+02:00",
"timestamp": "2026-05-02T15:53:35-04:00",
"added": [],
"removed": [],
"modified": [
"lisp/org-keys.el"
]
},
{
"id": "b0f793ff0a31adb520fc5989b0399786663192ea",
"message": "Support arrow keys and mouse wheel in export dispatcher\n\n* lisp/ox.el (org-export--dispatch-action): Translate down/up arrow\nkeys and scroll wheel to C-n/C-p, respectively.\n* etc/ORG-NEWS (Fancy HTML5 export uses ~<time>~ element for\ntimestamps): Document the change from the perspective of the user.\n",
"url": "https://code.fizz.buzz/mirror/org-mode/commit/b0f793ff0a31adb520fc5989b0399786663192ea",
"author": {
"name": "Rudolf Adamkovič",
"email": "rudolf@adamkovic.org",
"username": ""
},
"committer": {
"name": "Rudolf Adamkovič",
"email": "rudolf@adamkovic.org",
"username": ""
},
"verification": null,
"timestamp": "2025-08-11T16:44:59+02:00",
"added": [],
"removed": [],
"modified": [
"etc/ORG-NEWS",
"lisp/ox.el"
]
},
{
"id": "bea0bfc3d6eaddad13a3fb9106ff9e7faa73e970",
"message": "; Fix grammar and improve ol-info documentation\n\n* lisp/ol-info.el:\n(org-info--link-file-node):\n(org-info-description-as-command):\n(org-info-other-documents):\n(org-info-map-html-url):\n(org-info--expand-node-name):\n(org-info-export): Fix grammar, capitalize \"Info\", and improve wording\nof docstrings.\n",
"url": "https://code.fizz.buzz/mirror/org-mode/commit/bea0bfc3d6eaddad13a3fb9106ff9e7faa73e970",
"author": {
"name": "Steven Allen",
"email": "steven@stebalien.com",
"username": ""
},
"committer": {
"name": "Rudolf Adamkovič",
"email": "rudolf@adamkovic.org",
"username": ""
},
"verification": null,
"timestamp": "2025-09-17T17:13:51-07:00",
"added": [],
"removed": [],
"modified": [
"lisp/ol-info.el"
"nix/kubernetes/roles/kubelet/default.nix"
]
}
],
"total_commits": 3,
"total_commits": 1,
"head_commit": {
"id": "5bd07a34780a5b4aaa9b5d0eef22b6e4ac1880a1",
"message": "; Fix eaten escaping backslash in the documentation\n\n* lisp/org-keys.el (org-use-speed-commands): Add a missing backslash\nto the documentation string of the custom variable. Also, update\n`setq' to `setopt' and re-indent for clarity.\n",
"url": "https://code.fizz.buzz/mirror/org-mode/commit/5bd07a34780a5b4aaa9b5d0eef22b6e4ac1880a1",
"id": "c83b8afd7910f25eb94d90325f3765b5d19900e4",
"message": "Delete images after 24 hours of being unused.\n",
"url": "https://code.fizz.buzz/talexander/machine_setup/commit/c83b8afd7910f25eb94d90325f3765b5d19900e4",
"author": {
"name": "Rudolf Adamkovič",
"email": "rudolf@adamkovic.org",
"name": "Tom Alexander",
"email": "tom@fizz.buzz",
"username": ""
},
"committer": {
"name": "Rudolf Adamkovič",
"email": "rudolf@adamkovic.org",
"name": "Tom Alexander",
"email": "tom@fizz.buzz",
"username": ""
},
"verification": null,
"timestamp": "2025-08-17T14:12:07+02:00",
"timestamp": "2026-05-02T15:53:35-04:00",
"added": [],
"removed": [],
"modified": [
"lisp/org-keys.el"
"nix/kubernetes/roles/kubelet/default.nix"
]
},
"repository": {
"id": 24,
"id": 5,
"owner": {
"id": 3,
"login": "mirror",
"id": 1,
"login": "talexander",
"login_name": "",
"source_id": 0,
"full_name": "",
"email": "",
"avatar_url": "https://code.fizz.buzz/avatars/fbe322a89bc0ba531c3f0050e3935f28",
"html_url": "https://code.fizz.buzz/mirror",
"email": "gitea@local.domain",
"avatar_url": "https://code.fizz.buzz/avatars/9d402a89b5a0786f83c1b8c5486fc7ff3d083a54fe20e55c0a776a1932c30289",
"html_url": "https://code.fizz.buzz/talexander",
"language": "",
"is_admin": false,
"last_login": "0001-01-01T00:00:00Z",
"created": "2024-09-30T16:24:55Z",
"created": "2023-07-05T22:03:28Z",
"restricted": false,
"active": false,
"prohibit_login": false,
@@ -120,26 +75,25 @@
"followers_count": 0,
"following_count": 0,
"starred_repos_count": 0,
"username": "mirror"
"username": "talexander"
},
"name": "org-mode",
"full_name": "mirror/org-mode",
"description": "This is a mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git for CI/development purposes because the upstream savannah git repo is flakey.",
"name": "machine_setup",
"full_name": "talexander/machine_setup",
"description": "",
"empty": false,
"private": false,
"fork": false,
"template": false,
"parent": null,
"mirror": true,
"size": 119577,
"mirror": false,
"size": 9940,
"language": "",
"languages_url": "https://code.fizz.buzz/api/v1/repos/mirror/org-mode/languages",
"html_url": "https://code.fizz.buzz/mirror/org-mode",
"url": "https://code.fizz.buzz/api/v1/repos/mirror/org-mode",
"languages_url": "https://code.fizz.buzz/api/v1/repos/talexander/machine_setup/languages",
"html_url": "https://code.fizz.buzz/talexander/machine_setup",
"url": "https://code.fizz.buzz/api/v1/repos/talexander/machine_setup",
"link": "",
"ssh_url": "git@code.fizz.buzz:mirror/org-mode.git",
"clone_url": "https://code.fizz.buzz/mirror/org-mode.git",
"original_url": "https://git.savannah.gnu.org/git/emacs/org-mode.git",
"ssh_url": "git@git.example.com:talexander/machine_setup.git",
"clone_url": "https://code.fizz.buzz/talexander/machine_setup.git",
"original_url": "",
"website": "",
"stars_count": 0,
"forks_count": 0,
@@ -149,54 +103,61 @@
"release_counter": 0,
"default_branch": "main",
"archived": false,
"created_at": "2024-09-30T16:27:01Z",
"updated_at": "2025-09-09T08:46:53Z",
"created_at": "2023-07-05T22:53:26Z",
"updated_at": "2026-05-02T19:53:11Z",
"archived_at": "1970-01-01T00:00:00Z",
"permissions": {
"admin": true,
"push": true,
"pull": true
},
"has_issues": false,
"has_code": true,
"has_issues": true,
"internal_tracker": {
"enable_time_tracker": true,
"allow_only_contributors_to_track_time": true,
"enable_issue_dependencies": true
},
"has_wiki": false,
"has_pull_requests": false,
"has_pull_requests": true,
"has_projects": false,
"projects_mode": "all",
"has_releases": false,
"has_releases": true,
"has_packages": false,
"has_actions": false,
"ignore_whitespace_conflicts": false,
"allow_merge_commits": false,
"allow_rebase": false,
"allow_rebase_explicit": false,
"allow_squash_merge": false,
"allow_merge_commits": true,
"allow_rebase": true,
"allow_rebase_explicit": true,
"allow_squash_merge": true,
"allow_fast_forward_only_merge": false,
"allow_rebase_update": false,
"allow_rebase_update": true,
"allow_manual_merge": false,
"autodetect_manual_merge": false,
"default_delete_branch_after_merge": false,
"default_merge_style": "merge",
"default_allow_maintainer_edit": false,
"avatar_url": "",
"internal": false,
"mirror_interval": "24h0m0s",
"mirror_interval": "",
"object_format_name": "sha1",
"mirror_updated": "2025-09-24T00:51:19Z",
"repo_transfer": null,
"topics": null,
"licenses": null
"mirror_updated": "0001-01-01T00:00:00Z",
"topics": [],
"licenses": []
},
"pusher": {
"id": 3,
"login": "mirror",
"id": 1,
"login": "talexander",
"login_name": "",
"source_id": 0,
"full_name": "",
"email": "mirror@noreply.code.fizz.buzz",
"avatar_url": "https://code.fizz.buzz/avatars/fbe322a89bc0ba531c3f0050e3935f28",
"html_url": "https://code.fizz.buzz/mirror",
"email": "talexander@noreply.code.fizz.buzz",
"avatar_url": "https://code.fizz.buzz/avatars/9d402a89b5a0786f83c1b8c5486fc7ff3d083a54fe20e55c0a776a1932c30289",
"html_url": "https://code.fizz.buzz/talexander",
"language": "",
"is_admin": false,
"last_login": "0001-01-01T00:00:00Z",
"created": "2024-09-30T16:24:55Z",
"created": "2023-07-05T22:03:28Z",
"restricted": false,
"active": false,
"prohibit_login": false,
@@ -207,21 +168,21 @@
"followers_count": 0,
"following_count": 0,
"starred_repos_count": 0,
"username": "mirror"
"username": "talexander"
},
"sender": {
"id": 3,
"login": "mirror",
"id": 1,
"login": "talexander",
"login_name": "",
"source_id": 0,
"full_name": "",
"email": "mirror@noreply.code.fizz.buzz",
"avatar_url": "https://code.fizz.buzz/avatars/fbe322a89bc0ba531c3f0050e3935f28",
"html_url": "https://code.fizz.buzz/mirror",
"email": "talexander@noreply.code.fizz.buzz",
"avatar_url": "https://code.fizz.buzz/avatars/9d402a89b5a0786f83c1b8c5486fc7ff3d083a54fe20e55c0a776a1932c30289",
"html_url": "https://code.fizz.buzz/talexander",
"language": "",
"is_admin": false,
"last_login": "0001-01-01T00:00:00Z",
"created": "2024-09-30T16:24:55Z",
"created": "2023-07-05T22:03:28Z",
"restricted": false,
"active": false,
"prohibit_login": false,
@@ -232,6 +193,6 @@
"followers_count": 0,
"following_count": 0,
"starred_repos_count": 0,
"username": "mirror"
"username": "talexander"
}
}

View File

@@ -6,7 +6,6 @@ use serde_json::Value;
#[allow(dead_code)]
#[derive(Debug, Deserialize)]
#[serde(deny_unknown_fields)]
pub(crate) struct HookPush {
#[serde(rename = "ref")]
pub(crate) ref_field: String,
@@ -23,7 +22,6 @@ pub(crate) struct HookPush {
#[allow(dead_code)]
#[derive(Debug, Deserialize)]
#[serde(deny_unknown_fields)]
pub(crate) struct HookUser {
id: u64,
login: String,
@@ -53,7 +51,6 @@ pub(crate) struct HookUser {
#[allow(dead_code)]
#[derive(Debug, Deserialize)]
#[serde(deny_unknown_fields)]
pub(crate) struct HookRepository {
id: u64,
owner: HookUser,
@@ -64,7 +61,6 @@ pub(crate) struct HookRepository {
private: bool,
fork: bool,
template: bool,
parent: Value, // Was null in test hook
mirror: bool,
size: u64,
language: String,
@@ -113,14 +109,10 @@ pub(crate) struct HookRepository {
mirror_interval: String,
object_format_name: String,
mirror_updated: String, // TODO: parse to datetime
repo_transfer: Value, // Was null in test hook
topics: Value, // Was null in test hook
licenses: Value, // Was null in test hook
}
#[allow(dead_code)]
#[derive(Debug, Deserialize)]
#[serde(deny_unknown_fields)]
pub(crate) struct HookRepositoryPermissions {
admin: bool,
push: bool,
@@ -129,7 +121,6 @@ pub(crate) struct HookRepositoryPermissions {
#[allow(dead_code)]
#[derive(Debug, Deserialize)]
#[serde(deny_unknown_fields)]
pub(crate) struct HookRepositoryInternalTracker {
enable_time_tracker: bool,
allow_only_contributors_to_track_time: bool,
@@ -138,7 +129,6 @@ pub(crate) struct HookRepositoryInternalTracker {
#[allow(dead_code)]
#[derive(Debug, Deserialize)]
#[serde(deny_unknown_fields)]
pub(crate) struct HookCommit {
id: String,
message: String,
@@ -154,7 +144,6 @@ pub(crate) struct HookCommit {
#[allow(dead_code)]
#[derive(Debug, Deserialize)]
#[serde(deny_unknown_fields)]
pub(crate) struct HookGitUser {
name: String,
email: String,