Compare commits

..

No commits in common. "main" and "v0.1.0" have entirely different histories.
main ... v0.1.0

8 changed files with 273 additions and 382 deletions

View file

@ -16,23 +16,21 @@ jobs:
release-plz: release-plz:
name: Release-plz name: Release-plz
runs-on: docker runs-on: docker
container:
image:
git.kemitix.net/kemitix/rust:v4.0.1
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Run release-plz release-pr - name: Run release-plz release-pr
run: release-plz release-pr --backend gitea --git-token ${{ secrets.FORGEJO_TOKEN }} uses: https://git.kemitix.net/kemitix/rust@v2.5.0
with:
args: release-plz release-pr --backend gitea --git-token ${{ secrets.FORGEJO_TOKEN }}
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Run release-plz release
uses: https://git.kemitix.net/kemitix/rust@v2.5.0
with:
args: release-plz release --backend gitea --git-token ${{ secrets.FORGEJO_TOKEN }}
env: env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Run release-plz release
run: release-plz release --backend gitea --git-token ${{ secrets.FORGEJO_TOKEN }}
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

View file

@ -16,10 +16,6 @@ jobs:
build: build:
runs-on: docker runs-on: docker
container:
image:
git.kemitix.net/kemitix/rust:v4.0.1
strategy: strategy:
matrix: matrix:
toolchain: toolchain:
@ -30,35 +26,36 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Ignored Files
run: |
IGNORED=$(git ls-files --cached -i --exclude-standard)
if [ -n "$IGNORED" ]
then
echo "Ignored files present:\n$IGNORED"
exit 1
fi
- name: Check TODOs - name: Check TODOs
uses: https://git.kemitix.net/kemitix/forgejo-todo-checker@v1.3.0 uses: kemitix/todo-checker@v1.2.0
- name: Machete - name: Machete
run: cargo +${{ matrix.toolchain.name }} machete uses: https://git.kemitix.net/kemitix/rust@v2.5.0
with:
args: ${{ matrix.toolchain.name }} cargo machete
- name: Format - name: Format
run: cargo +${{ matrix.toolchain.name }} fmt --all --check uses: https://git.kemitix.net/kemitix/rust@v2.5.0
with:
args: ${{ matrix.toolchain.name }} cargo fmt --all -- --check
- name: Clippy - name: Clippy
run: cargo +${{ matrix.toolchain.name }} hack --feature-powerset clippy uses: https://git.kemitix.net/kemitix/rust@v2.5.0
with:
args: ${{ matrix.toolchain.name }} cargo hack --feature-powerset clippy
- name: Build - name: Build
run: cargo +${{ matrix.toolchain.name }} hack --feature-powerset build uses: https://git.kemitix.net/kemitix/rust@v2.5.0
with:
args: ${{ matrix.toolchain.name }} cargo hack --feature-powerset build
- name: Test - name: Test
run: cargo +${{ matrix.toolchain.name }} hack --feature-powerset test uses: https://git.kemitix.net/kemitix/rust@v2.5.0
with:
args: ${{ matrix.toolchain.name }} cargo hack --feature-powerset test
# TODO: (#17) enable mutation testing
# - name: Mutations # - name: Mutations
# run: cargo +${{ matrix.toolchain.name }} mutants -vV --in-place # uses: https://git.kemitix.net/kemitix/rust@v2.5.0
# with:
# args: ${{ matrix.toolchain.name }} cargo mutants -vV --in-place

View file

