Skip to content

Commit 2d33912

Browse files
authored
Sync with upstream plausible/analytics (#2)
1 parent 36aba37 commit 2d33912

1,163 files changed

Lines changed: 130309 additions & 37518 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.credo.exs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@
117117
{Credo.Check.Refactor.Apply, []},
118118
{Credo.Check.Refactor.CondStatements, []},
119119
{Credo.Check.Refactor.CyclomaticComplexity, false},
120+
{Credo.Check.Refactor.FilterCount, []},
121+
{Credo.Check.Refactor.FilterFilter, []},
122+
{Credo.Check.Refactor.MatchInCondition, []},
123+
{Credo.Check.Refactor.RedundantWithClauseResult, []},
124+
{Credo.Check.Refactor.RejectReject, []},
120125
{Credo.Check.Refactor.FunctionArity, []},
121126
{Credo.Check.Refactor.LongQuoteBlocks, []},
122127
{Credo.Check.Refactor.MatchInCondition, []},
@@ -133,6 +138,7 @@
133138
#
134139
## Warnings
135140
#
141+
{Credo.Check.Warning.Dbg, []},
136142
{Credo.Check.Warning.ApplicationConfigInModuleAttribute, []},
137143
{Credo.Check.Warning.BoolOperationOnSameValues, []},
138144
{Credo.Check.Warning.ExpensiveEmptyEnumCheck, []},

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ npm-debug.log
5959

6060
# Auto-generated tracker files
6161
/priv/tracker/js/*.js
62+
/priv/tracker/installation_support/
6263

6364
# Dializer
6465
/priv/plts/*.plt

.formatter.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[
22
plugins: [Phoenix.LiveView.HTMLFormatter],
3-
import_deps: [:ecto, :ecto_sql, :phoenix],
3+
import_deps: [:ecto, :ecto_sql, :phoenix, :polymorphic_embed],
44
subdirectories: ["priv/*/migrations"],
55
inputs: [
66
"*.{heex,ex,exs}",

.github/workflows/all-checks-pass.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ jobs:
1111
checks: read
1212
steps:
1313
- name: GitHub Checks
14-
uses: poseidon/wait-for-status-checks@v0.6.0
14+
uses: poseidon/wait-for-status-checks@899c768d191b56eef585c18f8558da19e1f3e707 # v0.6.0
1515
with:
16-
token: ${{ secrets.GITHUB_TOKEN }}
16+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/build-private-images-ghcr.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
steps:
2424
- name: Docker meta
2525
id: meta
26-
uses: docker/metadata-action@v5.0.0
26+
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
2727
env:
2828
DOCKER_METADATA_PR_HEAD_SHA: true
2929
with:
@@ -35,18 +35,18 @@ jobs:
3535
type=sha
3636
3737
- name: Set up Docker Buildx
38-
uses: docker/setup-buildx-action@v3
38+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
3939

4040
- name: Login to GitHub Container Registry
41-
uses: docker/login-action@v3
41+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
4242
with:
4343
registry: ghcr.io
4444
username: ${{ github.actor }}
4545
password: ${{ secrets.GITHUB_TOKEN }}
4646

4747
- name: Build and push
4848
id: docker_build
49-
uses: docker/build-push-action@v6
49+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
5050
with:
5151
push: true
5252
tags: ${{ steps.meta.outputs.tags }}
@@ -62,22 +62,38 @@ jobs:
6262

6363
- name: Notify team on failure
6464
if: ${{ failure() && github.ref == 'refs/heads/master' }}
65-
uses: fjogeleit/http-request-action@v1
65+
uses: fjogeleit/http-request-action@551353b829c3646756b2ec2b3694f819d7957495 # v2.0.0
6666
with:
6767
url: ${{ secrets.BUILD_NOTIFICATION_URL }}
6868
method: 'POST'
6969
customHeaders: '{"Content-Type": "application/json"}'
7070
data: '{"content": "<a href=\"https://github.com/plausible/analytics/actions/workflows/build-private-images.yml\">Build failed</a>"}'
7171

72+
- name: Get first line and Co-Authored-By lines of the commit message
73+
if: ${{ success() && github.ref == 'refs/heads/master' }}
74+
id: commitmsg
75+
env:
76+
COMMIT_MSG: ${{ github.event.head_commit.message }}
77+
run: |
78+
first_line=$(printf '%s\n' "$COMMIT_MSG" | head -n1 | xargs)
79+
co_authors=$(printf '%s\n' "$COMMIT_MSG" | grep -h 'Co-authored-by:' | sort -u | cut -d: -f2- | paste -sd, - | xargs)
80+
{
81+
echo "first_line=$first_line"
82+
echo "co_authors=$co_authors"
83+
} >> $GITHUB_OUTPUT
84+
7285
- name: Notify team on success
7386
if: ${{ success() && github.ref == 'refs/heads/master' }}
74-
uses: fjogeleit/http-request-action@v1
87+
uses: fjogeleit/http-request-action@551353b829c3646756b2ec2b3694f819d7957495 # v2.0.0
7588
with:
7689
url: ${{ secrets.BUILD_NOTIFICATION_URL }}
7790
method: 'POST'
7891
customHeaders: '{"Content-Type": "application/json"}'
7992
escapeData: 'true'
80-
data: '{"content": "<h1>🚀 New changes are about to be deployed to production!</h1><br/><h3>👷 Author: ${{ github.actor }}</h3><br/><p>📝 Commit message: ${{ github.event.head_commit.message }}</p><br/>"}'
93+
data: |
94+
{
95+
"content": "<h1>🚀 Deploying ${{ steps.commitmsg.outputs.first_line }}</h1><p>Author(s): ${{ github.event.head_commit.author.name }}<br/>${{ steps.commitmsg.outputs.co_authors}}</p><p>Commit: <a href=\"${{ github.event.head_commit.url }}\">${{ github.sha }}</a></p>"
96+
}
8197
8298
- name: Set Honeycomb marker on success
8399
if: ${{ success() && github.ref == 'refs/heads/master' }}

.github/workflows/build-public-images-ghcr.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,23 @@ jobs:
3232
3333
- name: Docker meta
3434
id: meta
35-
uses: docker/metadata-action@v5
35+
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
3636
with:
3737
images: ${{ env.GHCR_REPO }}
3838

3939
- name: Set up Docker Buildx
40-
uses: docker/setup-buildx-action@v3
40+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
4141

4242
- name: Login to GitHub Container Registry
43-
uses: docker/login-action@v3
43+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
4444
with:
4545
registry: ghcr.io
4646
username: ${{ github.actor }}
4747
password: ${{ secrets.GITHUB_TOKEN }}
4848

4949
- name: Build
5050
id: docker_build
51-
uses: docker/build-push-action@v6
51+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
5252
with:
5353
labels: ${{ steps.meta.outputs.labels }}
5454
outputs: type=image,name=${{ env.GHCR_REPO }},push-by-digest=true,name-canonical=true,push=true
@@ -68,7 +68,7 @@ jobs:
6868
touch "${{ runner.temp }}/digests/${digest#sha256:}"
6969
7070
- name: Upload digest
71-
uses: actions/upload-artifact@v4
71+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
7272
with:
7373
name: digests-${{ env.PLATFORM_PAIR }}
7474
path: ${{ runner.temp }}/digests/*
@@ -77,7 +77,7 @@ jobs:
7777

7878
- name: Notify team on failure
7979
if: ${{ failure() }}
80-
uses: fjogeleit/http-request-action@v1
80+
uses: fjogeleit/http-request-action@551353b829c3646756b2ec2b3694f819d7957495 # v2.0.0
8181
with:
8282
url: ${{ secrets.BUILD_NOTIFICATION_URL }}
8383
method: "POST"
@@ -91,21 +91,21 @@ jobs:
9191

9292
steps:
9393
- name: Download digests
94-
uses: actions/download-artifact@v4
94+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
9595
with:
9696
path: ${{ runner.temp }}/digests
9797
pattern: digests-*
9898
merge-multiple: true
9999

100-
- uses: docker/login-action@v3
100+
- uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
101101
with:
102102
registry: ghcr.io
103103
username: ${{ github.actor }}
104104
password: ${{ secrets.GITHUB_TOKEN }}
105105

106-
- uses: docker/setup-buildx-action@v3
106+
- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
107107

108-
- uses: docker/metadata-action@v5
108+
- uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
109109
id: meta
110110
with:
111111
images: ${{ env.GHCR_REPO }}

.github/workflows/codespell.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ jobs:
1010
codespell:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v4
14-
- uses: codespell-project/actions-codespell@v2
13+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
14+
- uses: codespell-project/actions-codespell@406322ec52dd7b488e48c1c4b82e2a8b3a1bf630 # v2.1
1515
with:
1616
check_filenames: true
1717
ignore_words_file: .codespellignore

.github/workflows/comment-preview-url.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Comment with preview URL
19-
uses: thollander/actions-comment-pull-request@v3.0.1
19+
uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1
2020
with:
2121
message: |
2222
<div align="center">

0 commit comments

Comments
 (0)