1 Commits

Author SHA1 Message Date
Tom Alexander
f77b9a0d2c Remove internal_tracker.
Some checks are pending
clippy Build clippy has started
rust-test Build rust-test has started
format Build format has started
semver Build semver has succeeded
2025-09-23 21:06:37 -04:00
11 changed files with 160 additions and 299 deletions

View File

@@ -63,7 +63,7 @@ spec:
- name: url - name: url
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision - name: revision
value: f914437a46978b95f325f68d791dcf1a35738f60 value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo - name: pathInRepo
value: task/gitea-set-status/0.1/gitea-set-status.yaml value: task/gitea-set-status/0.1/gitea-set-status.yaml
params: params:
@@ -88,7 +88,7 @@ spec:
- name: url - name: url
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision - name: revision
value: f914437a46978b95f325f68d791dcf1a35738f60 value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo - name: pathInRepo
value: task/git-clone/0.9/git-clone.yaml value: task/git-clone/0.9/git-clone.yaml
workspaces: workspaces:
@@ -181,7 +181,7 @@ spec:
- name: url - name: url
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision - name: revision
value: f914437a46978b95f325f68d791dcf1a35738f60 value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo - name: pathInRepo
value: task/gitea-set-status/0.1/gitea-set-status.yaml value: task/gitea-set-status/0.1/gitea-set-status.yaml
params: params:
@@ -210,7 +210,7 @@ spec:
- name: url - name: url
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision - name: revision
value: f914437a46978b95f325f68d791dcf1a35738f60 value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo - name: pathInRepo
value: task/gitea-set-status/0.1/gitea-set-status.yaml value: task/gitea-set-status/0.1/gitea-set-status.yaml
params: params:

View File

@@ -31,7 +31,7 @@ spec:
- name: url - name: url
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision - name: revision
value: f914437a46978b95f325f68d791dcf1a35738f60 value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo - name: pathInRepo
value: task/gitea-set-status/0.1/gitea-set-status.yaml value: task/gitea-set-status/0.1/gitea-set-status.yaml
params: params:
@@ -56,7 +56,7 @@ spec:
- name: url - name: url
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision - name: revision
value: f914437a46978b95f325f68d791dcf1a35738f60 value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo - name: pathInRepo
value: task/git-clone/0.9/git-clone.yaml value: task/git-clone/0.9/git-clone.yaml
workspaces: workspaces:
@@ -184,7 +184,7 @@ spec:
- name: url - name: url
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision - name: revision
value: f914437a46978b95f325f68d791dcf1a35738f60 value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo - name: pathInRepo
value: task/git-cli/0.4/git-cli.yaml value: task/git-cli/0.4/git-cli.yaml
params: params:
@@ -220,7 +220,7 @@ spec:
- name: url - name: url
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision - name: revision
value: f914437a46978b95f325f68d791dcf1a35738f60 value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo - name: pathInRepo
value: task/gitea-set-status/0.1/gitea-set-status.yaml value: task/gitea-set-status/0.1/gitea-set-status.yaml
params: params:
@@ -249,7 +249,7 @@ spec:
- name: url - name: url
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision - name: revision
value: f914437a46978b95f325f68d791dcf1a35738f60 value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo - name: pathInRepo
value: task/gitea-set-status/0.1/gitea-set-status.yaml value: task/gitea-set-status/0.1/gitea-set-status.yaml
params: params:

View File