@ -1,164 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file.
## [0.1.0] - 2024-12-31
### 🚀 Features
- Make main tokio async
- Start empty lib
- Define Ctx to hold context (e.g. fs and net handles)
- Define command arguments to parse
- Install error trap from color_eyre
- Create Ctx instance
- Add helper macros
- Parse command line
- Add const NAME
- Command to write initial config file
- Load config file
- Add APIResult
- *(trello)* Add basics of trello config model
- *(nextcloud)* Add basics of nextcloud config model client
- Add kxio printer to context
- *(nextcloud)* DeckClient hold reference to FullCtx
- *(nextcloud)* Add deck_client to FullCtx
- *(nextcloud)* Add command 'nextcloud board list'
- *(nextcloud)* Add command 'nextcloud stack list'
- *(trello)* Add command 'trello board list'
- *(nextcloud)* Add command 'nextcloud card list'
- Add command 'check'
- *(nextcloud)* Add command 'nextcloud card get'
- Enable trace logging support
- *(nextcloud)* Add command 'nextcloud card create'
- *(nextcloud)* Add command 'nextcloud card add-label'
- *(trello)* Add command 'trello stack list'
- *(trello)* Add command 'trello card get'
- *(trello)* Add command 'trello attachement get'
- *(trello)* Add command 'trello attachement save'
- *(nextcloud)* Add commnad 'nextcloud deck get'
- Check command lists trello boards
- Use more non-String types
- Add command 'nextcloud board get'
- Add command 'nextcloud stack get'
- Add command 'nextcloud card add-attachment'
- *(nextcloud)* Add command 'nextcloud board labels'
- *(nextcloud)* Add command 'nextcloud stack create'
- *(nextcloud)* Add command 'nextcloud board create-label'
- Add command 'import'
- Split into actors
- *(trello)* Support exponential backoff with jitter
- *(nextcloud)* Support exponential backoff with jitter
- Add support for tokio-console
- Write downloaded attachments to temp directory
- Make best-effort to maintain order of stacks and cards
- Add Rate Limits on trello API and own parallisation
- Impl From<i64> for TrelloCardPosition
- Improved APIResult error reporting and use tracing
- Store attachments with the card rather than as a file
- Add trello card id to trello long card
- Revert: store attachments with the card rather than as a file
- Migrate card position and due date
### 🐛 Bug Fixes
- *(deps)* Update rust crate kxio to v4
- Install color_eyre error handler in main
- *(trello)* Parse labels on cards
- Improve exponential backup detection of 429 error
- Stop zombie actors
- Only upload attachments that are files
- Always remove child actors regardless of how they exit
- *(trello)* Detect trello 429 responses correctly
- Import labels lookup label properly
- Upload attachments with unique filename
- Import*Actor shutsdown properly on error
### 💼 Other
- Initial ci setup
- Jj-next
- Jj-next can ignore immutable main on start and can move next anywhere
- Disable mutation testing in new tests are in place
- Clippy will apply any fixes it can
### 🚜 Refactor
- Add FullCtx which is Ctx with AppConfig
- Rearrange command dispatcher
- Reshuffling and extracting Executor trait
- *(trello)* Rename module types as model
- *(trello)* Rename 'trello boards list' as 'trello member get'
- *(trello)* Rewrite trello module and rename commands
- Extract inline module tests::config
- Extract inline module tests::init
- Extract inline module tests::template
- Extract inline module tests::given
- Replace Ctx::new with Ctx::From<PathBuf>
- Pass context by reference
- Execute::execute passes itself by ref
- Pass parsed Commands from main
- Remove command 'nextcloud card list'
- Command 'nextcloud card get' takes board id from parameters
- Command 'nextcloud card create'
- Command 'nextcloud card add-label'
- Remove board_id and board_name from config file
- *(trello)* Rearrange model
- Remove dead code
- *(trello)* Pin down parameter types for create_card
- Split import into smaller functions
- Move spawn and spawn_in_thread macros to macros module
- Import/card: remove creating trello or deck client variables
- Create missing stacks
- Nextcloud client: request takes Bytes
- Trello client: specify query parameters
- Trello client: clean up headers
### 📚 Documentation
- Add Readme
- Add plan to readme
- Add nextcloud credentials instructions
- Add supported features list to README
### 🧪 Testing
- *(nextcloud)* Add new tests
- *(nextcloud)* Enable tests
- Nextcloud card create - with/without description
- *(trello)* Add tests for 'trello member get'
- Add tests for 'trello board get'
- Add tests for 'trello card get'
- Add tests for APIResult
- Use variable in expected url
- Add tests for 'trello stack get'
- Add tests for commands 'trello attachment get' and 'trello attachment save'
- Add test for TrelloBoards::find_by_name()
- Added for 'check' command
- Add tests for importing
### ⚙️ Miscellaneous Tasks
- Remove hello world
- *(nextcloud)* Strip out old tests
- *(nextcloud)* Remove duplicate client
- Remove dead code
- Code coverage configuration
- Ignore coverage data
- Remove old unlinked file
- Drop old unlinked file
- Remove unused trello boards list command
- Remove unlinked file: trello::model::new_card
- Remove unused From implementations for TrelloAuth
- Remove dead code: trello::url()
- Remove dead code
- Log spawned actor details on single line
- Notes on fixmes to improve error handling
- Add more tracing messages
- Include file name and line number in tracing output
- Upgrade kxio to v5.0
- Remove unused temp_fs from FullCtx
- Update gitignore and add Cargo.lock
- Remove trash
<!-- generated by git-cliff -->

