This commit is contained in:
Tsuki 2024-02-28 18:09:29 +08:00
parent 42d333a0ec
commit 5aa6ab9fae
9 changed files with 1007 additions and 36 deletions

667
Cargo.lock generated
View File

@ -47,6 +47,12 @@ version = "1.0.80"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1"
[[package]]
name = "ascii"
version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e"
[[package]] [[package]]
name = "async-trait" name = "async-trait"
version = "0.1.77" version = "0.1.77"
@ -79,6 +85,18 @@ dependencies = [
"rustc-demangle", "rustc-demangle",
] ]
[[package]]
name = "base64"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
[[package]]
name = "base64"
version = "0.21.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
[[package]] [[package]]
name = "bitflags" name = "bitflags"
version = "1.3.2" version = "1.3.2"
@ -169,10 +187,24 @@ dependencies = [
"iana-time-zone", "iana-time-zone",
"js-sys", "js-sys",
"num-traits", "num-traits",
"serde",
"wasm-bindgen", "wasm-bindgen",
"windows-targets 0.52.0", "windows-targets 0.52.0",
] ]
[[package]]
name = "combine"
version = "3.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680"
dependencies = [
"ascii",
"byteorder",
"either",
"memchr",
"unreachable",
]
[[package]] [[package]]
name = "const-random" name = "const-random"
version = "0.1.17" version = "0.1.17"
@ -193,6 +225,16 @@ dependencies = [
"tiny-keccak", "tiny-keccak",
] ]
[[package]]
name = "core-foundation"
version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"
dependencies = [
"core-foundation-sys",
"libc",
]
[[package]] [[package]]
name = "core-foundation-sys" name = "core-foundation-sys"
version = "0.8.6" version = "0.8.6"
@ -208,12 +250,89 @@ dependencies = [
"cfg-if", "cfg-if",
] ]
[[package]]
name = "cron"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ff76b51e4c068c52bfd2866e1567bee7c567ae8f24ada09fd4307019e25eab7"
dependencies = [
"chrono",
"nom",
"once_cell",
]
[[package]] [[package]]
name = "crunchy" name = "crunchy"
version = "0.2.2" 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 = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
[[package]]
name = "darling"
version = "0.14.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850"
dependencies = [
"darling_core",
"darling_macro",
]
[[package]]
name = "darling_core"
version = "0.14.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0"
dependencies = [
"fnv",
"ident_case",
"proc-macro2",
"quote",
"strsim",
"syn 1.0.109",
]
[[package]]
name = "darling_macro"
version = "0.14.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e"
dependencies = [
"darling_core",
"quote",
"syn 1.0.109",
]
[[package]]
name = "derive_builder"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3"
dependencies = [
"derive_builder_macro",
]
[[package]]
name = "derive_builder_core"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4"
dependencies = [
"darling",
"proc-macro2",
"quote",
"syn 1.0.109",
]
[[package]]
name = "derive_builder_macro"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68"
dependencies = [
"derive_builder_core",
"syn 1.0.109",
]
[[package]] [[package]]
name = "dirs" name = "dirs"
version = "5.0.1" version = "5.0.1"
@ -232,7 +351,7 @@ dependencies = [
"libc", "libc",
"option-ext", "option-ext",
"redox_users", "redox_users",
"windows-sys", "windows-sys 0.48.0",
] ]
[[package]] [[package]]
@ -244,6 +363,21 @@ dependencies = [
"const-random", "const-random",
] ]
[[package]]
name = "either"
version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a"
[[package]]
name = "encoding_rs"
version = "0.8.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1"
dependencies = [
"cfg-if",
]
[[package]] [[package]]
name = "equivalent" name = "equivalent"
version = "1.0.1" version = "1.0.1"
@ -283,6 +417,12 @@ dependencies = [
"spin", "spin",
] ]
[[package]]
name = "fnv"
version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]] [[package]]
name = "form_urlencoded" name = "form_urlencoded"
version = "1.2.1" version = "1.2.1"
@ -447,6 +587,15 @@ dependencies = [
"system-deps", "system-deps",
] ]
[[package]]
name = "getopts"
version = "0.2.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5"
dependencies = [
"unicode-width",
]
[[package]] [[package]]
name = "getrandom" name = "getrandom"
version = "0.2.12" version = "0.2.12"
@ -514,6 +663,32 @@ dependencies = [
"url", "url",
] ]
[[package]]
name = "gitlab"
version = "0.1609.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5640bb3c6ee4d4e53188329d2d424ea6d546b188b92e1cfe3785fcda3801b4c4"
dependencies = [
"async-trait",
"base64 0.13.1",
"bytes",
"chrono",
"cron",
"derive_builder",
"futures-util",
"graphql_client",
"http",
"itertools",
"log",
"percent-encoding",
"reqwest",
"serde",
"serde_json",
"serde_urlencoded",
"thiserror",
"url",
]
[[package]] [[package]]
name = "glib" name = "glib"
version = "0.17.10" version = "0.17.10"
@ -602,6 +777,64 @@ dependencies = [
"system-deps", "system-deps",
] ]
[[package]]
name = "graphql-introspection-query"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f2a4732cf5140bd6c082434494f785a19cfb566ab07d1382c3671f5812fed6d"
dependencies = [
"serde",
]
[[package]]
name = "graphql-parser"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2ebc8013b4426d5b81a4364c419a95ed0b404af2b82e2457de52d9348f0e474"
dependencies = [
"combine",
"thiserror",
]
[[package]]
name = "graphql_client"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fc16d75d169fddb720d8f1c7aed6413e329e1584079b9734ff07266a193f5bc"
dependencies = [
"graphql_query_derive",
"serde",
"serde_json",
]
[[package]]
name = "graphql_client_codegen"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f290ecfa3bea3e8a157899dc8a1d96ee7dd6405c18c8ddd213fc58939d18a0e9"
dependencies = [
"graphql-introspection-query",
"graphql-parser",
"heck",
"lazy_static",
"proc-macro2",
"quote",
"serde",
"serde_json",
"syn 1.0.109",
]
[[package]]
name = "graphql_query_derive"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a755cc59cda2641ea3037b4f9f7ef40471c329f55c1fa2db6fa0bb7ae6c1f7ce"
dependencies = [
"graphql_client_codegen",
"proc-macro2",
"syn 1.0.109",
]
[[package]] [[package]]
name = "gsk4" name = "gsk4"
version = "0.6.3" version = "0.6.3"
@ -708,6 +941,25 @@ dependencies = [
"zvariant", "zvariant",
] ]
[[package]]
name = "h2"
version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9"
dependencies = [
"bytes",
"fnv",
"futures-core",
"futures-sink",
"futures-util",
"http",
"indexmap",
"slab",
"tokio",
"tokio-util",
"tracing",
]
[[package]] [[package]]
name = "hashbrown" name = "hashbrown"
version = "0.14.3" version = "0.14.3"
@ -726,6 +978,78 @@ version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd" checksum = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd"
[[package]]
name = "http"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb"
dependencies = [
"bytes",
"fnv",
"itoa",
]
[[package]]
name = "http-body"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2"
dependencies = [
"bytes",
"http",
"pin-project-lite",
]
[[package]]
name = "httparse"
version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904"
[[package]]
name = "httpdate"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
[[package]]
name = "hyper"
version = "0.14.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80"
dependencies = [
"bytes",
"futures-channel",
"futures-core",
"futures-util",
"h2",
"http",
"http-body",
"httparse",
"httpdate",
"itoa",
"pin-project-lite",
"socket2",
"tokio",
"tower-service",
"tracing",
"want",
]
[[package]]
name = "hyper-rustls"
version = "0.24.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590"
dependencies = [
"futures-util",
"http",
"hyper",
"rustls",
"tokio",
"tokio-rustls",
]
[[package]] [[package]]
name = "iana-time-zone" name = "iana-time-zone"
version = "0.1.60" version = "0.1.60"
@ -749,6 +1073,12 @@ dependencies = [
"cc", "cc",
] ]
[[package]]
name = "ident_case"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
[[package]] [[package]]
name = "idna" name = "idna"
version = "0.4.0" version = "0.4.0"
@ -785,6 +1115,21 @@ dependencies = [
"hashbrown", "hashbrown",
] ]
[[package]]
name = "ipnet"
version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3"
[[package]]
name = "itertools"
version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
dependencies = [
"either",
]
[[package]] [[package]]
name = "itoa" name = "itoa"
version = "1.0.10" version = "1.0.10"
@ -936,6 +1281,18 @@ dependencies = [
"autocfg", "autocfg",
] ]
[[package]]
name = "mime"
version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
[[package]]
name = "minimal-lexical"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]] [[package]]
name = "miniz_oxide" name = "miniz_oxide"
version = "0.7.2" version = "0.7.2"
@ -953,7 +1310,7 @@ checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09"
dependencies = [ dependencies = [
"libc", "libc",
"wasi", "wasi",
"windows-sys", "windows-sys 0.48.0",
] ]
[[package]] [[package]]
@ -965,6 +1322,16 @@ dependencies = [
"getrandom", "getrandom",
] ]
[[package]]
name = "nom"
version = "7.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
dependencies = [
"memchr",
"minimal-lexical",
]
[[package]] [[package]]
name = "num-traits" name = "num-traits"
version = "0.2.18" version = "0.2.18"
@ -1169,6 +1536,25 @@ dependencies = [
"unicode-ident", "unicode-ident",
] ]
[[package]]
name = "pulldown-cmark"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dce76ce678ffc8e5675b22aa1405de0b7037e2fdf8913fea40d1926c6fe1e6e7"
dependencies = [
"bitflags 2.4.2",
"getopts",
"memchr",
"pulldown-cmark-escape",
"unicase",
]
[[package]]
name = "pulldown-cmark-escape"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5d8f9aa0e3cbcfaf8bf00300004ee3b72f74770f9cbac93f6928771f613276b"
[[package]] [[package]]
name = "quick-xml" name = "quick-xml"
version = "0.29.0" version = "0.29.0"
@ -1276,6 +1662,62 @@ dependencies = [
"syn 2.0.50", "syn 2.0.50",
] ]
[[package]]
name = "reqwest"
version = "0.11.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251"
dependencies = [
"base64 0.21.7",
"bytes",
"encoding_rs",
"futures-core",
"futures-util",
"h2",
"http",
"http-body",
"hyper",
"hyper-rustls",
"ipnet",
"js-sys",
"log",
"mime",
"once_cell",
"percent-encoding",
"pin-project-lite",
"rustls",
"rustls-pemfile",
"serde",
"serde_json",
"serde_urlencoded",
"sync_wrapper",
"system-configuration",
"tokio",
"tokio-rustls",
"tower-service",
"url",
"wasm-bindgen",
"wasm-bindgen-futures",
"web-sys",
"webpki-roots",
"winreg",
]
[[package]]
name = "ring"
version = "0.17.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d"
dependencies = [
"cc",
"cfg-if",
"getrandom",
"libc",
"spin",
"untrusted",
"windows-sys 0.52.0",
]
[[package]] [[package]]
name = "rsproject" name = "rsproject"
version = "0.1.0" version = "0.1.0"
@ -1283,11 +1725,13 @@ dependencies = [
"chrono", "chrono",
"dirs", "dirs",
"git2", "git2",
"gitlab",
"glib-build-tools", "glib-build-tools",
"gtk4", "gtk4",
"lazy_static", "lazy_static",
"libadwaita", "libadwaita",
"once_cell", "once_cell",
"pulldown-cmark",
"regex", "regex",
"relm4", "relm4",
"relm4-icons", "relm4-icons",
@ -1297,6 +1741,7 @@ dependencies = [
"tokio", "tokio",
"toml", "toml",
"tracker", "tracker",
"url",
"validator", "validator",
] ]
@ -1325,6 +1770,37 @@ dependencies = [
"semver", "semver",
] ]
[[package]]
name = "rustls"
version = "0.21.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba"
dependencies = [
"log",
"ring",
"rustls-webpki",
"sct",
]
[[package]]
name = "rustls-pemfile"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c"
dependencies = [
"base64 0.21.7",
]
[[package]]
name = "rustls-webpki"
version = "0.101.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765"
dependencies = [
"ring",
"untrusted",
]
[[package]] [[package]]
name = "ryu" name = "ryu"
version = "1.0.17" version = "1.0.17"
@ -1352,6 +1828,16 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "sct"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414"
dependencies = [
"ring",
"untrusted",
]
[[package]] [[package]]
name = "semver" name = "semver"
version = "1.0.22" version = "1.0.22"
@ -1398,6 +1884,18 @@ dependencies = [
"serde", "serde",
] ]
[[package]]
name = "serde_urlencoded"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
dependencies = [
"form_urlencoded",
"itoa",
"ryu",
"serde",
]
[[package]] [[package]]
name = "signal-hook-registry" name = "signal-hook-registry"
version = "1.4.1" version = "1.4.1"
@ -1429,7 +1927,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9"
dependencies = [ dependencies = [
"libc", "libc",
"windows-sys", "windows-sys 0.48.0",
] ]
[[package]] [[package]]
@ -1447,6 +1945,12 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]]
name = "strsim"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
[[package]] [[package]]
name = "syn" name = "syn"
version = "1.0.109" version = "1.0.109"
@ -1469,6 +1973,33 @@ dependencies = [
"unicode-ident", "unicode-ident",
] ]
[[package]]
name = "sync_wrapper"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"
[[package]]
name = "system-configuration"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7"
dependencies = [
"bitflags 1.3.2",
"core-foundation",
"system-configuration-sys",
]
[[package]]
name = "system-configuration-sys"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9"
dependencies = [
"core-foundation-sys",
"libc",
]
[[package]] [[package]]
name = "system-deps" name = "system-deps"
version = "6.2.0" version = "6.2.0"
@ -1548,7 +2079,7 @@ dependencies = [
"signal-hook-registry", "signal-hook-registry",
"socket2", "socket2",
"tokio-macros", "tokio-macros",
"windows-sys", "windows-sys 0.48.0",
] ]
[[package]] [[package]]
@ -1562,6 +2093,30 @@ dependencies = [
"syn 2.0.50", "syn 2.0.50",
] ]
[[package]]
name = "tokio-rustls"
version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081"
dependencies = [
"rustls",
"tokio",
]
[[package]]
name = "tokio-util"
version = "0.7.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15"
dependencies = [
"bytes",
"futures-core",
"futures-sink",
"pin-project-lite",
"tokio",
"tracing",
]
[[package]] [[package]]
name = "toml" name = "toml"
version = "0.8.10" version = "0.8.10"
@ -1607,6 +2162,12 @@ dependencies = [
"winnow 0.6.2", "winnow 0.6.2",
] ]
[[package]]
name = "tower-service"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52"
[[package]] [[package]]
name = "tracing" name = "tracing"
version = "0.1.40" version = "0.1.40"
@ -1658,6 +2219,21 @@ dependencies = [
"syn 2.0.50", "syn 2.0.50",
] ]
[[package]]
name = "try-lock"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
[[package]]
name = "unicase"
version = "2.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89"
dependencies = [
"version_check",
]
[[package]] [[package]]
name = "unicode-bidi" name = "unicode-bidi"
version = "0.3.15" version = "0.3.15"
@ -1679,6 +2255,27 @@ dependencies = [
"tinyvec", "tinyvec",
] ]
[[package]]
name = "unicode-width"
version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85"
[[package]]
name = "unreachable"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56"
dependencies = [
"void",
]
[[package]]
name = "untrusted"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
[[package]] [[package]]
name = "url" name = "url"
version = "2.5.0" version = "2.5.0"
@ -1750,6 +2347,12 @@ version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
[[package]]
name = "void"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
[[package]] [[package]]
name = "walkdir" name = "walkdir"
version = "2.4.0" version = "2.4.0"
@ -1760,6 +2363,15 @@ dependencies = [
"winapi-util", "winapi-util",
] ]
[[package]]
name = "want"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"
dependencies = [
"try-lock",
]
[[package]] [[package]]
name = "wasi" name = "wasi"
version = "0.11.0+wasi-snapshot-preview1" version = "0.11.0+wasi-snapshot-preview1"
@ -1791,6 +2403,18 @@ dependencies = [
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
[[package]]
name = "wasm-bindgen-futures"
version = "0.4.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97"
dependencies = [
"cfg-if",
"js-sys",
"wasm-bindgen",
"web-sys",
]
[[package]] [[package]]
name = "wasm-bindgen-macro" name = "wasm-bindgen-macro"
version = "0.2.91" version = "0.2.91"
@ -1820,6 +2444,22 @@ version = "0.2.91"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838"
[[package]]
name = "web-sys"
version = "0.3.68"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446"
dependencies = [
"js-sys",
"wasm-bindgen",
]
[[package]]
name = "webpki-roots"
version = "0.25.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1"
[[package]] [[package]]
name = "winapi" name = "winapi"
version = "0.3.9" version = "0.3.9"
@ -1869,6 +2509,15 @@ dependencies = [
"windows-targets 0.48.5", "windows-targets 0.48.5",
] ]
[[package]]
name = "windows-sys"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
dependencies = [
"windows-targets 0.52.0",
]
[[package]] [[package]]
name = "windows-targets" name = "windows-targets"
version = "0.48.5" version = "0.48.5"
@ -2001,6 +2650,16 @@ dependencies = [
"memchr", "memchr",
] ]
[[package]]
name = "winreg"
version = "0.50.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1"
dependencies = [
"cfg-if",
"windows-sys 0.48.0",
]
[[package]] [[package]]
name = "zvariant" name = "zvariant"
version = "3.15.0" version = "3.15.0"