@@ -31,7 +31,7 @@ spec:
- name: url - name: url
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision - name: revision
value: f914437a46978b95f325f68d791dcf1a35738f60 value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo - name: pathInRepo
value: task/gitea-set-status/0.1/gitea-set-status.yaml value: task/gitea-set-status/0.1/gitea-set-status.yaml
params: params:
@@ -56,7 +56,7 @@ spec:
- name: url - name: url
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision - name: revision
value: f914437a46978b95f325f68d791dcf1a35738f60 value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo - name: pathInRepo
value: task/git-clone/0.9/git-clone.yaml value: task/git-clone/0.9/git-clone.yaml
workspaces: workspaces:
@@ -199,7 +199,7 @@ spec:
- name: url - name: url
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision - name: revision
value: f914437a46978b95f325f68d791dcf1a35738f60 value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo - name: pathInRepo
value: task/gitea-set-status/0.1/gitea-set-status.yaml value: task/gitea-set-status/0.1/gitea-set-status.yaml
params: params:
@@ -228,7 +228,7 @@ spec:
- name: url - name: url
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision - name: revision
value: f914437a46978b95f325f68d791dcf1a35738f60 value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo - name: pathInRepo
value: task/gitea-set-status/0.1/gitea-set-status.yaml value: task/gitea-set-status/0.1/gitea-set-status.yaml
params: params:

View File

@@ -31,7 +31,7 @@ spec:
- name: url - name: url
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision - name: revision
value: f914437a46978b95f325f68d791dcf1a35738f60 value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo - name: pathInRepo
value: task/gitea-set-status/0.1/gitea-set-status.yaml value: task/gitea-set-status/0.1/gitea-set-status.yaml
params: params:
@@ -56,7 +56,7 @@ spec:
- name: url - name: url
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision - name: revision
value: f914437a46978b95f325f68d791dcf1a35738f60 value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo - name: pathInRepo
value: task/git-clone/0.9/git-clone.yaml value: task/git-clone/0.9/git-clone.yaml
workspaces: workspaces:
@@ -189,7 +189,7 @@ spec:
- name: url - name: url
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision - name: revision
value: f914437a46978b95f325f68d791dcf1a35738f60 value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo - name: pathInRepo
value: task/gitea-set-status/0.1/gitea-set-status.yaml value: task/gitea-set-status/0.1/gitea-set-status.yaml
params: params:
@@ -218,7 +218,7 @@ spec:
- name: url - name: url
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision - name: revision
value: f914437a46978b95f325f68d791dcf1a35738f60 value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo - name: pathInRepo
value: task/gitea-set-status/0.1/gitea-set-status.yaml value: task/gitea-set-status/0.1/gitea-set-status.yaml
params: params:

View File

@@ -74,7 +74,7 @@ spec:
- name: url - name: url
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision - name: revision
value: f914437a46978b95f325f68d791dcf1a35738f60 value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo - name: pathInRepo
value: task/gitea-set-status/0.1/gitea-set-status.yaml value: task/gitea-set-status/0.1/gitea-set-status.yaml
params: params:
@@ -99,7 +99,7 @@ spec:
- name: url - name: url
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision - name: revision
value: f914437a46978b95f325f68d791dcf1a35738f60 value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo - name: pathInRepo
value: task/git-clone/0.9/git-clone.yaml value: task/git-clone/0.9/git-clone.yaml
workspaces: workspaces:
@@ -124,7 +124,7 @@ spec:
- name: url - name: url
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision - name: revision
value: f914437a46978b95f325f68d791dcf1a35738f60 value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo - name: pathInRepo
value: task/gitea-set-status/0.1/gitea-set-status.yaml value: task/gitea-set-status/0.1/gitea-set-status.yaml
params: params:
@@ -153,7 +153,7 @@ spec:
- name: url - name: url
value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git value: https://code.fizz.buzz/mirror/catalog.git # mirror of https://github.com/tektoncd/catalog.git
- name: revision - name: revision
value: f914437a46978b95f325f68d791dcf1a35738f60 value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo - name: pathInRepo
value: task/gitea-set-status/0.1/gitea-set-status.yaml value: task/gitea-set-status/0.1/gitea-set-status.yaml
params: params:

View File

