Compare commits
1 Commits
v0.3.1
...
ca949691e4
| Author | SHA1 | Date | |
|---|---|---|---|
| ca949691e4 |
32
.gitea/workflows/ci.yml
Normal file
32
.gitea/workflows/ci.yml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
fmt:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
components: rustfmt
|
||||||
|
- run: cargo fmt --check
|
||||||
|
|
||||||
|
clippy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
components: clippy
|
||||||
|
- run: cargo clippy -- -D warnings
|
||||||
|
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
- run: cargo test
|
||||||
@@ -37,7 +37,10 @@ impl ActivityPubService {
|
|||||||
.shared_inbox_url
|
.shared_inbox_url
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map(|u| u.to_string()),
|
.map(|u| u.to_string()),
|
||||||
display_name: remote_actor.display_name.clone().or_else(|| Some(remote_actor.username.clone())),
|
display_name: remote_actor
|
||||||
|
.display_name
|
||||||
|
.clone()
|
||||||
|
.or_else(|| Some(remote_actor.username.clone())),
|
||||||
avatar_url: remote_actor.avatar_url.as_ref().map(|u| u.to_string()),
|
avatar_url: remote_actor.avatar_url.as_ref().map(|u| u.to_string()),
|
||||||
outbox_url: Some(remote_actor.outbox_url.to_string()),
|
outbox_url: Some(remote_actor.outbox_url.to_string()),
|
||||||
bio: remote_actor.bio.clone(),
|
bio: remote_actor.bio.clone(),
|
||||||
|
|||||||
Reference in New Issue
Block a user