Compare commits

..

2 commits

Author SHA1 Message Date
b95d755e98 fix(deps): upgrade zip to 2.1.1 2024-06-29 13:35:34 +00:00
Renovate Bot
77e4af0ea4 chore(deps): update rust crate zip to v2 2024-06-29 13:35:34 +00:00
12 changed files with 241 additions and 284 deletions

View file

@ -3,33 +3,6 @@
All notable changes to this project will be documented in this file.
## [v0.4.5](https://codeberg.org/ThetaDev/artifactview/compare/v0.4.4..v0.4.5) - 2024-07-01
### 🚀 Features
- Update PR comment format - ([197eeea](https://codeberg.org/ThetaDev/artifactview/commit/197eeea75baa8ba44d27ec46c5f552028052869b))
### 🐛 Bug Fixes
- *(deps)* Update rust crate serde_json to v1.0.118 (#5) - ([fc3b5a1](https://codeberg.org/ThetaDev/artifactview/commit/fc3b5a1530985012ff8364a8fa676626e7544eaf))
- *(deps)* Update rust crate quick-xml to 0.34.0 (#8) - ([595a9d0](https://codeberg.org/ThetaDev/artifactview/commit/595a9d0f4115faf5056653406b6d05bf671dc2b3))
- *(deps)* Update rust crate mime_guess to v2.0.5 (#10) - ([94191f8](https://codeberg.org/ThetaDev/artifactview/commit/94191f878d774bef165cca850fcdf00fde16d662))
- *(deps)* Update rust crate quick-xml to 0.35.0 (#11) - ([7ebe881](https://codeberg.org/ThetaDev/artifactview/commit/7ebe8815462f3e704a79af038b9b1850ed4677ed))
- *(deps)* Update rust crate serde_json to v1.0.119 (#12) - ([2525022](https://codeberg.org/ThetaDev/artifactview/commit/2525022df76b3c16951983c14a55fa9617114a8e))
- Swap crc and size column (#3) - ([7d2c686](https://codeberg.org/ThetaDev/artifactview/commit/7d2c68630ec6e75061c050a4c8b035edb472d150))
### 📚 Documentation
- Make example CI step compatible with GitHub+Forgejo - ([39f0019](https://codeberg.org/ThetaDev/artifactview/commit/39f0019455cc23f1b8c39b77d2aaa5af278731a9))
- Update README - ([40ae3a7](https://codeberg.org/ThetaDev/artifactview/commit/40ae3a7f557c63a0bb2abcd595218c8ec1095fe7))
### ⚙️ Miscellaneous Tasks
- *(deps)* Update rust crate proptest to v1.5.0 (#6) - ([797fc0c](https://codeberg.org/ThetaDev/artifactview/commit/797fc0c04c2a51811a24cfc431496e6e5dbf0bea))
- *(deps)* Update rust crate rstest to 0.21.0 (#7) - ([cec3aa3](https://codeberg.org/ThetaDev/artifactview/commit/cec3aa3fc02e6a871d9c221f61c3f2d8828f9f63))
- *(deps)* Lock file maintenance (#13) - ([9767167](https://codeberg.org/ThetaDev/artifactview/commit/9767167661e22775614cea7b888a19ee16c17d65))
## [v0.4.4](https://codeberg.org/ThetaDev/artifactview/compare/v0.4.3..v0.4.4) - 2024-06-22
### 🐛 Bug Fixes

418
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
[package]
name = "artifactview"
version = "0.4.5"
version = "0.4.4"
edition = "2021"
authors = ["ThetaDev <thetadev@magenta.de>"]
license = "MIT"
@ -30,7 +30,7 @@ axum = { version = "0.7.5", default-features = false, features = [
"tracing",
] }
axum-extra = { version = "0.9.3", features = ["typed-header"] }
comrak = { version = "0.26.0", default-features = false }
comrak = { version = "0.24.1", default-features = false }
dotenvy = "0.15.7"
envy = { path = "crates/envy" }
flate2 = "1.0.30"
@ -46,7 +46,7 @@ once_cell = "1.19.0"
path_macro = "1.0.0"
percent-encoding = "2.3.1"
pin-project = "1.1.5"
quick_cache = "0.6.0"
quick_cache = "0.5.1"
rand = "0.8.5"
regex = "1.10.4"
reqwest = { version = "0.12.4", default-features = false, features = [

View file

@ -49,7 +49,7 @@ tokio-util = { version = "0.7", features = ["compat"], optional = true }
tokio = { version = "1", features = ["full"] }
tokio-util = { version = "0.7", features = ["compat"] }
env_logger = "0.11.2"
zip = "2.1.5"
zip = "=2.1.1"
# shared across multiple examples
# anyhow = "1"

View file

@ -7,7 +7,7 @@ license = "BSD-2-Clause"
repository = "https://github.com/borisfaure/junit-parser"
[dependencies]
quick-xml = { version = "0.36.0", features = ["escape-html"] }
quick-xml = { version = "0.34.0", features = ["escape-html"] }
thiserror = "1.0.61"
time = { version = "0.3.36", features = ["parsing", "serde-well-known"] }
serde = { version = "1.0", features = ["derive"] }

View file

@ -5,7 +5,6 @@
":maintainLockFilesWeekly"
],
"semanticCommits": "enabled",
"automerge": true,
"automergeStrategy": "squash",
"osvVulnerabilityAlerts": true,
"labels": ["dependency-upgrade"],

View file

@ -844,11 +844,6 @@ fn pr_comment_text(p: PrCommentTextParams) -> String {
let query = p.query;
let mut content = "### ".to_owned();
let mut prevln = "- ".to_owned();
let a_opts = r#"target="_blank" rel="noopener noreferrer""#;
let date_started = p
.run
.date_started
.and_then(|d| d.to_offset(time::UtcOffset::UTC).format(&DATE_FORMAT).ok());
let mut prev_builds = None;
let mut np_content = None;
@ -871,7 +866,10 @@ fn pr_comment_text(p: PrCommentTextParams) -> String {
let write_link_icon = |s: &mut String, title: &str, href: &str| {
let (title_pfx, title) = util::split_icon_prefix(title);
_ = write!(s, r#"{title_pfx}<a href="{href}" {a_opts}>{title}</a>"#,);
_ = write!(
s,
r#"{title_pfx}<a href="{href}" target="_blank" rel="noopener noreferrer">{title}</a>"#,
);
};
// Comment title
@ -879,23 +877,17 @@ fn pr_comment_text(p: PrCommentTextParams) -> String {
let artifacts_url = format!("{}/?url={}", p.cfg.main_url(), run_url);
write_link_icon(
&mut content,
p.title.unwrap_or("Latest build artifacts"),
p.title.unwrap_or("👁️ Latest build artifacts"),
&artifacts_url,
);
_ = write!(&mut content, "\n\n Run [#{}]({}) · ", query.run, run_url);
_ = write!(&mut content, " (Run [#{}]({}), ", query.run, run_url);
write_commit(&mut content, &p.run.head_sha);
if let Some(date_started) = &date_started {
_ = write!(&mut content, " · {} UTC", date_started);
}
_ = content.write_str("\n\n");
_ = content.write_str(")\n\n");
// Previous run line
_ = write!(&mut prevln, "[#{}]({}) [", query.run, run_url);
write_commit(&mut prevln, &p.run.head_sha);
_ = write!(
&mut prevln,
"] <a href=\"{artifacts_url}\" {a_opts}>Artifacts</a>: "
);
_ = write!(&mut prevln, "] [Artifacts]({artifacts_url}): ");
for a in p.artifacts.iter().filter(|a| !a.expired) {
let mut url = p
@ -918,8 +910,8 @@ fn pr_comment_text(p: PrCommentTextParams) -> String {
_ = content.write_str("<br>\n");
_ = write!(
&mut prevln,
r#" <a href="{url}" {a_opts}>`{}`</a>,"#,
a.name
r#" <a href="{}" target="_blank" rel="noopener noreferrer">`{}`</a>,"#,
url, a.name
);
}
@ -927,8 +919,15 @@ fn pr_comment_text(p: PrCommentTextParams) -> String {
prevln.pop();
}
if let Some(date_started) = &date_started {
_ = write!(&mut prevln, " ({} UTC)", date_started);
if let Some(date_started) = &p.run.date_started {
_ = write!(
&mut prevln,
" ({} UTC)",
date_started
.to_offset(time::UtcOffset::UTC)
.format(&DATE_FORMAT)
.unwrap_or_default()
);
}
if np_content.is_some() || prev_builds.is_some() {

View file

@ -2,10 +2,8 @@
source: src/app.rs
expression: res
---
### <a href="https://localhost:3000/?url=https://code.thetadev.de/thetadev/test-actions/actions/runs/1" target="_blank" rel="noopener noreferrer">Latest build artifacts</a>
Run [#1](https://code.thetadev.de/thetadev/test-actions/actions/runs/1) · [15eed48a83](https://code.thetadev.de/thetadev/test-actions/commit/15eed48a8382513147a949117ef4aa659989d397) · 15.06.2024 01:30:00 UTC
### 👁️ <a href="https://localhost:3000/?url=https://code.thetadev.de/thetadev/test-actions/actions/runs/1" target="_blank" rel="noopener noreferrer">Latest build artifacts</a> (Run [#1](https://code.thetadev.de/thetadev/test-actions/actions/runs/1), [15eed48a83](https://code.thetadev.de/thetadev/test-actions/commit/15eed48a8382513147a949117ef4aa659989d397))
🏠 <a href="https://code-thetadev-de--thetadev--test-actions--1-1.localhost:3000" target="_blank" rel="noopener noreferrer">Hello World ;-)</a><br>
<a href="https://code-thetadev-de--thetadev--test-actions--1-2.localhost:3000/junit.xml?viewer=1" target="_blank" rel="noopener noreferrer">Test</a><br>
<!--NEXT_PREV - [#1](https://code.thetadev.de/thetadev/test-actions/actions/runs/1) [[15eed48a83](https://code.thetadev.de/thetadev/test-actions/commit/15eed48a8382513147a949117ef4aa659989d397)] <a href="https://localhost:3000/?url=https://code.thetadev.de/thetadev/test-actions/actions/runs/1" target="_blank" rel="noopener noreferrer">Artifacts</a>: <a href="https://code-thetadev-de--thetadev--test-actions--1-1.localhost:3000" target="_blank" rel="noopener noreferrer">`Hello`</a>, <a href="https://code-thetadev-de--thetadev--test-actions--1-2.localhost:3000/junit.xml?viewer=1" target="_blank" rel="noopener noreferrer">`Test`</a> (15.06.2024 01:30:00 UTC) -->
<!--NEXT_PREV - [#1](https://code.thetadev.de/thetadev/test-actions/actions/runs/1) [[15eed48a83](https://code.thetadev.de/thetadev/test-actions/commit/15eed48a8382513147a949117ef4aa659989d397)] [Artifacts](https://localhost:3000/?url=https://code.thetadev.de/thetadev/test-actions/actions/runs/1): <a href="https://code-thetadev-de--thetadev--test-actions--1-1.localhost:3000" target="_blank" rel="noopener noreferrer">`Hello`</a>, <a href="https://code-thetadev-de--thetadev--test-actions--1-2.localhost:3000/junit.xml?viewer=1" target="_blank" rel="noopener noreferrer">`Test`</a> (15.06.2024 01:30:00 UTC) -->

View file

@ -2,15 +2,13 @@
source: src/app.rs
expression: res
---
### <a href="https://localhost:3000/?url=https://code.thetadev.de/thetadev/test-actions/actions/runs/2" target="_blank" rel="noopener noreferrer">Latest build artifacts</a>
Run [#2](https://code.thetadev.de/thetadev/test-actions/actions/runs/2) · [25eed48a83](https://code.thetadev.de/thetadev/test-actions/commit/25eed48a8382513147a949117ef4aa659989d397) · 15.06.2024 02:30:00 UTC
### 👁️ <a href="https://localhost:3000/?url=https://code.thetadev.de/thetadev/test-actions/actions/runs/2" target="_blank" rel="noopener noreferrer">Latest build artifacts</a> (Run [#2](https://code.thetadev.de/thetadev/test-actions/actions/runs/2), [25eed48a83](https://code.thetadev.de/thetadev/test-actions/commit/25eed48a8382513147a949117ef4aa659989d397))
🏠 <a href="https://code-thetadev-de--thetadev--test-actions--2-1.localhost:3000" target="_blank" rel="noopener noreferrer">Hello World ;-)</a><br>
<a href="https://code-thetadev-de--thetadev--test-actions--2-2.localhost:3000/junit.xml?viewer=1" target="_blank" rel="noopener noreferrer">Test</a><br>
<details>
<summary>Previous builds</summary>
- [#1](https://code.thetadev.de/thetadev/test-actions/actions/runs/1) [[15eed48a83](https://code.thetadev.de/thetadev/test-actions/commit/15eed48a8382513147a949117ef4aa659989d397)] <a href="https://localhost:3000/?url=https://code.thetadev.de/thetadev/test-actions/actions/runs/1" target="_blank" rel="noopener noreferrer">Artifacts</a>: <a href="https://code-thetadev-de--thetadev--test-actions--1-1.localhost:3000" target="_blank" rel="noopener noreferrer">`Hello`</a>, <a href="https://code-thetadev-de--thetadev--test-actions--1-2.localhost:3000/junit.xml?viewer=1" target="_blank" rel="noopener noreferrer">`Test`</a> (15.06.2024 01:30:00 UTC)
<!--NEXT_PREV - [#2](https://code.thetadev.de/thetadev/test-actions/actions/runs/2) [[25eed48a83](https://code.thetadev.de/thetadev/test-actions/commit/25eed48a8382513147a949117ef4aa659989d397)] <a href="https://localhost:3000/?url=https://code.thetadev.de/thetadev/test-actions/actions/runs/2" target="_blank" rel="noopener noreferrer">Artifacts</a>: <a href="https://code-thetadev-de--thetadev--test-actions--2-1.localhost:3000" target="_blank" rel="noopener noreferrer">`Hello`</a>, <a href="https://code-thetadev-de--thetadev--test-actions--2-2.localhost:3000/junit.xml?viewer=1" target="_blank" rel="noopener noreferrer">`Test`</a> (15.06.2024 02:30:00 UTC) -->
- [#1](https://code.thetadev.de/thetadev/test-actions/actions/runs/1) [[15eed48a83](https://code.thetadev.de/thetadev/test-actions/commit/15eed48a8382513147a949117ef4aa659989d397)] [Artifacts](https://localhost:3000/?url=https://code.thetadev.de/thetadev/test-actions/actions/runs/1): <a href="https://code-thetadev-de--thetadev--test-actions--1-1.localhost:3000" target="_blank" rel="noopener noreferrer">`Hello`</a>, <a href="https://code-thetadev-de--thetadev--test-actions--1-2.localhost:3000/junit.xml?viewer=1" target="_blank" rel="noopener noreferrer">`Test`</a> (15.06.2024 01:30:00 UTC)
<!--NEXT_PREV - [#2](https://code.thetadev.de/thetadev/test-actions/actions/runs/2) [[25eed48a83](https://code.thetadev.de/thetadev/test-actions/commit/25eed48a8382513147a949117ef4aa659989d397)] [Artifacts](https://localhost:3000/?url=https://code.thetadev.de/thetadev/test-actions/actions/runs/2): <a href="https://code-thetadev-de--thetadev--test-actions--2-1.localhost:3000" target="_blank" rel="noopener noreferrer">`Hello`</a>, <a href="https://code-thetadev-de--thetadev--test-actions--2-2.localhost:3000/junit.xml?viewer=1" target="_blank" rel="noopener noreferrer">`Test`</a> (15.06.2024 02:30:00 UTC) -->
</details>

View file

@ -2,16 +2,14 @@
source: src/app.rs
expression: res
---
### <a href="https://localhost:3000/?url=https://code.thetadev.de/thetadev/test-actions/actions/runs/3" target="_blank" rel="noopener noreferrer">Latest build artifacts</a>
Run [#3](https://code.thetadev.de/thetadev/test-actions/actions/runs/3) · [35eed48a83](https://code.thetadev.de/thetadev/test-actions/commit/35eed48a8382513147a949117ef4aa659989d397) · 15.06.2024 03:30:00 UTC
### 👁️ <a href="https://localhost:3000/?url=https://code.thetadev.de/thetadev/test-actions/actions/runs/3" target="_blank" rel="noopener noreferrer">Latest build artifacts</a> (Run [#3](https://code.thetadev.de/thetadev/test-actions/actions/runs/3), [35eed48a83](https://code.thetadev.de/thetadev/test-actions/commit/35eed48a8382513147a949117ef4aa659989d397))
🏠 <a href="https://code-thetadev-de--thetadev--test-actions--3-1.localhost:3000" target="_blank" rel="noopener noreferrer">Hello World ;-)</a><br>
<a href="https://code-thetadev-de--thetadev--test-actions--3-2.localhost:3000/junit.xml?viewer=1" target="_blank" rel="noopener noreferrer">Test</a><br>
<details>
<summary>Previous builds</summary>
- [#1](https://code.thetadev.de/thetadev/test-actions/actions/runs/1) [[15eed48a83](https://code.thetadev.de/thetadev/test-actions/commit/15eed48a8382513147a949117ef4aa659989d397)] <a href="https://localhost:3000/?url=https://code.thetadev.de/thetadev/test-actions/actions/runs/1" target="_blank" rel="noopener noreferrer">Artifacts</a>: <a href="https://code-thetadev-de--thetadev--test-actions--1-1.localhost:3000" target="_blank" rel="noopener noreferrer">`Hello`</a>, <a href="https://code-thetadev-de--thetadev--test-actions--1-2.localhost:3000/junit.xml?viewer=1" target="_blank" rel="noopener noreferrer">`Test`</a> (15.06.2024 01:30:00 UTC)
- [#2](https://code.thetadev.de/thetadev/test-actions/actions/runs/2) [[25eed48a83](https://code.thetadev.de/thetadev/test-actions/commit/25eed48a8382513147a949117ef4aa659989d397)] <a href="https://localhost:3000/?url=https://code.thetadev.de/thetadev/test-actions/actions/runs/2" target="_blank" rel="noopener noreferrer">Artifacts</a>: <a href="https://code-thetadev-de--thetadev--test-actions--2-1.localhost:3000" target="_blank" rel="noopener noreferrer">`Hello`</a>, <a href="https://code-thetadev-de--thetadev--test-actions--2-2.localhost:3000/junit.xml?viewer=1" target="_blank" rel="noopener noreferrer">`Test`</a> (15.06.2024 02:30:00 UTC)
<!--NEXT_PREV - [#3](https://code.thetadev.de/thetadev/test-actions/actions/runs/3) [[35eed48a83](https://code.thetadev.de/thetadev/test-actions/commit/35eed48a8382513147a949117ef4aa659989d397)] <a href="https://localhost:3000/?url=https://code.thetadev.de/thetadev/test-actions/actions/runs/3" target="_blank" rel="noopener noreferrer">Artifacts</a>: <a href="https://code-thetadev-de--thetadev--test-actions--3-1.localhost:3000" target="_blank" rel="noopener noreferrer">`Hello`</a>, <a href="https://code-thetadev-de--thetadev--test-actions--3-2.localhost:3000/junit.xml?viewer=1" target="_blank" rel="noopener noreferrer">`Test`</a> (15.06.2024 03:30:00 UTC) -->
- [#1](https://code.thetadev.de/thetadev/test-actions/actions/runs/1) [[15eed48a83](https://code.thetadev.de/thetadev/test-actions/commit/15eed48a8382513147a949117ef4aa659989d397)] [Artifacts](https://localhost:3000/?url=https://code.thetadev.de/thetadev/test-actions/actions/runs/1): <a href="https://code-thetadev-de--thetadev--test-actions--1-1.localhost:3000" target="_blank" rel="noopener noreferrer">`Hello`</a>, <a href="https://code-thetadev-de--thetadev--test-actions--1-2.localhost:3000/junit.xml?viewer=1" target="_blank" rel="noopener noreferrer">`Test`</a> (15.06.2024 01:30:00 UTC)
- [#2](https://code.thetadev.de/thetadev/test-actions/actions/runs/2) [[25eed48a83](https://code.thetadev.de/thetadev/test-actions/commit/25eed48a8382513147a949117ef4aa659989d397)] [Artifacts](https://localhost:3000/?url=https://code.thetadev.de/thetadev/test-actions/actions/runs/2): <a href="https://code-thetadev-de--thetadev--test-actions--2-1.localhost:3000" target="_blank" rel="noopener noreferrer">`Hello`</a>, <a href="https://code-thetadev-de--thetadev--test-actions--2-2.localhost:3000/junit.xml?viewer=1" target="_blank" rel="noopener noreferrer">`Test`</a> (15.06.2024 02:30:00 UTC)
<!--NEXT_PREV - [#3](https://code.thetadev.de/thetadev/test-actions/actions/runs/3) [[35eed48a83](https://code.thetadev.de/thetadev/test-actions/commit/35eed48a8382513147a949117ef4aa659989d397)] [Artifacts](https://localhost:3000/?url=https://code.thetadev.de/thetadev/test-actions/actions/runs/3): <a href="https://code-thetadev-de--thetadev--test-actions--3-1.localhost:3000" target="_blank" rel="noopener noreferrer">`Hello`</a>, <a href="https://code-thetadev-de--thetadev--test-actions--3-2.localhost:3000/junit.xml?viewer=1" target="_blank" rel="noopener noreferrer">`Test`</a> (15.06.2024 03:30:00 UTC) -->
</details>

View file

@ -22,10 +22,10 @@
<th><a href="?C=N&amp;O=A">Name</a>&nbsp;<a
href="?C=N&amp;O=D"
>&nbsp;&darr;&nbsp;</a></th>
<th>CRC32</th>
<th><a href="?C=S&amp;O=A">Size</a>&nbsp;<a
href="?C=S&amp;O=D"
>&nbsp;&darr;&nbsp;</a></th>
<th>CRC32</th>
</tr>
</thead>
<tbody>
@ -45,8 +45,8 @@
<span class="name">{{name}}</span>
</a>
</td>
<td>{{#if is_dir}}&mdash;{{else}}{{crc32}}{{/if}}</td>
<td>{{#if is_dir}}&mdash;{{else}}{{size}}{{/if}}</td>
<td>{{#if is_dir}}&mdash;{{else}}{{crc32}}{{/if}}</td>
</tr>
{{/each}}
</tbody>

View file

@ -242,8 +242,8 @@ fn parse_listing(doc: &Html) -> Vec<FileEntry> {
FileEntry {
name,
crc32: parts.next().expect("crc32"),
size: parts.next().expect("size"),
crc32: parts.next().expect("crc32"),
}
})
.collect()