351
Cargo.lock generated
View file

@ -295,12 +295,6 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "cfg_aliases"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
[[package]] [[package]]
name = "clap" name = "clap"
version = "4.5.23" version = "4.5.23"
@ -413,6 +407,22 @@ dependencies = [
"tracing-subscriber", "tracing-subscriber",
] ]
[[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]]
name = "core-foundation-sys"
version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
[[package]] [[package]]
name = "cpufeatures" name = "cpufeatures"
version = "0.2.16" version = "0.2.16"
@ -541,6 +551,15 @@ version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
[[package]]
name = "encoding_rs"
version = "0.8.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3"
dependencies = [
"cfg-if",
]
[[package]] [[package]]
name = "env_filter" name = "env_filter"
version = "0.1.2" version = "0.1.2"
@ -610,6 +629,21 @@ version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]]
name = "foreign-types"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
dependencies = [
"foreign-types-shared",
]
[[package]]
name = "foreign-types-shared"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
[[package]] [[package]]
name = "form_urlencoded" name = "form_urlencoded"
version = "1.2.1" version = "1.2.1"
@ -749,10 +783,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"js-sys",
"libc", "libc",
"wasi", "wasi",
"wasm-bindgen",
] ]
[[package]] [[package]]
@ -911,7 +943,6 @@ dependencies = [
"tokio", "tokio",
"tokio-rustls", "tokio-rustls",
"tower-service", "tower-service",
"webpki-roots",
] ]
[[package]] [[package]]
@ -927,6 +958,22 @@ dependencies = [
"tower-service", "tower-service",
] ]
[[package]]
name = "hyper-tls"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0"
dependencies = [
"bytes",
"http-body-util",
"hyper",
"hyper-util",
"native-tls",
"tokio",
"tokio-native-tls",
"tower-service",
]
[[package]] [[package]]
name = "hyper-util" name = "hyper-util"
version = "0.1.10" version = "0.1.10"
@ -1178,12 +1225,13 @@ dependencies = [
[[package]] [[package]]
name = "kameo" name = "kameo"
version = "0.14.0" version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1542e1113415cdfd5dac5f663cb69f6be472cff28e90adf6e284e520e399312" checksum = "62237a96597618543798a36ec723eb75c5ac301e2690243fd600be1f5eb3dd2d"
dependencies = [ dependencies = [
"dyn-clone", "dyn-clone",
"futures", "futures",
"itertools",
"kameo_macros", "kameo_macros",
"once_cell", "once_cell",
"serde", "serde",
@ -1194,9 +1242,9 @@ dependencies = [
[[package]] [[package]]
name = "kameo_macros" name = "kameo_macros"
version = "0.14.0" version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d7adf8a6a19b8582095d1819f4e992817f7dce2b85cd205b6386f9079a2cc81" checksum = "5bbbd8e8d7b02bc67eae0dcbdb82c0a71cc7cc61734059ee3e7439a1ee1e0e85"
dependencies = [ dependencies = [
"heck", "heck",
"proc-macro2", "proc-macro2",
@ -1207,9 +1255,9 @@ dependencies = [
[[package]] [[package]]
name = "kxio" name = "kxio"
version = "5.1.0" version = "5.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92eaa78014d241ca18f3af63e67a0b395ba7fb52a87a986dd9c3f136eda032ff" checksum = "ec15c915b6fb790d4dac6c1c101c01d29bd4701e5d55e48ae47bad69356eb7b4"
dependencies = [ dependencies = [
"base64 0.22.1", "base64 0.22.1",
"bytes", "bytes",
@ -1353,6 +1401,23 @@ version = "0.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc0287524726960e07b119cebd01678f852f147742ae0d925e6a520dca956126" checksum = "bc0287524726960e07b119cebd01678f852f147742ae0d925e6a520dca956126"
[[package]]
name = "native-tls"
version = "0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466"
dependencies = [
"libc",
"log",
"openssl",
"openssl-probe",
"openssl-sys",
"schannel",
"security-framework",
"security-framework-sys",
"tempfile",
]
[[package]] [[package]]
name = "newline-converter" name = "newline-converter"
version = "0.3.0" version = "0.3.0"
@ -1406,6 +1471,50 @@ version = "1.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
[[package]]
name = "openssl"
version = "0.10.68"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5"
dependencies = [
"bitflags 2.6.0",
"cfg-if",
"foreign-types",
"libc",
"once_cell",
"openssl-macros",
"openssl-sys",
]
[[package]]
name = "openssl-macros"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "openssl-probe"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
[[package]]
name = "openssl-sys"
version = "0.9.104"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741"
dependencies = [
"cc",
"libc",
"pkg-config",
"vcpkg",
]
[[package]] [[package]]
name = "overload" name = "overload"
version = "0.1.1" version = "0.1.1"
@ -1485,6 +1594,12 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]]
name = "pkg-config"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2"
[[package]] [[package]]
name = "ppv-lite86" name = "ppv-lite86"
version = "0.2.20" version = "0.2.20"
@ -1554,58 +1669,6 @@ dependencies = [
"prost", "prost",
] ]
[[package]]
name = "quinn"
version = "0.11.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef"
dependencies = [
"bytes",
"pin-project-lite",
"quinn-proto",
"quinn-udp",
"rustc-hash",
"rustls",
"socket2",
"thiserror",
"tokio",
"tracing",
]
[[package]]
name = "quinn-proto"
version = "0.11.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d"
dependencies = [
"bytes",
"getrandom",
"rand",
"ring",
"rustc-hash",
"rustls",
"rustls-pki-types",
"slab",
"thiserror",
"tinyvec",
"tracing",
"web-time",
]
[[package]]
name = "quinn-udp"
version = "0.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1c40286217b4ba3a71d644d752e6a0b71f13f1b6a2c5311acfcbe0c2418ed904"
dependencies = [
"cfg_aliases",
"libc",
"once_cell",
"socket2",
"tracing",
"windows-sys 0.59.0",
]
[[package]] [[package]]
name = "quote" name = "quote"
version = "1.0.37" version = "1.0.37"
@ -1712,32 +1775,34 @@ checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f"
dependencies = [ dependencies = [
"base64 0.22.1", "base64 0.22.1",
"bytes", "bytes",
"encoding_rs",
"futures-core", "futures-core",
"futures-util", "futures-util",
"h2",
"http", "http",
"http-body", "http-body",
"http-body-util", "http-body-util",
"hyper", "hyper",
"hyper-rustls", "hyper-rustls",
"hyper-tls",
"hyper-util", "hyper-util",
"ipnet", "ipnet",
"js-sys", "js-sys",
"log", "log",
"mime", "mime",
"mime_guess", "mime_guess",
"native-tls",
"once_cell", "once_cell",
"percent-encoding", "percent-encoding",
"pin-project-lite", "pin-project-lite",
"quinn",
"rustls",
"rustls-pemfile", "rustls-pemfile",
"rustls-pki-types",
"serde", "serde",
"serde_json", "serde_json",
"serde_urlencoded", "serde_urlencoded",
"sync_wrapper", "sync_wrapper",
"system-configuration",
"tokio", "tokio",
"tokio-rustls", "tokio-native-tls",
"tokio-util", "tokio-util",
"tower-service", "tower-service",
"url", "url",
@ -1745,7 +1810,6 @@ dependencies = [
"wasm-bindgen-futures", "wasm-bindgen-futures",
"wasm-streams", "wasm-streams",
"web-sys", "web-sys",
"webpki-roots",
"windows-registry", "windows-registry",
] ]
@ -1766,21 +1830,21 @@ dependencies = [
[[package]] [[package]]
name = "rstest" name = "rstest"
version = "0.24.0" version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03e905296805ab93e13c1ec3a03f4b6c4f35e9498a3d5fa96dc626d22c03cd89" checksum = "0a2c585be59b6b5dd66a9d2084aa1d8bd52fbdb806eafdeffb52791147862035"
dependencies = [ dependencies = [
"futures",
"futures-timer", "futures-timer",
"futures-util",
"rstest_macros", "rstest_macros",
"rustc_version", "rustc_version",
] ]
[[package]] [[package]]
name = "rstest_macros" name = "rstest_macros"
version = "0.24.0" version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef0053bbffce09062bee4bcc499b0fbe7a57b879f1efe088d6d8d4c7adcdef9b" checksum = "825ea780781b15345a146be27eaefb05085e337e869bff01b4306a4fd4a9ad5a"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"glob", "glob",
@ -1800,12 +1864,6 @@ version = "0.1.24"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
[[package]]
name = "rustc-hash"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497"
[[package]] [[package]]
name = "rustc_version" name = "rustc_version"
version = "0.4.1" version = "0.4.1"
@ -1835,7 +1893,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b"
dependencies = [ dependencies = [
"once_cell", "once_cell",
"ring",
"rustls-pki-types", "rustls-pki-types",
"rustls-webpki", "rustls-webpki",
"subtle", "subtle",
@ -1856,9 +1913,6 @@ name = "rustls-pki-types"
version = "1.10.0" version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b"
dependencies = [
"web-time",
]
[[package]] [[package]]
name = "rustls-webpki" name = "rustls-webpki"
@ -1883,12 +1937,44 @@ version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
[[package]]
name = "schannel"
version = "0.1.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d"
dependencies = [
"windows-sys 0.59.0",
]
[[package]] [[package]]
name = "scopeguard" name = "scopeguard"
version = "1.2.0" 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 = "security-framework"
version = "2.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02"
dependencies = [
"bitflags 2.6.0",
"core-foundation",
"core-foundation-sys",
"libc",
"security-framework-sys",
]
[[package]]
name = "security-framework-sys"
version = "2.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2"
dependencies = [
"core-foundation-sys",
"libc",
]
[[package]] [[package]]
name = "semver" name = "semver"
version = "1.0.23" version = "1.0.23"
@ -2090,6 +2176,27 @@ dependencies = [
"syn", "syn",
] ]
[[package]]
name = "system-configuration"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b"
dependencies = [
"bitflags 2.6.0",
"core-foundation",
"system-configuration-sys",
]
[[package]]
name = "system-configuration-sys"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4"
dependencies = [
"core-foundation-sys",
"libc",
]
[[package]] [[package]]
name = "tempfile" name = "tempfile"
version = "3.14.0" version = "3.14.0"
@ -2125,26 +2232,6 @@ dependencies = [
"syn", "syn",
] ]
[[package]]
name = "thiserror"
version = "2.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "2.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]] [[package]]
name = "thread_local" name = "thread_local"
version = "1.1.8" version = "1.1.8"
@ -2165,21 +2252,6 @@ dependencies = [
"zerovec", "zerovec",
] ]
[[package]]
name = "tinyvec"
version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8"
dependencies = [
"tinyvec_macros",
]
[[package]]
name = "tinyvec_macros"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]] [[package]]
name = "tokio" name = "tokio"
version = "1.42.0" version = "1.42.0"
@ -2210,6 +2282,16 @@ dependencies = [
"syn", "syn",
] ]
[[package]]
name = "tokio-native-tls"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"
dependencies = [
"native-tls",
"tokio",
]
[[package]] [[package]]
name = "tokio-rustls" name = "tokio-rustls"
version = "0.26.1" version = "0.26.1"
@ -2546,6 +2628,12 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
[[package]]
name = "vcpkg"
version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
[[package]] [[package]]
name = "version_check" name = "version_check"
version = "0.9.5" version = "0.9.5"
@ -2657,25 +2745,6 @@ dependencies = [
"wasm-bindgen", "wasm-bindgen",
] ]
[[package]]
name = "web-time"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb"
dependencies = [
"js-sys",
"wasm-bindgen",
]
[[package]]
name = "webpki-roots"
version = "0.26.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e"
dependencies = [
"rustls-pki-types",
]
[[package]] [[package]]
name = "winapi" name = "winapi"
version = "0.3.9" version = "0.3.9"

View file

@ -19,15 +19,11 @@ derive_more = { version = "1.0", features = [
"from", "from",
] } ] }
inquire = "0.7" inquire = "0.7"
kameo = "0.14" kameo = "0.13"
# kxio = { path = "../kxio/" } # kxio = { path = "../kxio/" }
kxio = "5.1" kxio = "5.0"
rand = "0.8" rand = "0.8"
reqwest = { version = "0.12", default-features = false, features = [ reqwest = { version = "0.12", features = ["multipart", "stream"] }
"multipart",
"rustls-tls",
"stream",
] }
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0" serde_json = "1.0"
tokio = { version = "1.41", features = ["full", "tracing"] } tokio = { version = "1.41", features = ["full", "tracing"] }
@ -41,5 +37,5 @@ assert2 = "0.3"
http = "1.2" http = "1.2"
mutants = "0.0" mutants = "0.0"
pretty_assertions = "1.4" pretty_assertions = "1.4"
rstest = "0.24" rstest = "0.23"
test-log = { version = "0.2", features = ["trace"] } test-log = { version = "0.2", features = ["trace"] }