@@ -1,36 +1,18 @@
# # syntax=docker/dockerfile:1
# Builder ARG ALPINE_VERSION="3.20"
#
FROM nixos/nix:latest AS builder FROM rustlang/rust:nightly-alpine$ALPINE_VERSION AS builder
COPY . /tmp/build RUN apk add --no-cache musl-dev pkgconfig libressl-dev
WORKDIR /tmp/build
RUN nix \ RUN mkdir /source
--extra-experimental-features "nix-command flakes" \ WORKDIR /source
--option filter-syscalls false \ COPY --link . .
build '.#docker_env' # TODO: Add static build, which currently errors due to proc_macro. RUSTFLAGS="-C target-feature=+crt-static"
RUN --mount=type=tmpfs,target=/tmp --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked CARGO_TARGET_DIR=/target cargo build --profile release-lto --bin webhook_bridge
# Export the built closure to a folder FROM alpine:$ALPINE_VERSION AS runner
RUN mkdir /tmp/nix-store-closure
RUN cp -R $(nix-store -qR result/) /tmp/nix-store-closure
RUN ln -s $(readlink -f /tmp/build/result/bin/sh) /tmp/sh
COPY --link --from=builder /target/release-lto/webhook_bridge /usr/bin/
ENTRYPOINT ["/usr/bin/webhook_bridge"]
#
# Runner
#
FROM scratch
WORKDIR /app
ENV PATH="$PATH:/app/bin"
COPY --from=builder /tmp/nix-store-closure /nix/store
COPY --from=builder /tmp/build/result /app
COPY --from=builder /tmp/sh /bin/sh
EXPOSE 9988
CMD ["/app/bin/webhook_bridge"]

48
flake.lock generated
View File

@@ -1,48 +0,0 @@
{
"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
}

View File

@@ -1,92 +0,0 @@
{
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).
];
};
}
);
packages = forAllSystems (
system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit system overlays;
};
rustToolchain = pkgs.pkgsBuildHost.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
in
rec {
app = pkgs.rustPlatform.buildRustPackage {
pname = "webhook-bridge";
version = "0.0.0";
src = ./.;
# If you have a Cargo.lock file, use this:
cargoLock.lockFile = ./Cargo.lock;
nativeBuildInputs = [
pkgs.pkg-config
];
buildInputs = [
pkgs.openssl
];
};
docker_env = pkgs.buildEnv {
name = "webhook-bridge";
paths = with pkgs; [
app
bash
uutils-coreutils-noprefix
# toybox # Smaller than uutils-coreutils?
];
};
default = app;
}
);
};
}

View File

