Automatically generate release notes
This commit is contained in:
parent
7aeabfc4bc
commit
90fa0b5496
3
.github/workflows/rust.yml
vendored
3
.github/workflows/rust.yml
vendored
@ -43,12 +43,13 @@ jobs:
|
||||
if: github.base_ref != 'master'
|
||||
with:
|
||||
tag_name: ${{ steps.version.outputs.version }}
|
||||
name: ${{ steps.version.outputs.version }} - NAME
|
||||
name: ${{ steps.version.outputs.version }} - ${{ github.event.head_commit.message }}
|
||||
draft: true
|
||||
files: |
|
||||
target/release/libreddit
|
||||
libreddit.sha512
|
||||
body: |
|
||||
- ${{ github.event.head_commit.message }} ${{ github.sha }}
|
||||
generate_release_notes: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
|
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -572,7 +572,7 @@ checksum = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125"
|
||||
|
||||
[[package]]
|
||||
name = "libreddit"
|
||||
version = "0.20.3"
|
||||
version = "0.20.4"
|
||||
dependencies = [
|
||||
"askama",
|
||||
"async-recursion",
|
||||
|
@ -3,7 +3,7 @@ name = "libreddit"
|
||||
description = " Alternative private front-end to Reddit"
|
||||
license = "AGPL-3.0"
|
||||
repository = "https://github.com/spikecodes/libreddit"
|
||||
version = "0.20.3"
|
||||
version = "0.20.4"
|
||||
authors = ["spikecodes <19519553+spikecodes@users.noreply.github.com>"]
|
||||
edition = "2021"
|
||||
|
||||
|
18
src/utils.rs
18
src/utils.rs
@ -96,31 +96,19 @@ impl Media {
|
||||
// If post is a video, return the video
|
||||
let (post_type, url_val, alt_url_val) = if data_preview["fallback_url"].is_string() {
|
||||
(
|
||||
if data_preview["is_gif"].as_bool().unwrap_or(false) {
|
||||
"gif"
|
||||
} else {
|
||||
"video"
|
||||
},
|
||||
if data_preview["is_gif"].as_bool().unwrap_or(false) { "gif" } else { "video" },
|
||||
&data_preview["fallback_url"],
|
||||
Some(&data_preview["hls_url"]),
|
||||
)
|
||||
} else if secure_media["fallback_url"].is_string() {
|
||||
(
|
||||
if secure_media["is_gif"].as_bool().unwrap_or(false) {
|
||||
"gif"
|
||||
} else {
|
||||
"video"
|
||||
},
|
||||
if secure_media["is_gif"].as_bool().unwrap_or(false) { "gif" } else { "video" },
|
||||
&secure_media["fallback_url"],
|
||||
Some(&secure_media["hls_url"]),
|
||||
)
|
||||
} else if crosspost_parent_media["fallback_url"].is_string() {
|
||||
(
|
||||
if crosspost_parent_media["is_gif"].as_bool().unwrap_or(false) {
|
||||
"gif"
|
||||
} else {
|
||||
"video"
|
||||
},
|
||||
if crosspost_parent_media["is_gif"].as_bool().unwrap_or(false) { "gif" } else { "video" },
|
||||
&crosspost_parent_media["fallback_url"],
|
||||
Some(&crosspost_parent_media["hls_url"]),
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user