-
-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
95 changed files
with
31,558 additions
and
53,788 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
mkdir -p $HOME/.config/activitywatch/aw-server | ||
|
||
# Configure CORS | ||
# FIXME: Why is this not needed for aw-server-rust? | ||
# FIXME: Ideally this should only need to contain the cors_origins keys, with fallback to defaults | ||
cat > $HOME/.config/activitywatch/aw-server/aw-server.toml <<- EOM | ||
[server] | ||
#host = "localhost" | ||
#port = "5600" | ||
#storage = "peewee" | ||
cors_origins = "http://localhost:27180" | ||
[server-testing] | ||
#host = "localhost" | ||
#port = "5666" | ||
#storage = "peewee" | ||
cors_origins = "http://localhost:27180" | ||
EOM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# NOTE: For screenshots to work in untrusted PRs we need to do the screenshot comment in a trusted job like this one. | ||
# See this post for details: https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ | ||
|
||
name: Comment | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Build"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
comment: | ||
runs-on: ubuntu-latest | ||
if: > | ||
${{ github.event.workflow_run.conclusion == 'success' }} # && github.event.workflow_run.event == 'pull_request' | ||
steps: | ||
- uses: iterative/setup-cml@v1 | ||
|
||
# Doesn't work for fetching artifacts from separate workflows | ||
#- name: Download screenshots | ||
# uses: actions/download-artifact@v2 | ||
# with: | ||
# name: screenshots | ||
# path: screenshots | ||
|
||
- name: 'Download artifact' | ||
uses: actions/github-script@v3.1.0 | ||
with: | ||
script: | | ||
var artifacts = await github.actions.listWorkflowRunArtifacts({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
run_id: ${{ github.event.workflow_run.id }}, | ||
}); | ||
var matchArtifact = artifacts.data.artifacts.filter((artifact) => { | ||
return artifact.name == "screenshots" | ||
})[0]; | ||
var download = await github.actions.downloadArtifact({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
artifact_id: matchArtifact.id, | ||
archive_format: 'zip', | ||
}); | ||
var fs = require('fs'); | ||
fs.writeFileSync('${{github.workspace}}/screenshots.zip', Buffer.from(download.data)); | ||
- run: unzip -d screenshots screenshots.zip | ||
|
||
- name: Compose comment | ||
env: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
echo "Here are screenshots of this commit:" >> comment.md | ||
echo "" >> comment.md # just for the newline | ||
for aw_server_dir in screenshots/aw-*; do | ||
for aw_version_dir in $aw_server_dir/*; do | ||
aw_server=$(basename $aw_server_dir) | ||
aw_version=$(basename $aw_version_dir) | ||
echo "<details><summary>Screenshots using $aw_server $aw_version (click to expand)</summary>" >> comment.md | ||
echo '<p float="left">' >> comment.md | ||
cml-publish $aw_version_dir/activity.png | sed -E 's/.+/<img width="45%" src="\0"\/>/' >> comment.md | ||
cml-publish $aw_version_dir/timeline.png | sed -E 's/.+/<img width="45%" src="\0"\/>/' >> comment.md | ||
cml-publish $aw_version_dir/settings.png | sed -E 's/.+/<img width="45%" src="\0"\/>/' >> comment.md | ||
cml-publish $aw_version_dir/home.png | sed -E 's/.+/<img width="45%" src="\0"\/>/' >> comment.md | ||
cml-publish $aw_version_dir/buckets.png | sed -E 's/.+/<img width="45%" src="\0"\/>/' >> comment.md | ||
cml-publish $aw_version_dir/stopwatch.png | sed -E 's/.+/<img width="45%" src="\0"\/>/' >> comment.md | ||
echo '</p>' >> comment.md | ||
echo -n '</details>' >> comment.md | ||
done | ||
done | ||
- name: Post screenshots in commit comment | ||
env: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
head_sha: ${{ github.event.workflow_run.head_sha }} | ||
run: | | ||
cml-send-comment --commit-sha $head_sha --repo https://github.com/ActivityWatch/aw-webui comment.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
module.exports = { | ||
presets: ['@vue/cli-plugin-babel/preset'], | ||
plugins: ['lodash', '@babel/plugin-syntax-dynamic-import'], | ||
plugins: [ | ||
'lodash', | ||
'@babel/plugin-syntax-dynamic-import', | ||
'@babel/plugin-proposal-nullish-coalescing-operator', | ||
], | ||
comments: false, | ||
}; |
Oops, something went wrong.
c352418
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are screenshots of this commit:
Screenshots using aw-server v0.11.0 (click to expand)
Screenshots using aw-server-rust v0.11.0 (click to expand)