@@ -1,80 +1,115 @@
{ {
"ref": "refs/heads/main", "ref": "refs/heads/main",
"before": "6eac598600c436d33de295d5b5f05b444beb2d3d", "before": "69b891b59b1ee026e5bf2e7bee357eead5cbe546",
"after": "1f52dd8995987337a3a33ce675625647545490c2", "after": "5bd07a34780a5b4aaa9b5d0eef22b6e4ac1880a1",
"compare_url": "https://code.fizz.buzz/talexander/webhook_bridge/compare/6eac598600c436d33de295d5b5f05b444beb2d3d...1f52dd8995987337a3a33ce675625647545490c2", "compare_url": "https://code.fizz.buzz/mirror/org-mode/compare/69b891b59b1ee026e5bf2e7bee357eead5cbe546...5bd07a34780a5b4aaa9b5d0eef22b6e4ac1880a1",
"commits": [ "commits": [
{ {
"id": "1f52dd8995987337a3a33ce675625647545490c2", "id": "5bd07a34780a5b4aaa9b5d0eef22b6e4ac1880a1",
"message": "Update to the latest catalog.\n", "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/talexander/webhook_bridge/commit/1f52dd8995987337a3a33ce675625647545490c2", "url": "https://code.fizz.buzz/mirror/org-mode/commit/5bd07a34780a5b4aaa9b5d0eef22b6e4ac1880a1",
"author": { "author": {
"name": "Tom Alexander", "name": "Rudolf Adamkovič",
"email": "tom@fizz.buzz", "email": "rudolf@adamkovic.org",
"username": "" "username": ""
}, },
"committer": { "committer": {
"name": "Tom Alexander", "name": "Rudolf Adamkovič",
"email": "tom@fizz.buzz", "email": "rudolf@adamkovic.org",
"username": "" "username": ""
}, },
"verification": null, "verification": null,
"timestamp": "2026-05-02T17:50:49-04:00", "timestamp": "2025-08-17T14:12:07+02:00",
"added": [], "added": [],
"removed": [], "removed": [],
"modified": [ "modified": [
".webhook_bridge/pipeline-build-semver.yaml", "lisp/org-keys.el"
".webhook_bridge/pipeline-format.yaml", ]
".webhook_bridge/pipeline-rust-clippy.yaml", },
".webhook_bridge/pipeline-rust-test.yaml", {
".webhook_bridge/pipeline-semver.yaml", "id": "b0f793ff0a31adb520fc5989b0399786663192ea",
"local_payload.json" "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"
] ]
} }
], ],
"total_commits": 1, "total_commits": 3,
"head_commit": { "head_commit": {
"id": "1f52dd8995987337a3a33ce675625647545490c2", "id": "5bd07a34780a5b4aaa9b5d0eef22b6e4ac1880a1",
"message": "Update to the latest catalog.\n", "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/talexander/webhook_bridge/commit/1f52dd8995987337a3a33ce675625647545490c2", "url": "https://code.fizz.buzz/mirror/org-mode/commit/5bd07a34780a5b4aaa9b5d0eef22b6e4ac1880a1",
"author": { "author": {
"name": "Tom Alexander", "name": "Rudolf Adamkovič",
"email": "tom@fizz.buzz", "email": "rudolf@adamkovic.org",
"username": "" "username": ""
}, },
"committer": { "committer": {
"name": "Tom Alexander", "name": "Rudolf Adamkovič",
"email": "tom@fizz.buzz", "email": "rudolf@adamkovic.org",
"username": "" "username": ""
}, },
"verification": null, "verification": null,
"timestamp": "2026-05-02T17:50:49-04:00", "timestamp": "2025-08-17T14:12:07+02:00",
"added": [], "added": [],
"removed": [], "removed": [],
"modified": [ "modified": [
".webhook_bridge/pipeline-build-semver.yaml", "lisp/org-keys.el"
".webhook_bridge/pipeline-format.yaml",
".webhook_bridge/pipeline-rust-clippy.yaml",
".webhook_bridge/pipeline-rust-test.yaml",
".webhook_bridge/pipeline-semver.yaml",
"local_payload.json"
] ]
}, },
"repository": { "repository": {
"id": 21, "id": 24,
"owner": { "owner": {
"id": 1, "id": 3,
"login": "talexander", "login": "mirror",
"login_name": "", "login_name": "",
"source_id": 0, "source_id": 0,
"full_name": "", "full_name": "",
"email": "gitea@local.domain", "email": "",
"avatar_url": "https://code.fizz.buzz/avatars/9d402a89b5a0786f83c1b8c5486fc7ff3d083a54fe20e55c0a776a1932c30289", "avatar_url": "https://code.fizz.buzz/avatars/fbe322a89bc0ba531c3f0050e3935f28",
"html_url": "https://code.fizz.buzz/talexander", "html_url": "https://code.fizz.buzz/mirror",
"language": "", "language": "",
"is_admin": false, "is_admin": false,
"last_login": "0001-01-01T00:00:00Z", "last_login": "0001-01-01T00:00:00Z",
"created": "2023-07-05T22:03:28Z", "created": "2024-09-30T16:24:55Z",
"restricted": false, "restricted": false,
"active": false, "active": false,
"prohibit_login": false, "prohibit_login": false,
@@ -85,25 +120,26 @@
"followers_count": 0, "followers_count": 0,
"following_count": 0, "following_count": 0,
"starred_repos_count": 0, "starred_repos_count": 0,
"username": "talexander" "username": "mirror"
}, },
"name": "webhook_bridge", "name": "org-mode",
"full_name": "talexander/webhook_bridge", "full_name": "mirror/org-mode",
"description": "A server that receives webhooks from gitea and fires off Tekton jobs in response.", "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.",
"empty": false, "empty": false,
"private": false, "private": false,
"fork": false, "fork": false,
"template": false, "template": false,
"mirror": false, "parent": null,
"size": 179, "mirror": true,
"size": 119577,
"language": "", "language": "",
"languages_url": "https://code.fizz.buzz/api/v1/repos/talexander/webhook_bridge/languages", "languages_url": "https://code.fizz.buzz/api/v1/repos/mirror/org-mode/languages",
"html_url": "https://code.fizz.buzz/talexander/webhook_bridge", "html_url": "https://code.fizz.buzz/mirror/org-mode",
"url": "https://code.fizz.buzz/api/v1/repos/talexander/webhook_bridge", "url": "https://code.fizz.buzz/api/v1/repos/mirror/org-mode",
"link": "", "link": "",
"ssh_url": "git@git.example.com:talexander/webhook_bridge.git", "ssh_url": "git@code.fizz.buzz:mirror/org-mode.git",
"clone_url": "https://code.fizz.buzz/talexander/webhook_bridge.git", "clone_url": "https://code.fizz.buzz/mirror/org-mode.git",
"original_url": "", "original_url": "https://git.savannah.gnu.org/git/emacs/org-mode.git",
"website": "", "website": "",
"stars_count": 0, "stars_count": 0,
"forks_count": 0, "forks_count": 0,
@@ -113,63 +149,54 @@
"release_counter": 0, "release_counter": 0,
"default_branch": "main", "default_branch": "main",
"archived": false, "archived": false,
"created_at": "2024-07-14T18:48:52Z", "created_at": "2024-09-30T16:27:01Z",
"updated_at": "2026-05-02T21:52:29Z", "updated_at": "2025-09-09T08:46:53Z",
"archived_at": "1970-01-01T00:00:00Z", "archived_at": "1970-01-01T00:00:00Z",
"permissions": { "permissions": {
"admin": true, "admin": true,
"push": true, "push": true,
"pull": true "pull": true
}, },
"has_code": true, "has_issues": false,
"has_issues": true,
"internal_tracker": {
"enable_time_tracker": true,
"allow_only_contributors_to_track_time": true,
"enable_issue_dependencies": true
},
"has_wiki": false, "has_wiki": false,
"has_pull_requests": true, "has_pull_requests": false,
"has_projects": false, "has_projects": false,
"projects_mode": "all", "projects_mode": "all",
"has_releases": true, "has_releases": false,
"has_packages": false, "has_packages": false,
"has_actions": false, "has_actions": false,
"ignore_whitespace_conflicts": false, "ignore_whitespace_conflicts": false,
"allow_merge_commits": true, "allow_merge_commits": false,
"allow_rebase": true, "allow_rebase": false,
"allow_rebase_explicit": true, "allow_rebase_explicit": false,
"allow_squash_merge": true, "allow_squash_merge": false,
"allow_fast_forward_only_merge": false, "allow_fast_forward_only_merge": false,
"allow_rebase_update": true, "allow_rebase_update": false,
"allow_manual_merge": false,
"autodetect_manual_merge": false,
"default_delete_branch_after_merge": false, "default_delete_branch_after_merge": false,
"default_merge_style": "merge", "default_merge_style": "merge",
"default_allow_maintainer_edit": false, "default_allow_maintainer_edit": false,
"avatar_url": "", "avatar_url": "",
"internal": false, "internal": false,
"mirror_interval": "", "mirror_interval": "24h0m0s",
"object_format_name": "sha1", "object_format_name": "sha1",
"mirror_updated": "0001-01-01T00:00:00Z", "mirror_updated": "2025-09-24T00:51:19Z",
"topics": [], "repo_transfer": null,
"licenses": [ "topics": null,
"0BSD" "licenses": null
]
}, },
"pusher": { "pusher": {
"id": 1, "id": 3,
"login": "talexander", "login": "mirror",
"login_name": "", "login_name": "",
"source_id": 0, "source_id": 0,
"full_name": "", "full_name": "",
"email": "talexander@noreply.code.fizz.buzz", "email": "mirror@noreply.code.fizz.buzz",
"avatar_url": "https://code.fizz.buzz/avatars/9d402a89b5a0786f83c1b8c5486fc7ff3d083a54fe20e55c0a776a1932c30289", "avatar_url": "https://code.fizz.buzz/avatars/fbe322a89bc0ba531c3f0050e3935f28",
"html_url": "https://code.fizz.buzz/talexander", "html_url": "https://code.fizz.buzz/mirror",
"language": "", "language": "",
"is_admin": false, "is_admin": false,
"last_login": "0001-01-01T00:00:00Z", "last_login": "0001-01-01T00:00:00Z",
"created": "2023-07-05T22:03:28Z", "created": "2024-09-30T16:24:55Z",
"restricted": false, "restricted": false,
"active": false, "active": false,
"prohibit_login": false, "prohibit_login": false,
@@ -180,21 +207,21 @@
"followers_count": 0, "followers_count": 0,
"following_count": 0, "following_count": 0,
"starred_repos_count": 0, "starred_repos_count": 0,
"username": "talexander" "username": "mirror"
}, },
"sender": { "sender": {
"id": 1, "id": 3,
"login": "talexander", "login": "mirror",
"login_name": "", "login_name": "",
"source_id": 0, "source_id": 0,
"full_name": "", "full_name": "",
"email": "talexander@noreply.code.fizz.buzz", "email": "mirror@noreply.code.fizz.buzz",
"avatar_url": "https://code.fizz.buzz/avatars/9d402a89b5a0786f83c1b8c5486fc7ff3d083a54fe20e55c0a776a1932c30289", "avatar_url": "https://code.fizz.buzz/avatars/fbe322a89bc0ba531c3f0050e3935f28",
"html_url": "https://code.fizz.buzz/talexander", "html_url": "https://code.fizz.buzz/mirror",
"language": "", "language": "",
"is_admin": false, "is_admin": false,
"last_login": "0001-01-01T00:00:00Z", "last_login": "0001-01-01T00:00:00Z",
"created": "2023-07-05T22:03:28Z", "created": "2024-09-30T16:24:55Z",
"restricted": false, "restricted": false,
"active": false, "active": false,
"prohibit_login": false, "prohibit_login": false,
@@ -205,6 +232,6 @@
"followers_count": 0, "followers_count": 0,
"following_count": 0, "following_count": 0,
"starred_repos_count": 0, "starred_repos_count": 0,
"username": "talexander" "username": "mirror"
} }
} }