View File

@ -23,6 +23,10 @@ thiserror = "1.0.57"
once_cell = "1.19.0" once_cell = "1.19.0"
tokio = { version = "1.36.0",features = ["full"] } tokio = { version = "1.36.0",features = ["full"] }
rust-ini = "*" rust-ini = "*"
gitlab = "0.1609.0"
url = "2.5.0"
pulldown-cmark = "0.10.0"
[build-dependencies] [build-dependencies]
glib-build-tools = "0.17.0" glib-build-tools = "0.17.0"

View File

@ -1,9 +1,13 @@
use crate::utils::ini_to_table; use crate::utils::{get_alg_info_from_gitlab, ini_to_table};
use crate::CONFIG;
use adw::prelude::*; use adw::prelude::*;
use gtk::glib::clone;
use gtk::glib::PropertyGet;
use gtk::prelude::*; use gtk::prelude::*;
use gtk::ListItem; use gtk::ListItem;
use ini::Ini; use ini::Ini;
use relm4::{component, component::Component, ComponentParts, ComponentSender}; use relm4::binding::{BoolBinding, U8Binding};
use relm4::{component, component::Component, ComponentController, ComponentParts, ComponentSender};
use relm4::{ use relm4::{
factory::FactoryView, factory::FactoryView,
prelude::{DynamicIndex, FactoryComponent}, prelude::{DynamicIndex, FactoryComponent},
@ -11,16 +15,19 @@ use relm4::{
view, FactorySender, RelmObjectExt, view, FactorySender, RelmObjectExt,
}; };
use std::collections::HashMap; use std::collections::HashMap;
use relm4::binding::{BoolBinding, U8Binding}; use crate::components::package_detail::PackageDetail;
#[derive(Debug)] #[derive(Debug)]
pub struct AlgPage { pub struct AlgPage {
session: gitlab::Gitlab,
alg_list: TypedColumnView<AlgListItem, gtk::SingleSelection>, alg_list: TypedColumnView<AlgListItem, gtk::SingleSelection>,
} }
#[derive(Debug)] #[derive(Debug)]
pub enum AlgPageMsg { pub enum AlgPageMsg {
New(Ini), New(Ini),
Detail(u32),
None
} }
#[component(pub)] #[component(pub)]
@ -32,18 +39,20 @@ impl Component for AlgPage {
view! { view! {
#[root] #[root]
gtk::Box{ gtk::Grid{
gtk::ScrolledWindow{ set_column_homogeneous:true,
attach[0,0,1,1]=&gtk::ScrolledWindow{
#[local_ref] #[local_ref]
#[wrap(Some)] #[wrap(Some)]
set_child=list_view -> gtk::ColumnView{ set_child=list_view -> gtk::ColumnView{
set_hexpand:true,
set_vexpand:true, set_vexpand:true,
set_show_column_separators: true, set_show_column_separators: true,
set_show_row_separators: true, set_show_row_separators: true,
set_enable_rubberband:true, set_enable_rubberband:true
} }
} },
#[name="detail"]
attach[1,0,1,1]=&gtk::ScrolledWindow{}
} }
} }
@ -52,49 +61,89 @@ impl Component for AlgPage {
root: &Self::Root, root: &Self::Root,
sender: ComponentSender<Self>, sender: ComponentSender<Self>,
) -> ComponentParts<Self> { ) -> ComponentParts<Self> {
let mut alg_list = TypedColumnView::new(); let mut alg_list: TypedColumnView<AlgListItem, gtk::SingleSelection> =
TypedColumnView::new();
alg_list.append_column::<NameColumn>(); alg_list.append_column::<NameColumn>();
alg_list.append_column::<RepoColumn>();
alg_list.append_column::<VersionColumn>(); alg_list.append_column::<VersionColumn>();
alg_list.append_column::<DescriptionColumn>(); alg_list.append_column::<DescriptionColumn>();
alg_list.append_column::<TagColumn>(); alg_list.append_column::<TagColumn>();
alg_list.append_column::<SelectColumn>(); alg_list.append_column::<SelectColumn>();
let model = AlgPage { alg_list }; alg_list
.selection_model
.connect_selected_notify(clone!(@strong sender => move |s| {
let pos = s.selected();
sender.input(AlgPageMsg::Detail(pos));
}));
let (key, source) = {
let config = CONFIG.lock().unwrap();
(config.gitlab_key.clone(), config.alg_source.clone())
};
let session = gitlab::Gitlab::new_insecure(source.as_str(), key.unwrap().as_str()).unwrap();
let model = AlgPage { alg_list, session };
let list_view = &model.alg_list.view; let list_view = &model.alg_list.view;
let widgets = view_output!(); let widgets = view_output!();
ComponentParts { model, widgets } ComponentParts { model, widgets }
} }
fn update(&mut self, message: Self::Input, sender: ComponentSender<Self>, root: &Self::Root) { fn update_with_view(
&mut self,
widgets: &mut Self::Widgets,
message: Self::Input,
sender: ComponentSender<Self>,
root: &Self::Root,
) {
match message { match message {
AlgPageMsg::New(ini) => { AlgPageMsg::New(ini) => {
let lists = ini_to_table(&ini); let lists = ini_to_table(&ini);
for list in lists { for list in lists {
let item = AlgListItem::new(list.0, list.1, "".to_string(), list.2); let item = AlgListItem::new(list.name, list.version, "".to_string(), list.tag, list.repo);
self.alg_list.append(item); self.alg_list.append(item);
} }
} }
AlgPageMsg::Detail(pos) => {
use pulldown_cmark::{html, Options, Parser};
let item = self.alg_list.get(pos).unwrap();
let project = get_alg_info_from_gitlab(
&self.session,
item.borrow().repo.clone(),
);
if let Ok(project) = project {
let new_detail = PackageDetail::builder().launch(project).forward(sender.input_sender(), |a| AlgPageMsg::None);
widgets.detail.set_child(
Some(new_detail.widget())
);
}
}
_ => {}
} }
self.update_view(widgets, sender);
} }
} }
#[derive(Debug, PartialEq, Eq)] #[derive(Debug, PartialEq, Eq)]
pub(super) struct AlgListItem { pub(super) struct AlgListItem {
name: String, name: String,
repo: String,
description: String, description: String,
version: String, version: String,
tag: String, tag: String,
selected: BoolBinding selected: BoolBinding,
} }
impl AlgListItem { impl AlgListItem {
pub fn new(name: String, version: String, description: String, tag: String) -> Self { pub fn new(name: String, version: String, description: String, tag: String, repo: String) -> Self {
Self { Self {
name, name,
version, version,
description, description,
tag, tag,
selected: BoolBinding::new(true) repo,
selected: BoolBinding::new(true),
} }
} }
} }
@ -103,6 +152,7 @@ pub(super) struct NameColumn;
pub(super) struct VersionColumn; pub(super) struct VersionColumn;
pub(super) struct DescriptionColumn; pub(super) struct DescriptionColumn;
pub(super) struct TagColumn; pub(super) struct TagColumn;
pub(super) struct RepoColumn;
pub(super) struct SelectColumn; pub(super) struct SelectColumn;
pub struct SelectWidgetColumn { pub struct SelectWidgetColumn {
@ -116,7 +166,9 @@ impl RelmColumn for SelectColumn {
const COLUMN_NAME: &'static str = "Select"; const COLUMN_NAME: &'static str = "Select";
fn bind(_item: &mut Self::Item, _widgets: &mut Self::Widgets, _root: &mut Self::Root) { fn bind(_item: &mut Self::Item, _widgets: &mut Self::Widgets, _root: &mut Self::Root) {
_widgets.select.add_write_only_binding(&_item.selected.clone(), "active"); _widgets
.select
.add_write_only_binding(&_item.selected.clone(), "active");
} }
fn setup(list_item: &ListItem) -> (Self::Root, Self::Widgets) { fn setup(list_item: &ListItem) -> (Self::Root, Self::Widgets) {
@ -149,6 +201,21 @@ impl LabelColumn for TagColumn {
} }
} }
impl LabelColumn for RepoColumn {
type Item = AlgListItem;
type Value = String;
const COLUMN_NAME: &'static str = "Repo";
const ENABLE_SORT: bool = true;
fn get_cell_value(item: &Self::Item) -> Self::Value {
item.repo.clone()
}
fn format_cell_value(value: &Self::Value) -> String {
format!("{}", value)
}
}
impl LabelColumn for NameColumn { impl LabelColumn for NameColumn {
type Item = AlgListItem; type Item = AlgListItem;
type Value = String; type Value = String;

View File

@ -4,6 +4,7 @@ mod history_list;
mod new_project; mod new_project;
mod setting_item; mod setting_item;
mod alert; mod alert;
mod package_detail;
pub use app::*; pub use app::*;
pub use new_project::*; pub use new_project::*;

View File

@ -0,0 +1,97 @@
use adw::prelude::*;
use gitlab::Project;
use gtk::prelude::*;
use relm4::{
component, prelude::*, ComponentBuilder, ComponentParts, ComponentSender, SimpleComponent,
};
#[derive(Debug)]
pub struct PackageDetail {}
#[component(pub)]
impl SimpleComponent for PackageDetail {
type Init = Project;
type Input = ();
type Output = ();
view! {
#[root]
gtk::Box{
set_orientation: gtk::Orientation::Vertical,
set_halign: gtk::Align::Start,
set_margin_horizontal:10,
set_margin_vertical: 15,
set_spacing: 10,
gtk::Box{
set_spacing: 5,
#[name = "name"]
gtk::Label{
add_css_class: "h1",
set_halign: gtk::Align::Start,
set_label: &init.name,
},
#[name = "id"]
gtk::Label{
set_halign: gtk::Align::Start,
set_label: &init.id.to_string(),
},
gtk::Label{
set_halign: gtk::Align::Start,
set_markup: &format!("<b>archived:</b> {}", &init.archived),
}
},
gtk::Label{
set_markup: &format!("<b>Last Activated:</b> {}", &init.last_activity_at),
set_halign: gtk::Align::Start,
},
gtk::Box{
gtk::Label{
set_markup: "<b>Description:</b>",
set_halign: gtk::Align::Start,
},
#[name = "description"]
gtk::Label{
set_halign: gtk::Align::Start,
set_label: &init.description.unwrap_or("".to_string()),
}
},
gtk::Box{
gtk::Label{
set_markup: "<b>homepage:</b>",
set_halign: gtk::Align::Start,
},
#[name = "homepage"]
gtk::Label{
set_label: &init.web_url,
set_halign: gtk::Align::Start,
}
}
,
}
}
fn init(
init: Self::Init,
root: &Self::Root,
sender: ComponentSender<Self>,
) -> ComponentParts<Self> {
let model = PackageDetail {};
let widgets = view_output!();
ComponentParts { model, widgets }
}
fn update(&mut self, message: Self::Input, sender: ComponentSender<Self>) {
todo!()
}
}
#[relm4::widget_template]
impl WidgetTemplate for SinglePackageDetail {
view! {
gtk::Spinner {
set_spinning: true,
}
}
}

View File

@ -1,3 +1,4 @@
use gitlab::RestError;
use thiserror::Error; use thiserror::Error;
#[derive(Debug, Error)] #[derive(Debug, Error)]
@ -18,4 +19,10 @@ pub enum SourceError {
SyncError(#[from] git2::Error), SyncError(#[from] git2::Error),
#[error("can't sync cause of {0}")] #[error("can't sync cause of {0}")]
TokioError(#[from] tokio::task::JoinError), TokioError(#[from] tokio::task::JoinError),
#[error("can't load gitlab info cause of {0}.")]
GitlabError(#[from] gitlab::GitlabError),
#[error("can't load gitlab info cause of {0}.")]
ApiError(#[from] gitlab::api::ApiError<RestError>),
#[error("can't load gitlab info.")]
CantLocateDefaultConfig,
} }

View File

@ -5,11 +5,14 @@ use std::collections::HashMap;
use std::env; use std::env;
use std::io::Write; use std::io::Write;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use url::Url;
#[derive(Debug, Serialize, Deserialize)] #[derive(Debug, Serialize, Deserialize)]
pub struct Config { pub struct Config {
pub alg_list_repo: String, pub alg_list_repo: String,
pub source_list_loc: PathBuf, pub source_list_loc: PathBuf,
pub alg_source: String,
pub gitlab_key: Option<String>
} }
impl Default for Config { impl Default for Config {
@ -18,6 +21,8 @@ impl Default for Config {
Self { Self {
alg_list_repo: "http://192.168.1.70:6020/awesomeradaralgorithms/lts.git".to_string(), alg_list_repo: "http://192.168.1.70:6020/awesomeradaralgorithms/lts.git".to_string(),
source_list_loc: default_source_list_loc, source_list_loc: default_source_list_loc,
alg_source: "http://192.168.1.70:6020".to_string(),
gitlab_key: None
} }
} }
} }
@ -29,12 +34,13 @@ impl Config {
} }
pub fn from_env() -> Result<Self, SettingError> { pub fn from_env() -> Result<Self, SettingError> {
if let Some(dir_path) = env::var("RADARG_CONFIG") if let Some(dir_path) = env::var("RSP_CONFIG")
.ok() .ok()
.map(|x| PathBuf::from(x)) .map(|x| PathBuf::from(x))
.or(dirs::config_dir()) .or(dirs::config_dir())
{ {
let path = dir_path.join("rsp.toml"); let path = dir_path.join("rsp.toml");
println!("{:?}", path);
if path.exists() { if path.exists() {
return Ok(Self::from_file(path)?); return Ok(Self::from_file(path)?);
} else { } else {

View File

@ -1,8 +1,10 @@
use crate::error::SourceError; use crate::error::SourceError;
use crate::CONFIG; use crate::CONFIG;
use git2::{Cred, FetchOptions, RemoteCallbacks, Repository}; use git2::{Cred, FetchOptions, MergeOptions, RemoteCallbacks, Repository};
use gitlab::{Gitlab, Project};
use ini::Ini; use ini::Ini;
use std::path::PathBuf; use std::path::PathBuf;
use git2::build::CheckoutBuilder;
use tokio::task; use tokio::task;
pub async fn get_alg_lists() -> Result<Vec<PathBuf>, SourceError> { pub async fn get_alg_lists() -> Result<Vec<PathBuf>, SourceError> {
@ -39,6 +41,14 @@ pub async fn get_alg_lists() -> Result<Vec<PathBuf>, SourceError> {
None, None,
) )
.unwrap(); .unwrap();
let fetch_head = repo.find_reference("FETCH_HEAD")?;
let fetch_commit = repo.reference_to_annotated_commit(&fetch_head)?;
let mut merge_options = MergeOptions::new();
let mut checkout_builder = CheckoutBuilder::new();
// 执行合并操作
repo.merge(&[&fetch_commit],Some(&mut merge_options), Some(&mut checkout_builder))?;
} }
} }
repo repo
@ -58,21 +68,49 @@ pub async fn get_alg_lists() -> Result<Vec<PathBuf>, SourceError> {
Ok(list) Ok(list)
} }
pub fn ini_to_table(ini: &Ini) -> Vec<(String, String, String)> { pub struct PackageInfo {
pub name: String,
pub repo: String,
pub version: String,
pub tag: String,
}
pub fn ini_to_table(ini: &Ini) -> Vec<PackageInfo> {
let mut result = Vec::new(); let mut result = Vec::new();
let lib_sec = ini.section(Some("lib")); for (sec, p) in ini.iter() {
let alg_sec = ini.section(Some("algorithms")); if sec.is_none() {
continue;
if let Some(lib) = lib_sec {
for (key, value) in lib.iter() {
result.push((key.to_string(), value.to_string(), "lib".to_string()));
}
}
if let Some(alg) = alg_sec {
for (key, value) in alg.iter() {
result.push((key.to_string(), value.to_string(), "algorithms".to_string()));
} }
result.push(PackageInfo{
name: sec.unwrap().to_string(),
repo: p.get("repo").unwrap_or(&"".to_string()).to_string(),
version: p.get("version").unwrap_or("1.0").to_string(),
tag: p.get("type").unwrap_or(&"".to_string()).to_string(),
})
} }
result result
} }
pub fn get_alg_info_from_gitlab(
session: &Gitlab,
alg_name: String,
) -> Result<Project, SourceError> {
use gitlab::api::{self, projects, Query};
use gitlab::Gitlab;
let (key, alg_source) = {
let config = CONFIG.lock().unwrap();
(config.gitlab_key.clone(), config.alg_source.clone())
};
if key.is_none() {
return Err(SourceError::CantLocateDefaultConfig);
}
let endpoint = projects::Project::builder()
.project(alg_name)
.build()
.unwrap();
let project: Project = endpoint.query(session)?;
Ok(project)
}

92
test.md Normal file
View File

@ -0,0 +1,92 @@
# datatyping
## Getting started
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
## Add your files
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
```
cd existing_repo
git remote add origin http://192.168.1.70:6020/lixiang/datatyping.git
git branch -M main
git push -uf origin main
```
## Integrate with your tools
- [ ] [Set up project integrations](http://192.168.1.70:6020/lixiang/datatyping/-/settings/integrations)
## Collaborate with your team
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
## Test and Deploy
Use the built-in continuous integration in GitLab.
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
***
# Editing this README
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
## Suggestions for a good README
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
## Name
Choose a self-explaining name for your project.
## Description
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
## Badges
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
## Visuals
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
## Installation
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
## Usage
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
## Support
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
## Roadmap
If you have ideas for releases in the future, it is a good idea to list them in the README.
## Contributing
State if you are open to contributions and what your requirements are for accepting them.
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
## Authors and acknowledgment
Show your appreciation to those who have contributed to the project.
## License
For open source projects, say how it is licensed.
## Project status
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.