Compare commits

..

21 Commits

Author SHA1 Message Date
9f76dcc17a fix(deps): update rust crate toml to v1.0.7 2026-03-18 01:32:50 +00:00
9b2838b33d chore(deps): update rust crate tracing-subscriber to v0.3.23 2026-03-14 01:43:05 +00:00
2fa2da0d4d chore(deps): update rust crate clap to v4.6.0 2026-03-13 01:33:17 +00:00
cc1ff2b636 fix(deps): update rust crate toml to v1.0.6 2026-03-07 01:39:13 +00:00
158a16ed78 chore(deps): update rust crate uuid to v1.22.0 2026-03-06 01:32:55 +00:00
0ed670828d fix(deps): update rust crate toml to v1.0.4 2026-03-05 01:32:15 +00:00
394f84f50d chore(deps): update rust crate tokio to v1.50.0 2026-03-04 01:32:53 +00:00
8d68f32663 chore(deps): update rust crate anyhow to v1.0.102 2026-02-20 04:33:03 +00:00
467e110377 chore(deps): update rust crate clap to v4.5.60 2026-02-20 01:32:22 +00:00
33ef757dd8 fix(deps): update rust crate toml to v1.0.3 2026-02-19 01:29:38 +00:00
9639a4b0eb fix(deps): update all dependencies 2026-02-17 01:31:57 +00:00
ccf1674512 chore(deps): update rust crate uuid to v1.21.0 2026-02-14 01:31:00 +00:00
e15a730b37 fix(deps): update rust crate toml to v1.0.1 2026-02-13 01:33:33 +00:00
3654f170bc fix(deps): update all dependencies
Some checks failed
renovate/artifacts Artifact file update failure
2026-02-12 01:33:24 +00:00
055f917142 fix(deps): update rust crate toml to v0.9.12 2026-02-11 01:29:51 +00:00
dddfe60234 fix(deps): update rust crate http to v1.4.0 2026-02-07 01:30:16 +00:00
1481293b7c feat: add check for codeowners
Signed-off-by: kjuulh <contact@kjuulh.io>
2026-02-06 13:02:33 +01:00
e394510993 chore(deps): update all dependencies 2026-02-06 01:34:16 +00:00
edb8752dcb feat: fixup config
Signed-off-by: kjuulh <contact@kjuulh.io>
2026-02-04 10:32:10 +01:00
35144db491 chore(deps): update tokio-tracing monorepo 2026-02-04 02:32:16 +01:00
b6d08637cf chore(deps): update all dependencies 2026-02-04 01:32:11 +00:00
14 changed files with 634 additions and 215 deletions

412
Cargo.lock generated
View File

