Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: klausi/mastodon-twitter-sync
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.1.0
Choose a base ref
...
head repository: klausi/mastodon-twitter-sync
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 4,241 additions and 1,600 deletions.
  1. +2 −0 .dockerignore
  2. +47 −0 .github/workflows/docker.yml
  3. +34 −0 .github/workflows/release.yml
  4. +51 −0 .github/workflows/testing.yml
  5. +0 −12 .travis.yml
  6. +1,281 −1,062 Cargo.lock
  7. +42 −20 Cargo.toml
  8. +13 −0 DEVELOPMENT.md
  9. +39 −0 Dockerfile
  10. +72 −0 INSTALL.md
  11. +51 −11 README.md
  12. +56 −0 github-cron/.github/workflows/sync.yml
  13. +21 −0 github-cron/cache-cleanup.sh
  14. +19 −0 src/args.rs
  15. +116 −26 src/config.rs
  16. +83 −60 src/delete_favs.rs
  17. +83 −60 src/delete_statuses.rs
  18. +210 −0 src/lib.rs
  19. +9 −132 src/main.rs
  20. +74 −0 src/mastodon_attach.json
  21. +222 −25 src/post.rs
  22. +32 −39 src/registration.rs
  23. +1,113 −153 src/sync.rs
  24. +571 −0 src/thread_replies.rs
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/target
/.github
47 changes: 47 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Docker image

on:
push:
branches:
- 'master'
# Only build Docker images if relevant files change.
paths:
- .github/workflows/docker.yml
- src**
- .dockerignore
- Cargo*
- Dockerfile

jobs:
docker:
runs-on: ubuntu-latest
environment: Docker
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
username: klausi
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Login to github container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v3
with:
push: true
tags: |
klausi/mastodon-twitter-sync:latest
ghcr.io/${{ github.repository }}:latest
platforms: linux/amd64,linux/arm64
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release

permissions:
contents: write

on:
push:
tags:
- v[0-9]+.*

jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: taiki-e/create-gh-release-action@v1
with:
# (required) GitHub token for creating GitHub Releases.
token: ${{ secrets.GITHUB_TOKEN }}

upload-assets:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: mastodon-twitter-sync
token: ${{ secrets.GITHUB_TOKEN }}
51 changes: 51 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
on:
push:
# Only run Tests if Rust source files change.
paths:
- .github/workflows/testing.yml
- src**
- Cargo*
pull_request:
# Only run Tests if Rust source files change.
paths:
- .github/workflows/testing.yml
- src**
- Cargo*

name: Testing

env:
CARGO_TERM_COLOR: always

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Cargo check
uses: actions-rs/cargo@v1
with:
command: check
- name: Cargo test
uses: actions-rs/cargo@v1
with:
command: test
- name: Rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

Loading