View File

@@ -4,12 +4,4 @@ set -euo pipefail
IFS=$'\n\t' IFS=$'\n\t'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
function main { exec env RUST_LOG=webhook_bridge=DEBUG WEBHOOK_BRIDGE_API_ROOT="https://code.fizz.buzz/api" WEBHOOK_BRIDGE_HMAC_SECRET=$(cat /bridge/git/mrmanager/k8s/webhook_bridge/secrets/webhook-bridge/webhook-bridge/HMAC_TOKEN) WEBHOOK_BRIDGE_OAUTH_TOKEN=$(cat /bridge/git/mrmanager/k8s/webhook_bridge/secrets/webhook-bridge/webhook-bridge/OAUTH_TOKEN) WEBHOOK_BRIDGE_REPO_WHITELIST="talexander/webhook_bridge,talexander/homepage,talexander/natter,talexander/poudboot,talexander/ta_waybar_pipewire,talexander/organic" cargo run "${@}"
exec env RUST_LOG=webhook_bridge=DEBUG WEBHOOK_BRIDGE_API_ROOT="https://code.fizz.buzz/api" WEBHOOK_BRIDGE_HMAC_SECRET="$(decrypt_k8s_secret -n webhook-bridge webhook-bridge | jq -r '.HMAC_TOKEN')" WEBHOOK_BRIDGE_OAUTH_TOKEN="$(decrypt_k8s_secret -n webhook-bridge webhook-bridge | jq -r '.OAUTH_TOKEN')" WEBHOOK_BRIDGE_REPO_WHITELIST="talexander/webhook_bridge,talexander/homepage,talexander/natter,talexander/poudboot,talexander/ta_waybar_pipewire,talexander/organic" cargo run "${@}"
}
function decrypt_k8s_secret {
kubectl get secret -o json "${@}" | jq '.data[] |= @base64d | .data'
}
main "${@}"