View file

@ -22,22 +22,6 @@ This will create a `trello-to-deck.toml` file in the current directory.
Edit this file to add your Trello and Nextcloud credentials. Edit this file to add your Trello and Nextcloud credentials.
### Import
To import your Trello Board into Nextcloud Deck, use the command:
```bash
trello-2-deck import
```
This will read the credentials from the `trello-2-deck.toml` file in the current
directory. You will prompted to select a Trello Board, then some or all of the
Lists from that Board. To begin your import, select the Nextcloud Deck Board
to add the lists and cards to.
It is recommended to create a test board to confirm importing is working as you
expect.
### Trello Credentials ### Trello Credentials
To autheniticate to Trello and be able to download the attachements for each card, you need to register a Power Up as a Developer. To autheniticate to Trello and be able to download the attachements for each card, you need to register a Power Up as a Developer.
@ -80,16 +64,33 @@ Run the `check` command to validate your configuration:
trello-to-deck check trello-to-deck check
``` ```
## Support Features ## Support
| Feature | Supported | | Feature | Supported |
|--------------------------|-----------| |--------------------------|-------------|
| Stacks/Lists | y | | Stacks/Lists | y |
| Cards | y | | Cards | y |
| Card Title | y | | Card Title | y |
| Card Description | y | | Card Description | y |
| Card Labels | y | | Card Labels | y |
| Card Attachments (files) | y | | Card Attachments (files) | y |
| Card Attachments (links) | n | | Card Attachments (links) | n |
| Card Due Date | y | | Card Due Date | n (planned) |
| Card Assignment | n |
## Development
As part of building the import server, the following commands exercise each operation involved:
- [x] trello member get - includes list of boards
- [x] trello board get - includes list of stacks
- [x] trello stack get - includes list of cards
- [x] trello card get - includes list of attachments
- [x] trello attachment get - includes download url
- [x] trello attachment save - saves to disk
- [x] nextcloud deck get - includes list of boards
- [x] nextcloud board get - includes list of stacks
- [x] nextcloud stack get - includes list of cards
- [x] nextcloud card get - shows card title
- [x] nextcloud card create
- [x] nextcloud card add-label
- [x] nextcloud card add-attachment