@@ -22,30 +22,30 @@ dependencies = [
[[package]] [[package]]
name = "anstream" name = "anstream"
version = "0.3.2" version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d"
dependencies = [ dependencies = [
"anstyle", "anstyle",
"anstyle-parse", "anstyle-parse",
"anstyle-query", "anstyle-query",
"anstyle-wincon", "anstyle-wincon",
"colorchoice", "colorchoice",
"is-terminal", "is_terminal_polyfill",
"utf8parse", "utf8parse",
] ]
[[package]] [[package]]
name = "anstyle" name = "anstyle"
version = "1.0.0" version = "1.0.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78"
[[package]] [[package]]
name = "anstyle-parse" name = "anstyle-parse"
version = "0.2.0" version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e"
dependencies = [ dependencies = [
"utf8parse", "utf8parse",
] ]
@@ -61,19 +61,20 @@ dependencies = [
[[package]] [[package]]
name = "anstyle-wincon" name = "anstyle-wincon"
version = "1.0.1" version = "3.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
dependencies = [ dependencies = [
"anstyle", "anstyle",
"windows-sys 0.48.0", "once_cell_polyfill",
"windows-sys 0.61.2",
] ]
[[package]] [[package]]
name = "anyhow" name = "anyhow"
version = "1.0.71" version = "1.0.102"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
[[package]] [[package]]
name = "arc-swap" name = "arc-swap"
@@ -275,33 +276,31 @@ dependencies = [
[[package]] [[package]]
name = "clap" name = "clap"
version = "4.3.4" version = "4.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "80672091db20273a15cf9fdd4e47ed43b5091ec9841bf4c6145c9dfbbcae09ed" checksum = "b193af5b67834b676abd72466a96c1024e6a6ad978a1f484bd90b85c94041351"
dependencies = [ dependencies = [
"clap_builder", "clap_builder",
"clap_derive", "clap_derive",
"once_cell",
] ]
[[package]] [[package]]
name = "clap_builder" name = "clap_builder"
version = "4.3.4" version = "4.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1458a1df40e1e2afebb7ab60ce55c1fa8f431146205aa5f4887e0b111c27636" checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f"
dependencies = [ dependencies = [
"anstream", "anstream",
"anstyle", "anstyle",
"bitflags 1.3.2",
"clap_lex", "clap_lex",
"strsim", "strsim",
] ]
[[package]] [[package]]
name = "clap_derive" name = "clap_derive"
version = "4.3.2" version = "4.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f" checksum = "1110bd8a634a1ab8cb04345d8d878267d57c3cf1b38d91b71af6686408bbca6a"
dependencies = [ dependencies = [
"heck", "heck",
"proc-macro2", "proc-macro2",
@@ -311,9 +310,9 @@ dependencies = [
[[package]] [[package]]
name = "clap_lex" name = "clap_lex"
version = "0.5.0" version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" checksum = "3a822ea5bc7590f9d40f1ba12c0dc3c2760f3482c6984db1573ad11031420831"
[[package]] [[package]]
name = "colorchoice" name = "colorchoice"
@@ -527,16 +526,6 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
[[package]]
name = "errno"
version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245"
dependencies = [
"libc",
"windows-sys 0.52.0",
]
[[package]] [[package]]
name = "ff" name = "ff"
version = "0.13.1" version = "0.13.1"
@@ -560,10 +549,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
[[package]] [[package]]
name = "fnv" name = "foldhash"
version = "1.0.7" version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
[[package]] [[package]]
name = "forge-enforce" name = "forge-enforce"
@@ -574,6 +563,7 @@ dependencies = [
"axum", "axum",
"clap", "clap",
"dotenv", "dotenv",
"http",
"nodrift", "nodrift",
"notmad", "notmad",
"octocrab", "octocrab",
@@ -724,6 +714,19 @@ dependencies = [
"wasip2", "wasip2",
] ]
[[package]]
name = "getrandom"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec"
dependencies = [
"cfg-if",
"libc",
"r-efi",
"wasip2",
"wasip3",
]
[[package]] [[package]]
name = "group" name = "group"
version = "0.13.0" version = "0.13.0"
@@ -735,6 +738,15 @@ dependencies = [
"subtle", "subtle",
] ]
[[package]]
name = "hashbrown"
version = "0.15.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
dependencies = [
"foldhash",
]
[[package]] [[package]]
name = "hashbrown" name = "hashbrown"
version = "0.16.1" version = "0.16.1"
@@ -743,15 +755,9 @@ checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
[[package]] [[package]]
name = "heck" name = "heck"
version = "0.4.1" version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "hermit-abi"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286"
[[package]] [[package]]
name = "hkdf" name = "hkdf"
@@ -773,12 +779,11 @@ dependencies = [
[[package]] [[package]]
name = "http" name = "http"
version = "1.0.0" version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a"
dependencies = [ dependencies = [
"bytes", "bytes",
"fnv",
"itoa", "itoa",
] ]
@@ -914,6 +919,12 @@ dependencies = [
"cc", "cc",
] ]
[[package]]
name = "id-arena"
version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954"
[[package]] [[package]]
name = "idna" name = "idna"
version = "0.4.0" version = "0.4.0"
@@ -931,18 +942,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017"
dependencies = [ dependencies = [
"equivalent", "equivalent",
"hashbrown", "hashbrown 0.16.1",
] "serde",
"serde_core",
[[package]]
name = "io-lifetimes"
version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2"
dependencies = [
"hermit-abi",
"libc",
"windows-sys 0.48.0",
] ]
[[package]] [[package]]
@@ -956,16 +958,10 @@ dependencies = [
] ]
[[package]] [[package]]
name = "is-terminal" name = "is_terminal_polyfill"
version = "0.4.7" version = "1.70.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
dependencies = [
"hermit-abi",
"io-lifetimes",
"rustix",
"windows-sys 0.48.0",
]
[[package]] [[package]]
name = "itoa" name = "itoa"
@@ -1015,6 +1011,12 @@ dependencies = [
"spin", "spin",
] ]
[[package]]
name = "leb128fmt"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2"
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.180" version = "0.2.180"
@@ -1027,12 +1029,6 @@ version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
[[package]]
name = "linux-raw-sys"
version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519"
[[package]] [[package]]
name = "lock_api" name = "lock_api"
version = "0.4.10" version = "0.4.10"
@@ -1096,12 +1092,11 @@ dependencies = [
[[package]] [[package]]
name = "notmad" name = "notmad"
version = "0.8.1" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6698b96b4bf8b4bb35982cc8233af557954cf3b3c2749cec819fab39acc29e6" checksum = "88f52fa65fdf2dc8bf9e0ba7e95f0966a3d7449f660922cc21d96fe382f5c82e"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait",
"futures", "futures",
"futures-util", "futures-util",
"rand 0.9.2", "rand 0.9.2",
@@ -1113,12 +1108,11 @@ dependencies = [
[[package]] [[package]]
name = "nu-ansi-term" name = "nu-ansi-term"
version = "0.46.0" version = "0.50.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
dependencies = [ dependencies = [
"overload", "windows-sys 0.61.2",
"winapi",
] ]
[[package]] [[package]]
@@ -1231,18 +1225,18 @@ version = "1.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
[[package]]
name = "once_cell_polyfill"
version = "1.70.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
[[package]] [[package]]
name = "openssl-probe" name = "openssl-probe"
version = "0.2.1" version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe"
[[package]]
name = "overload"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
[[package]] [[package]]
name = "p256" name = "p256"
version = "0.13.2" version = "0.13.2"
@@ -1380,6 +1374,16 @@ version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
[[package]]
name = "prettyplease"
version = "0.2.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b"
dependencies = [
"proc-macro2",
"syn",
]
[[package]] [[package]]
name = "primeorder" name = "primeorder"
version = "0.13.6" version = "0.13.6"
@@ -1400,9 +1404,9 @@ dependencies = [
[[package]] [[package]]
name = "quote" name = "quote"
version = "1.0.35" version = "1.0.45"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
] ]
@@ -1583,20 +1587,6 @@ dependencies = [
"semver", "semver",
] ]
[[package]]
name = "rustix"
version = "0.37.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b96e891d04aa506a6d1f318d2771bcb1c7dfda84e126660ace067c9b474bb2c0"
dependencies = [
"bitflags 1.3.2",
"errno",
"io-lifetimes",
"libc",
"linux-raw-sys",
"windows-sys 0.48.0",
]
[[package]] [[package]]
name = "rustls" name = "rustls"
version = "0.23.36" version = "0.23.36"
@@ -1957,9 +1947,9 @@ dependencies = [
[[package]] [[package]]
name = "strsim" name = "strsim"
version = "0.10.0" version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]] [[package]]
name = "subtle" name = "subtle"
@@ -1969,9 +1959,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]] [[package]]
name = "syn" name = "syn"
version = "2.0.114" version = "2.0.117"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -2062,9 +2052,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]] [[package]]
name = "tokio" name = "tokio"
version = "1.49.0" version = "1.50.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d"
dependencies = [ dependencies = [
"bytes", "bytes",
"libc", "libc",
@@ -2113,9 +2103,9 @@ dependencies = [
[[package]] [[package]]
name = "toml" name = "toml"
version = "0.9.11+spec-1.1.0" version = "1.0.7+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3afc9a848309fe1aaffaed6e1546a7a14de1f935dc9d89d32afd9a44bab7c46" checksum = "dd28d57d8a6f6e458bc0b8784f8fdcc4b99a437936056fa122cb234f18656a96"
dependencies = [ dependencies = [
"indexmap", "indexmap",
"serde_core", "serde_core",
@@ -2123,32 +2113,32 @@ dependencies = [
"toml_datetime", "toml_datetime",
"toml_parser", "toml_parser",
"toml_writer", "toml_writer",
"winnow 0.7.14", "winnow 1.0.0",
] ]
[[package]] [[package]]
name = "toml_datetime" name = "toml_datetime"
version = "0.7.5+spec-1.1.0" version = "1.0.1+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" checksum = "9b320e741db58cac564e26c607d3cc1fdc4a88fd36c879568c07856ed83ff3e9"
dependencies = [ dependencies = [
"serde_core", "serde_core",
] ]
[[package]] [[package]]
name = "toml_parser" name = "toml_parser"
version = "1.0.6+spec-1.1.0" version = "1.0.10+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" checksum = "7df25b4befd31c4816df190124375d5a20c6b6921e2cad937316de3fccd63420"
dependencies = [ dependencies = [
"winnow 0.7.14", "winnow 1.0.0",
] ]
[[package]] [[package]]
name = "toml_writer" name = "toml_writer"
version = "1.0.6+spec-1.1.0" version = "1.0.7+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" checksum = "f17aaa1c6e3dc22b1da4b6bba97d066e354c7945cac2f7852d4e4e7ca7a6b56d"
[[package]] [[package]]
name = "tower" name = "tower"
@@ -2200,11 +2190,10 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
[[package]] [[package]]
name = "tracing" name = "tracing"
version = "0.1.37" version = "0.1.44"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"
dependencies = [ dependencies = [
"cfg-if",
"log", "log",
"pin-project-lite", "pin-project-lite",
"tracing-attributes", "tracing-attributes",
@@ -2213,9 +2202,9 @@ dependencies = [
[[package]] [[package]]
name = "tracing-attributes" name = "tracing-attributes"
version = "0.1.24" version = "0.1.31"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -2224,9 +2213,9 @@ dependencies = [
[[package]] [[package]]
name = "tracing-core" name = "tracing-core"
version = "0.1.31" version = "0.1.36"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a"
dependencies = [ dependencies = [
"once_cell", "once_cell",
"valuable", "valuable",
@@ -2245,9 +2234,9 @@ dependencies = [
[[package]] [[package]]
name = "tracing-subscriber" name = "tracing-subscriber"
version = "0.3.18" version = "0.3.23"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319"
dependencies = [ dependencies = [
"nu-ansi-term", "nu-ansi-term",
"sharded-slab", "sharded-slab",
@@ -2290,6 +2279,12 @@ dependencies = [
"tinyvec", "tinyvec",
] ]
[[package]]
name = "unicode-xid"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
[[package]] [[package]]
name = "untrusted" name = "untrusted"
version = "0.9.0" version = "0.9.0"
@@ -2310,17 +2305,19 @@ dependencies = [
[[package]] [[package]]
name = "utf8parse" name = "utf8parse"
version = "0.2.1" version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]] [[package]]
name = "uuid" name = "uuid"
version = "1.7.0" version = "1.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" checksum = "a68d3c8f01c0cfa54a75291d83601161799e4a89a39e0929f4b0354d88757a37"
dependencies = [ dependencies = [
"getrandom 0.2.17", "getrandom 0.4.1",
"js-sys",
"wasm-bindgen",
] ]
[[package]] [[package]]
@@ -2359,6 +2356,15 @@ dependencies = [
"wit-bindgen", "wit-bindgen",
] ]
[[package]]
name = "wasip3"
version = "0.4.0+wasi-0.3.0-rc-2026-01-06"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5"
dependencies = [
"wit-bindgen",
]
[[package]] [[package]]
name = "wasm-bindgen" name = "wasm-bindgen"
version = "0.2.108" version = "0.2.108"
@@ -2404,6 +2410,40 @@ dependencies = [
"unicode-ident", "unicode-ident",
] ]
[[package]]
name = "wasm-encoder"
version = "0.244.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319"
dependencies = [
"leb128fmt",
"wasmparser",
]
[[package]]
name = "wasm-metadata"
version = "0.244.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909"
dependencies = [
"anyhow",
"indexmap",
"wasm-encoder",
"wasmparser",
]
[[package]]
name = "wasmparser"
version = "0.244.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe"
dependencies = [
"bitflags 2.10.0",
"hashbrown 0.15.5",
"indexmap",
"semver",
]
[[package]] [[package]]
name = "web-time" name = "web-time"
version = "1.1.0" version = "1.1.0"
@@ -2415,28 +2455,6 @@ dependencies = [
"wasm-bindgen", "wasm-bindgen",
] ]
[[package]]
name = "winapi"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
dependencies = [
"winapi-i686-pc-windows-gnu",
"winapi-x86_64-pc-windows-gnu",
]
[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]
name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]] [[package]]
name = "windows-core" name = "windows-core"
version = "0.62.2" version = "0.62.2"
@@ -2722,15 +2740,97 @@ dependencies = [
[[package]] [[package]]
name = "winnow" name = "winnow"
version = "0.7.14" version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" checksum = "a90e88e4667264a994d34e6d1ab2d26d398dcdca8b7f52bec8668957517fc7d8"
[[package]] [[package]]
name = "wit-bindgen" name = "wit-bindgen"
version = "0.51.0" version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5"
dependencies = [
"wit-bindgen-rust-macro",
]
[[package]]
name = "wit-bindgen-core"
version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc"
dependencies = [
"anyhow",
"heck",
"wit-parser",
]
[[package]]
name = "wit-bindgen-rust"
version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21"
dependencies = [
"anyhow",
"heck",
"indexmap",
"prettyplease",
"syn",
"wasm-metadata",
"wit-bindgen-core",
"wit-component",
]
[[package]]
name = "wit-bindgen-rust-macro"
version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a"
dependencies = [
"anyhow",
"prettyplease",
"proc-macro2",
"quote",
"syn",
"wit-bindgen-core",
"wit-bindgen-rust",
]
[[package]]
name = "wit-component"
version = "0.244.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2"
dependencies = [
"anyhow",
"bitflags 2.10.0",
"indexmap",
"log",
"serde",
"serde_derive",
"serde_json",
"wasm-encoder",
"wasm-metadata",
"wasmparser",
"wit-parser",
]
[[package]]
name = "wit-parser"
version = "0.244.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736"
dependencies = [
"anyhow",
"id-arena",
"indexmap",
"log",
"semver",
"serde",
"serde_derive",
"serde_json",
"unicode-xid",
"wasmparser",
]
[[package]] [[package]]
name = "zeroize" name = "zeroize"

View File

@@ -15,4 +15,4 @@ axum = { version = "0.8" }
serde = { version = "1", features = ["derive"] } serde = { version = "1", features = ["derive"] }
uuid = { version = "1", features = ["v4"] } uuid = { version = "1", features = ["v4"] }
tower-http = { version = "0.6", features = ["cors", "trace"] } tower-http = { version = "0.6", features = ["cors", "trace"] }
notmad = "0.8" notmad = "0.11"

View File

@@ -18,8 +18,9 @@ notmad.workspace = true
tokio-util = "0.7.18" tokio-util = "0.7.18"
async-trait = "0.1.89" async-trait = "0.1.89"
regex = "1.12.3" regex = "1.12.3"
toml = "0.9.11" toml = "1.0.0"
nodrift = "0.3.5" nodrift = "0.3.5"
octocrab = "0.49.5" octocrab = "0.49.5"
schemars = "1.2.1" schemars = "1.2.1"
serde_json = "1.0.149" serde_json = "1.0.149"
http = "1"

View File

@@ -1,3 +1,5 @@
use std::collections::BTreeMap;
use regex::Regex; use regex::Regex;
use schemars::JsonSchema; use schemars::JsonSchema;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
@@ -15,7 +17,19 @@ pub struct ForgeConfig {
pub schedule: ForgeSchedule, pub schedule: ForgeSchedule,
#[serde(default)] #[serde(default)]
pub policies: Policies, pub policies: BTreeMap<String, PolicyOption>,
#[serde(default)]
pub mode: Mode,
}
#[derive(Clone, Debug, Deserialize, JsonSchema, Default)]
pub enum Mode {
#[serde(rename = "warn")]
Warn,
#[serde(rename = "update")]
#[default]
Update,
} }
/// # Filter /// # Filter
@@ -54,13 +68,6 @@ fn deny_default() -> Vec<ForgeRegex> {
vec![] vec![]
} }
#[derive(Clone, Debug, Default, Deserialize, JsonSchema)]
#[serde(deny_unknown_fields)]
pub struct Policies {
#[serde(default)]
pub squash_merge_only: PolicyOption,
}
#[derive(Clone, Debug, Default, Deserialize, JsonSchema)] #[derive(Clone, Debug, Default, Deserialize, JsonSchema)]
#[serde(deny_unknown_fields)] #[serde(deny_unknown_fields)]
pub struct PolicyOption { pub struct PolicyOption {

View File

@@ -1,4 +1,4 @@
use std::{path::Path, time::Duration}; use std::{collections::BTreeMap, path::Path, time::Duration};
use anyhow::Context; use anyhow::Context;
use async_trait::async_trait; use async_trait::async_trait;
@@ -8,7 +8,7 @@ use tokio_util::sync::CancellationToken;
use crate::{ use crate::{
State, State,
forge_config::{ForgeConfig, ForgeConfigType, ForgeSchedule, GitHubCredentials}, forge_config::{ForgeConfig, ForgeConfigType, ForgeSchedule, GitHubCredentials, Mode},
forges, forges,
}; };
@@ -18,6 +18,105 @@ pub struct ForgeService {
config: ForgeConfig, config: ForgeConfig,
} }
impl ForgeService {
async fn sync(&self) -> anyhow::Result<()> {
match &self.config.forge_type {
ForgeConfigType::GitHub {
credentials,
organisation,
} => {
let creds = match credentials.clone() {
GitHubCredentials::Token(token) => {
forges::github::GitHubCredentials::Token(token)
}
GitHubCredentials::TokenEnv(key) => {
let token =
std::env::var(key).context("failed to lookup github token env")?;
forges::github::GitHubCredentials::Token(token)
}
};
let client = forges::github::GitHub::new(creds);
let policies = forges::github::policies::Policies::new();
// 1. get repositories matching allow / deny list
let repos = client
.get_repositories(
organisation,
self.config.filter.allow.iter().map(|a| a.into()).collect(),
self.config.filter.deny.iter().map(|a| a.into()).collect(),
)
.await?;
for repo in repos {
let repo = client.get_repository(&repo).await?;
let repo_display = serde_json::to_string(&repo)?;
tracing::trace!(repo = repo_display, "checking for updates");
tracing::debug!(repo = ?repo.full_name, "checking policies");
let mut all_updates = BTreeMap::new();
let mut all_warnings = Vec::new();
// 2. Evaluate each enabled policy
for policy_name in self
.config
.policies
.iter()
.filter(|(_, option)| option.enabled)
.map(|(p, _)| p)
{
let policy = policies
.get_policy(policy_name)
.context(anyhow::anyhow!("failed to find policy: {policy_name}"))?;
let result = policy.evaluate(&client, &repo).await?;
all_updates.extend(result.updates);
all_warnings.extend(result.warnings);
}
// Always log warnings regardless of mode
for warning in &all_warnings {
tracing::warn!(repo = ?repo.full_name, "{warning}");
}
if all_updates.is_empty() {
if all_warnings.is_empty() {
tracing::debug!(repo = ?repo.full_name, "no policy required updating, skipping");
}
continue;
}
tracing::info!(repo = ?repo.full_name, "updating repository");
let updates_display = serde_json::to_string(&all_updates)?;
match self.config.mode {
Mode::Warn => {
tracing::error!(update = updates_display, "repository requires update");
}
Mode::Update => {
tracing::info!(update = updates_display, "repository updating");
// 3. Update repositories
client.update_repository(&repo, all_updates).await.context(
anyhow::anyhow!(
"update repository: {}",
repo.full_name.unwrap_or_default()
),
)?;
}
}
}
}
}
Ok(())
}
}
#[async_trait] #[async_trait]
impl Component for ForgeService { impl Component for ForgeService {
fn name(&self) -> Option<String> { fn name(&self) -> Option<String> {
@@ -57,39 +156,9 @@ impl nodrift::Drifter for ForgeService {
async fn execute(&self, _token: CancellationToken) -> anyhow::Result<()> { async fn execute(&self, _token: CancellationToken) -> anyhow::Result<()> {
tracing::info!("running schedule"); tracing::info!("running schedule");
match &self.config.forge_type { self.sync()
ForgeConfigType::GitHub { .await
credentials, .inspect_err(|e| tracing::warn!("failed to update repository: {e:#}"))?;
organisation,
} => {
let creds = match credentials.clone() {
GitHubCredentials::Token(token) => {
forges::github::GitHubCredentials::Token(token)
}
GitHubCredentials::TokenEnv(key) => {
let token =
std::env::var(key).context("failed to lookup github token env")?;
forges::github::GitHubCredentials::Token(token)
}
};
let client = forges::github::GitHub::new(creds);
// 1. get repositories matching allow / deny list
client
.get_repositories(
organisation,
self.config.filter.allow.iter().map(|a| a.into()).collect(),
self.config.filter.deny.iter().map(|a| a.into()).collect(),
)
.await?;
// 2. Get updates for each
// 3. Update repositories
}
}
Ok(()) Ok(())
} }

View File

@@ -1,7 +1,11 @@
use std::collections::BTreeMap;
use anyhow::Context; use anyhow::Context;
use octocrab::{Octocrab, models::Repository}; use octocrab::{Octocrab, models::Repository};
use regex::Regex; use regex::Regex;
pub mod policies;
pub struct GitHub { pub struct GitHub {
credentials: GitHubCredentials, credentials: GitHubCredentials,
client: Octocrab, client: Octocrab,
@@ -29,6 +33,14 @@ impl GitHub {
} }
} }
pub async fn get_repository(&self, repo: &Repository) -> anyhow::Result<Repository> {
self.client
.repos_by_id(repo.id)
.get()
.await
.context("repo by id")
}
pub async fn get_repositories( pub async fn get_repositories(
&self, &self,
organisation: &str, organisation: &str,
@@ -97,4 +109,47 @@ impl GitHub {
Ok(allowed_repos) Ok(allowed_repos)
} }
pub async fn file_exists(&self, repo: &Repository, path: &str) -> anyhow::Result<bool> {
let full_name = repo.full_name.as_ref().context("full name is required")?;
let parts: Vec<&str> = full_name.splitn(2, '/').collect();
anyhow::ensure!(parts.len() == 2, "invalid full_name format: {full_name}");
let (owner, name) = (parts[0], parts[1]);
match self
.client
.repos(owner, name)
.get_content()
.path(path)
.send()
.await
{
Ok(_) => Ok(true),
Err(octocrab::Error::GitHub { source, .. })
if source.status_code == http::StatusCode::NOT_FOUND =>
{
Ok(false)
}
Err(e) => Err(e.into()),
}
}
pub async fn update_repository(
&self,
repo: &Repository,
options: BTreeMap<String, serde_json::Value>,
) -> anyhow::Result<()> {
let _res: serde_json::Value = self
.client
.patch(
format!(
"/repos/{}",
repo.full_name.as_ref().context("full name is required")?
),
Some(&options),
)
.await?;
Ok(())
}
} }

View File

@@ -0,0 +1,69 @@
use std::{collections::BTreeMap, sync::Arc};
use async_trait::async_trait;
use octocrab::models::Repository;
use crate::forges::github::GitHub;
pub mod auto_merge;
pub mod has_codeowners;
pub mod squash_merge;
pub struct PolicyResult {
pub updates: BTreeMap<String, serde_json::Value>,
pub warnings: Vec<String>,
}
impl PolicyResult {
pub fn ok() -> Self {
Self {
updates: BTreeMap::new(),
warnings: Vec::new(),
}
}
pub fn warn(message: impl Into<String>) -> Self {
Self {
updates: BTreeMap::new(),
warnings: vec![message.into()],
}
}
pub fn is_empty(&self) -> bool {
self.updates.is_empty() && self.warnings.is_empty()
}
}
#[async_trait]
pub trait Policy: Send + Sync {
async fn evaluate(&self, client: &GitHub, repo: &Repository) -> anyhow::Result<PolicyResult>;
}
#[derive(Clone)]
pub struct Policies {
policies: Arc<BTreeMap<String, Arc<dyn Policy + 'static>>>,
}
impl Policies {
pub fn new() -> Self {
let mut policies: BTreeMap<String, Arc<dyn Policy + 'static>> = BTreeMap::new();
policies.insert(
"squash_merge_only".into(),
Arc::new(squash_merge::SquashMergeOnly),
);
policies.insert("allow_auto_merge".into(), Arc::new(auto_merge::AutoMerge));
policies.insert(
"has_codeowners".into(),
Arc::new(has_codeowners::HasCodeowners),
);
Self {
policies: Arc::new(policies),
}
}
pub fn get_policy(&self, policy_name: &str) -> Option<Arc<dyn Policy + 'static>> {
self.policies.get(policy_name).cloned()
}
}

View File

@@ -0,0 +1,27 @@
use std::collections::BTreeMap;
use async_trait::async_trait;
use octocrab::models::Repository;
use crate::forges::github::GitHub;
use crate::forges::github::policies::{Policy, PolicyResult};
pub struct AutoMerge;
#[async_trait]
impl Policy for AutoMerge {
async fn evaluate(&self, _client: &GitHub, repo: &Repository) -> anyhow::Result<PolicyResult> {
if repo.allow_auto_merge.unwrap_or_default() {
tracing::trace!("already has allow auto merge: {:?}", repo.allow_auto_merge);
return Ok(PolicyResult::ok());
}
Ok(PolicyResult {
updates: BTreeMap::from([(
"allow_auto_merge".to_string(),
serde_json::Value::Bool(true),
)]),
warnings: Vec::new(),
})
}
}

View File

@@ -0,0 +1,31 @@
use async_trait::async_trait;
use octocrab::models::Repository;
use crate::forges::github::GitHub;
use crate::forges::github::policies::{Policy, PolicyResult};
const CODEOWNERS_PATHS: &[&str] = &["CODEOWNERS", ".github/CODEOWNERS", "docs/CODEOWNERS"];
pub struct HasCodeowners;
#[async_trait]
impl Policy for HasCodeowners {
async fn evaluate(&self, client: &GitHub, repo: &Repository) -> anyhow::Result<PolicyResult> {
for path in CODEOWNERS_PATHS {
if client.file_exists(repo, path).await? {
tracing::trace!(
repo = ?repo.full_name,
path,
"CODEOWNERS file found"
);
return Ok(PolicyResult::ok());
}
}
let repo_name = repo.full_name.as_deref().unwrap_or(&repo.name);
Ok(PolicyResult::warn(format!(
"{repo_name}: no CODEOWNERS file found (checked: {})",
CODEOWNERS_PATHS.join(", ")
)))
}
}

View File

@@ -0,0 +1,48 @@
use std::collections::BTreeMap;
use async_trait::async_trait;
use octocrab::models::Repository;
use serde_json::Value;
use crate::forges::github::GitHub;
use crate::forges::github::policies::{Policy, PolicyResult};
pub struct SquashMergeOnly;
#[async_trait]
impl Policy for SquashMergeOnly {
async fn evaluate(&self, _client: &GitHub, repo: &Repository) -> anyhow::Result<PolicyResult> {
let mut updates = BTreeMap::new();
if !repo.allow_squash_merge.unwrap_or_default() {
tracing::trace!(
"repo requires squash merge update: {:?}",
repo.allow_squash_merge
);
updates.insert("allow_squash_merge".to_string(), Value::Bool(true));
updates.insert(
"squash_merge_commit_title".into(),
Value::String("PR_TITLE".into()),
);
updates.insert(
"squash_merge_commit_message".into(),
Value::String("PR_BODY".into()),
);
}
if !repo.allow_merge_commit.unwrap_or(true) {
tracing::trace!(
"repo requires disabling merge commit: {:?}",
repo.allow_merge_commit
);
updates.insert("allow_merge_commit".into(), Value::Bool(false));
}
Ok(PolicyResult {
updates,
warnings: Vec::new(),
})
}
}

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1,16 @@
#:schema ../schema.json
mode = "warn"
[github]
organisation = "understory-io"
credentials.token_env = "GITHUB_ACCESS_TOKEN"
[filter]
allow = ["^canopy-.*$"]
[schedule]
once = true
[policies]
has_codeowners.enabled = true

View File

@@ -1,17 +1,18 @@
#:schema ../schema.json #:schema ../schema.json
mode = "update"
[github] [github]
organisation = "understory-io" organisation = "understory-io"
credentials.token_env = "GITHUB_ACCESS_TOKEN" credentials.token_env = "GITHUB_ACCESS_TOKEN"
[filter] [filter]
allow = ["^canopy-.*$"] allow = ["^canopy-data-gateway$"]
deny = ["^infrastructure-.*$", "^canopy-data-gateway$"] # deny = ["^infrastructure-.*$", "^canopy-data-gateway$"]
[schedule] [schedule]
once = true once = true
[policies] [policies]
squash_merge_only.enabled = true squash_merge_only.enabled = true
allow_auto_merge.enabled = true

View File

@@ -7,7 +7,10 @@
"$ref": "#/$defs/Filter" "$ref": "#/$defs/Filter"
}, },
"policies": { "policies": {
"$ref": "#/$defs/Policies" "type": "object",
"additionalProperties": {
"$ref": "#/$defs/PolicyOption"
}
}, },
"schedule": { "schedule": {
"$ref": "#/$defs/ForgeSchedule" "$ref": "#/$defs/ForgeSchedule"
@@ -137,15 +140,6 @@
} }
] ]
}, },
"Policies": {
"type": "object",
"properties": {
"squash_merge_only": {
"$ref": "#/$defs/PolicyOption"
}
},
"additionalProperties": false
},
"PolicyOption": { "PolicyOption": {
"type": "object", "type": "object",
"properties": { "properties": {