View File

@@ -6,6 +6,7 @@ use serde_json::Value;
#[allow(dead_code)] #[allow(dead_code)]
#[derive(Debug, Deserialize)] #[derive(Debug, Deserialize)]
#[serde(deny_unknown_fields)]
pub(crate) struct HookPush { pub(crate) struct HookPush {
#[serde(rename = "ref")] #[serde(rename = "ref")]
pub(crate) ref_field: String, pub(crate) ref_field: String,
@@ -22,6 +23,7 @@ pub(crate) struct HookPush {
#[allow(dead_code)] #[allow(dead_code)]
#[derive(Debug, Deserialize)] #[derive(Debug, Deserialize)]
#[serde(deny_unknown_fields)]
pub(crate) struct HookUser { pub(crate) struct HookUser {
id: u64, id: u64,
login: String, login: String,
@@ -51,6 +53,7 @@ pub(crate) struct HookUser {
#[allow(dead_code)] #[allow(dead_code)]
#[derive(Debug, Deserialize)] #[derive(Debug, Deserialize)]
#[serde(deny_unknown_fields)]
pub(crate) struct HookRepository { pub(crate) struct HookRepository {
id: u64, id: u64,
owner: HookUser, owner: HookUser,
@@ -61,6 +64,7 @@ pub(crate) struct HookRepository {
private: bool, private: bool,
fork: bool, fork: bool,
template: bool, template: bool,
parent: Value, // Was null in test hook
mirror: bool, mirror: bool,
size: u64, size: u64,
language: String, language: String,
@@ -85,8 +89,6 @@ pub(crate) struct HookRepository {
archived_at: String, // TODO: parse to datetime archived_at: String, // TODO: parse to datetime
permissions: HookRepositoryPermissions, permissions: HookRepositoryPermissions,
has_issues: bool, has_issues: bool,
#[serde(default, skip_serializing_if = "Option::is_none")]
internal_tracker: Option<HookRepositoryInternalTracker>,
has_wiki: bool, has_wiki: bool,
has_pull_requests: bool, has_pull_requests: bool,
has_projects: bool, has_projects: bool,
@@ -109,10 +111,14 @@ pub(crate) struct HookRepository {
mirror_interval: String, mirror_interval: String,
object_format_name: String, object_format_name: String,
mirror_updated: String, // TODO: parse to datetime 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)] #[allow(dead_code)]
#[derive(Debug, Deserialize)] #[derive(Debug, Deserialize)]
#[serde(deny_unknown_fields)]
pub(crate) struct HookRepositoryPermissions { pub(crate) struct HookRepositoryPermissions {
admin: bool, admin: bool,
push: bool, push: bool,
@@ -121,14 +127,7 @@ pub(crate) struct HookRepositoryPermissions {
#[allow(dead_code)] #[allow(dead_code)]
#[derive(Debug, Deserialize)] #[derive(Debug, Deserialize)]
pub(crate) struct HookRepositoryInternalTracker { #[serde(deny_unknown_fields)]
enable_time_tracker: bool,
allow_only_contributors_to_track_time: bool,
enable_issue_dependencies: bool,
}
#[allow(dead_code)]
#[derive(Debug, Deserialize)]
pub(crate) struct HookCommit { pub(crate) struct HookCommit {
id: String, id: String,
message: String, message: String,
@@ -144,6 +143,7 @@ pub(crate) struct HookCommit {
#[allow(dead_code)] #[allow(dead_code)]
#[derive(Debug, Deserialize)] #[derive(Debug, Deserialize)]
#[serde(deny_unknown_fields)]
pub(crate) struct HookGitUser { pub(crate) struct HookGitUser {
name: String, name: String,
email: String, email: String,