View file

@ -14,12 +14,6 @@ build:
# cargo doc # cargo doc
# cargo test --example get # cargo test --example get
test-in-docker:
docker run --rm -v $PWD:/app/ git.kemitix.net/kemitix/rust:latest cargo test
shell-in-docker:
docker run --rm -it -v $PWD:/app/ git.kemitix.net/kemitix/rust:latest bash
build-mutations: build mutations build-mutations: build mutations
mutations: mutations:

View file

@ -23,7 +23,7 @@ pub(crate) struct TrelloClient<'ctx> {
ctx: &'ctx FullCtx, ctx: &'ctx FullCtx,
} }
impl TrelloClient<'_> { impl<'ctx> TrelloClient<'ctx> {
fn url(&self, path: impl Into<String>) -> String { fn url(&self, path: impl Into<String>) -> String {
let path = path.into(); let path = path.into();
assert!(path.starts_with("/")); assert!(path.starts_with("/"));
@ -117,7 +117,7 @@ impl TrelloClient<'_> {
} }
} }
impl TrelloClient<'_> { impl<'ctx> TrelloClient<'ctx> {
// https://developer.atlassian.com/cloud/trello/rest/api-group-members/#api-members-id-boards-get // https://developer.atlassian.com/cloud/trello/rest/api-group-members/#api-members-id-boards-get
pub(crate) async fn boards(&self) -> APIResult<Vec<TrelloBoard>> { pub(crate) async fn boards(&self) -> APIResult<Vec<TrelloBoard>> {
self.request("/members/me/boards", |net, url| { self.request("/members/me/boards", |net, url| {