diff --git a/.github/workflows/diagrams.yml b/.github/workflows/diagrams.yml
new file mode 100644
index 0000000000..9e38ca53a7
--- /dev/null
+++ b/.github/workflows/diagrams.yml
@@ -0,0 +1,56 @@
+name: diagrams
+on:
+ workflow_dispatch:
+
+jobs:
+ diagrams:
+ runs-on: ubuntu-latest
+ name: "Create class diagrams of all packages"
+ steps:
+ - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d # pin@v1
+ with:
+ sdk: stable
+
+ - uses: actions/checkout@v3
+
+ - name: dependencies
+ run: |
+ dart pub global activate lakos
+ sudo apt update
+ sudo apt install graphviz
+
+ - name: dart
+ working-directory: ./dart
+ run: lakos . -i "{test/**,example/**,example_web/**}" | dot -Tsvg -o class-diagram.svg
+
+ - name: flutter
+ working-directory: ./flutter
+ run: lakos . -i "{test/**,example/**}" | dot -Tsvg -o class-diagram.svg
+
+ - name: dio
+ working-directory: ./dio
+ run: lakos . -i "{test/**,example/**}" | dot -Tsvg -o class-diagram.svg
+
+ - name: file
+ working-directory: ./file
+ run: lakos . -i "{test/**,example/**}" | dot -Tsvg -o class-diagram.svg
+
+ - name: sqflite
+ working-directory: ./sqflite
+ run: lakos . -i "{test/**,example/**}" | dot -Tsvg -o class-diagram.svg
+
+ - name: logging
+ working-directory: ./logging
+ run: lakos . -i "{test/**,example/**}" | dot -Tsvg -o class-diagram.svg
+
+ # Source: https://stackoverflow.com/a/58035262
+ - name: Extract branch name
+ shell: bash
+ run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
+ id: extract_branch
+
+ # actions/checkout fetches only a single commit in a detached HEAD state. Therefore
+ # we need to pass the current branch, otherwise we can't commit the changes.
+ # GITHUB_HEAD_REF is the name of the head branch. GitHub Actions only sets this for PRs.
+ - name: Commit & push
+ run: ./scripts/commit-code.sh ${{ steps.extract_branch.outputs.branch }} "Update class diagrams"
diff --git a/.github/workflows/format-and-fix.yml b/.github/workflows/format-and-fix.yml
index fa77a33098..5cdcb6e5f7 100644
--- a/.github/workflows/format-and-fix.yml
+++ b/.github/workflows/format-and-fix.yml
@@ -51,4 +51,4 @@ jobs:
# we need to pass the current branch, otherwise we can't commit the changes.
# GITHUB_HEAD_REF is the name of the head branch. GitHub Actions only sets this for PRs.
- name: Commit & push
- run: ./scripts/commit-formatted-code.sh ${{ steps.extract_branch.outputs.branch }}
+ run: ./scripts/commit-code.sh ${{ steps.extract_branch.outputs.branch }} "Format & fix code"
diff --git a/dart/class-diagram.svg b/dart/class-diagram.svg
new file mode 100644
index 0000000000..db98a9ad63
--- /dev/null
+++ b/dart/class-diagram.svg
@@ -0,0 +1,3364 @@
+
+
+
+
+
diff --git a/dio/class-diagram.svg b/dio/class-diagram.svg
new file mode 100644
index 0000000000..0e368cbdf5
--- /dev/null
+++ b/dio/class-diagram.svg
@@ -0,0 +1,159 @@
+
+
+
+
+
diff --git a/file/class-diagram.svg b/file/class-diagram.svg
new file mode 100644
index 0000000000..e8497bd57d
--- /dev/null
+++ b/file/class-diagram.svg
@@ -0,0 +1,111 @@
+
+
+
+
+
diff --git a/flutter/class-diagram.svg b/flutter/class-diagram.svg
new file mode 100644
index 0000000000..511429f7f8
--- /dev/null
+++ b/flutter/class-diagram.svg
@@ -0,0 +1,869 @@
+
+
+
+
+
diff --git a/logging/class-diagram.svg b/logging/class-diagram.svg
new file mode 100644
index 0000000000..327f533953
--- /dev/null
+++ b/logging/class-diagram.svg
@@ -0,0 +1,69 @@
+
+
+
+
+
diff --git a/scripts/commit-formatted-code.sh b/scripts/commit-code.sh
similarity index 67%
rename from scripts/commit-formatted-code.sh
rename to scripts/commit-code.sh
index 8f77921ceb..b3c1ad9914 100755
--- a/scripts/commit-formatted-code.sh
+++ b/scripts/commit-code.sh
@@ -2,15 +2,16 @@
set -euo pipefail
GITHUB_BRANCH="${1}"
+COMMIT_MESSAGE="${2}"
if [[ $(git status) == *"nothing to commit"* ]]; then
- echo "Nothing to commit. All code formatted correctly."
+ echo "Nothing to commit."
else
- echo "Formatted some code. Going to push the changes."
+ echo "Changed some code. Going to push the changes."
git config --global user.name 'Sentry Github Bot'
git config --global user.email 'bot+github-bot@sentry.io'
git fetch
git checkout ${GITHUB_BRANCH}
- git commit -am "Format & fix code"
+ git commit -am "${COMMIT_MESSAGE}"
git push --set-upstream origin ${GITHUB_BRANCH}
fi
diff --git a/sqflite/class-diagram.svg b/sqflite/class-diagram.svg
new file mode 100644
index 0000000000..882e930afe
--- /dev/null
+++ b/sqflite/class-diagram.svg
@@ -0,0 +1,194 @@
+
+
+
+
+