Skip to content

Commit

Permalink
Merge branch 'main' into gh-5-screenshot-format-png
Browse files Browse the repository at this point in the history
  • Loading branch information
jmetrikat authored Jan 28, 2024
2 parents ba23411 + a32390b commit 45dfd39
Show file tree
Hide file tree
Showing 60 changed files with 67 additions and 33 deletions.
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/new_experience.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ body:
attributes:
label: Title
description: The Experience title will be displayed in the Gallery.
placeholder: "Maximum length of 40 characters."
validations:
required: true
- type: textarea
Expand All @@ -39,6 +40,7 @@ body:
attributes:
label: Description
description: It helps people understand what the Experience provides. It will be displayed in the Gallery.
placeholder: "Maximum length of 260 characters."
validations:
required: true
- type: dropdown
Expand Down Expand Up @@ -391,7 +393,7 @@ body:
options:
- label: I agree that this Experience is licensed under the MIT License.
required: true
- label: I have intellectual property rights and/or permission to contribute the Experience and its content.
- label: I have intellectual property rights and/or permission to contribute the Experience and its content.
required: true
- label: I confirm that the Experience does not contain any harmful or malicious content.
required: true
6 changes: 3 additions & 3 deletions .github/workflows/manage-experience.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
with:
template-path: .github/ISSUE_TEMPLATE/new_experience.yml
- run: |
echo "experience_name=$(echo ${{ steps.issue-parser.outputs.issueparser_title }} | sed -e 's/[^[:alnum:]]/_/g' | tr -s '_' | tr A-Z a-z)" >> "$GITHUB_ENV"
echo "command=$(echo ${{ github.event.comment.body }} | cut -d' ' -f2)" >> "$GITHUB_ENV"
- run: echo "pr=$(gh pr view ${{ env.experience_name }} --json=number -q='.number')" >> "$GITHUB_ENV"
echo "experience_name=$(echo '${{ steps.issue-parser.outputs.issueparser_title }}' | sed -e 's/[^[:alnum:]]/_/g' | tr -s '_' | tr A-Z a-z)" >> "$GITHUB_ENV"
echo "command=$(echo '${{ github.event.comment.body }}' | cut -d' ' -f2)" >> "$GITHUB_ENV"
- run: echo "pr=$(gh pr view '${{ env.experience_name }}' --json=number -q='.number')" >> "$GITHUB_ENV"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- id: reject
Expand Down
58 changes: 45 additions & 13 deletions .github/workflows/parse-new-experience.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
on:
issues:
types: [labeled]
types: [labeled, edited]

name: Parse New Experience
jobs:
new_experience:
if: github.event.label.name == 'experience'
if: github.event.label.name == 'experience' || github.event.action == 'edited'
runs-on: ubuntu-latest
permissions:
issues: write
Expand All @@ -17,12 +17,24 @@ jobs:
id: issue-parser
with:
template-path: .github/ISSUE_TEMPLATE/new_experience.yml
- run: echo '${{ steps.issue-parser.outputs.jsonString }}' > issue.json
- run: |
echo "experience_name=$(echo '${{ steps.issue-parser.outputs.issueparser_title }}' | sed -e 's/[^[:alnum:]]/_/g' | tr -s '_' | tr A-Z a-z)" >> "$GITHUB_ENV"
echo "id=$(uuidgen)" >> "$GITHUB_ENV"
- run: |
jq '. + {"author": "${{ github.event.issue.user.login }}", "name": "${{ env.experience_name }}", "id": "${{ env.id }}"}' issue.json > tmp && mv tmp issue.json
- name: Create issue.json
run: echo '${{ steps.issue-parser.outputs.jsonString }}' > issue.json
- name: Check length restriction for title and description
id: check-restrictions
run: |
title_length=$(jq '.title | length' issue.json)
description_length=$(jq '.description | length' issue.json)
if [ $title_length -gt 40 ]; then
echo "title_length_comment=Title is too long: $title_length characters, but only 40 are allowed." >> $GITHUB_OUTPUT
echo "restrictions_exceeded=true" >> $GITHUB_ENV
fi
if [ $description_length -gt 260 ]; then
echo "description_length_comment=Description is too long: $description_length characters, but only 260 are allowed." >> $GITHUB_OUTPUT
echo "restrictions_exceeded=true" >> $GITHUB_ENV
fi
if [ $title_length -le 40 ] && [ $description_length -le 260 ]; then
echo "restrictions_exceeded=false" >> $GITHUB_ENV
fi
- name: Check screenshot format
id: check-screenshot-format
run: |
Expand All @@ -42,17 +54,37 @@ jobs:
echo EOF
} >> "$GITHUB_OUTPUT"
- name: Comment and add label to issue
if: ${{ env.incorrect_screen_format == 'true' }}
if: ${{ env.restrictions_exceeded == 'true' || env.incorrect_screen_format == 'true' }}
run: gh issue comment "$NUMBER" --body "$BODY" && gh issue edit "$NUMBER" --add-label "$LABELS"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }}
LABELS: changes_requested
BODY: "I've noticed a problem with your submission. Please fix it by editing your issue:\n\n
${{ steps.check-restrictions.outputs.title_length_comment }}\n
${{ steps.check-restrictions.outputs.description_length_comment }}\n
${{ steps.check-screenshot-format.outputs.screenshot_format_comment }}"
- id: manifest-builder
if: ${{ env.incorrect_screen_format == 'false' }}
- name: Remove label from issue if restrictions are not exceeded
if: ${{ env.restrictions_exceeded == 'false' && env.incorrect_screen_format == 'false' }}
run: gh issue edit "$NUMBER" --remove-label "$LABELS"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }}
LABELS: changes_requested
- name: Create experience name and id
if: ${{ env.restrictions_exceeded == 'false' && env.incorrect_screen_format == 'false' }}
run: |
echo "experience_name=$(echo '${{ steps.issue-parser.outputs.issueparser_title }}' | sed -e 's/[^[:alnum:]]/_/g' | tr -s '_' | tr A-Z a-z)" >> "$GITHUB_ENV"
echo "id=$(uuidgen)" >> "$GITHUB_ENV"
- name: Add author, name and id to issue.json
if: ${{ env.restrictions_exceeded == 'false' && env.incorrect_screen_format == 'false' }}
run: |
jq '. + {"author": "${{ github.event.issue.user.login }}", "name": "${{ env.experience_name }}", "id": "${{ env.id }}"}' issue.json > tmp && mv tmp issue.json
- name: Build manifest
id: manifest-builder
if: ${{ env.restrictions_exceeded == 'false' && env.incorrect_screen_format == 'false' }}
run: |
node tools/prepare-experience.js
rm issue.json
Expand All @@ -68,7 +100,7 @@ jobs:
echo "test-manifest=anytype://main/import/?type=experience&source=https%3A%2F%2Fgithub.com%2Fanyproto%2Fgallery%2Fraw%2F${{ env.experience_name }}%2Fexperiences%2F${{ env.experience_name }}%2Ftest-manifest.json" >> "$GITHUB_ENV"
- name: Create Pull Request
id: cpr
if: ${{ env.incorrect_screen_format == 'false' }}
if: ${{ env.restrictions_exceeded == 'false' && env.incorrect_screen_format == 'false' }}
uses: peter-evans/create-pull-request@v5
with:
commit-message: "Add preview for ${{ steps.issue-parser.outputs.issueparser_title }}"
Expand All @@ -78,7 +110,7 @@ jobs:
title: "Add experience ${{ steps.issue-parser.outputs.issueparser_title }}"
body: "Based on issue #${{ github.event.issue.number }}"
- name: Comment on Issue
if: ${{ env.incorrect_screen_format == 'false' }}
if: ${{ env.restrictions_exceeded == 'false' && env.incorrect_screen_format == 'false' }}
run: gh issue comment "$NUMBER" --body "$BODY"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Binary file modified experiences/daily_journal/daily_journal.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion experiences/daily_journal/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
"https://storage.gallery.any.coop/daily_journal/screenshots/screenshot-2.png"
],
"downloadLink": "https://storage.gallery.any.coop/daily_journal/daily_journal.zip",
"fileSize": 796321
"fileSize": 770258
}
Binary file modified experiences/daily_journal/screenshots/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/daily_journal/screenshots/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/data_vault/data_vault.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion experiences/data_vault/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
"https://storage.gallery.any.coop/data_vault/screenshots/screenshot-2.png"
],
"downloadLink": "https://storage.gallery.any.coop/data_vault/data_vault.zip",
"fileSize": 775933
"fileSize": 746224
}
Binary file modified experiences/data_vault/screenshots/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/data_vault/screenshots/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/habit_tracker/habit_tracker.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion experiences/habit_tracker/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
"https://storage.gallery.any.coop/habit_tracker/screenshots/screenshot-1.png"
],
"downloadLink": "https://storage.gallery.any.coop/habit_tracker/habit_tracker.zip",
"fileSize": 650511
"fileSize": 624759
}
Binary file modified experiences/habit_tracker/screenshots/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/integrated_library/integrated_library.zip
Binary file not shown.
6 changes: 3 additions & 3 deletions experiences/integrated_library/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
],
"language": "en-US",
"screenshots": [
"https://storage.gallery.any.coop/integrated_library/screenshots/screenshot-2.png",
"https://storage.gallery.any.coop/integrated_library/screenshots/screenshot-1.png"
"https://storage.gallery.any.coop/integrated_library/screenshots/screenshot-1.png",
"https://storage.gallery.any.coop/integrated_library/screenshots/screenshot-2.png"
],
"downloadLink": "https://storage.gallery.any.coop/integrated_library/integrated_library.zip",
"fileSize": 2439126
"fileSize": 1357219
}
Binary file modified experiences/integrated_library/screenshots/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/integrated_library/screenshots/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/language_flashcards/language_flashcards.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion experiences/language_flashcards/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
"https://storage.gallery.any.coop/language_flashcards/screenshots/screenshot-3.png"
],
"downloadLink": "https://storage.gallery.any.coop/language_flashcards/language_flashcards.zip",
"fileSize": 11096897
"fileSize": 10064538
}
Binary file modified experiences/language_flashcards/screenshots/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/language_flashcards/screenshots/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/language_flashcards/screenshots/screenshot-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions experiences/meeting_notes_management/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
],
"language": "en-US",
"screenshots": [
"https://storage.gallery.any.coop/meeting_notes_management/screenshots/screenshot-2.png",
"https://storage.gallery.any.coop/meeting_notes_management/screenshots/screenshot-1.png"
"https://storage.gallery.any.coop/meeting_notes_management/screenshots/screenshot-1.png",
"https://storage.gallery.any.coop/meeting_notes_management/screenshots/screenshot-2.png"
],
"downloadLink": "https://storage.gallery.any.coop/meeting_notes_management/meeting_notes_management.zip",
"fileSize": 2517206
"fileSize": 1442525
}
Binary file not shown.
Binary file modified experiences/meeting_notes_management/screenshots/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion experiences/movie_database/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
"https://storage.gallery.any.coop/movie_database/screenshots/screenshot-2.png"
],
"downloadLink": "https://storage.gallery.any.coop/movie_database/movie_database.zip",
"fileSize": 2911623
"fileSize": 2888205
}
Binary file modified experiences/movie_database/movie_database.zip
Binary file not shown.
Binary file modified experiences/movie_database/screenshots/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/movie_database/screenshots/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion experiences/para_and_coder_setup/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
"https://storage.gallery.any.coop/para_and_coder_setup/screenshots/screenshot-6.png"
],
"downloadLink": "https://storage.gallery.any.coop/para_and_coder_setup/para_and_coder_setup.zip",
"fileSize": 3254776
"fileSize": 2182654
}
Binary file modified experiences/para_and_coder_setup/para_and_coder_setup.zip
Binary file not shown.
Binary file modified experiences/para_and_coder_setup/screenshots/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/para_and_coder_setup/screenshots/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/para_and_coder_setup/screenshots/screenshot-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/para_and_coder_setup/screenshots/screenshot-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/para_and_coder_setup/screenshots/screenshot-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
"https://storage.gallery.any.coop/para_tasks_resources_meeting_notes_crm/screenshots/screenshot-5.png"
],
"downloadLink": "https://storage.gallery.any.coop/para_tasks_resources_meeting_notes_crm/para_tasks_resources_meeting_notes_crm.zip",
"fileSize": 8068542
"fileSize": 7153055
}
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion experiences/recipe_book_and_meal_planner/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
"https://storage.gallery.any.coop/recipe_book_and_meal_planner/screenshots/screenshot-2.png"
],
"downloadLink": "https://storage.gallery.any.coop/recipe_book_and_meal_planner/recipe_book_and_meal_planner.zip",
"fileSize": 2340258
"fileSize": 2312564
}
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion experiences/study_hub/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
"https://storage.gallery.any.coop/study_hub/screenshots/screenshot-2.png"
],
"downloadLink": "https://storage.gallery.any.coop/study_hub/study_hub.zip",
"fileSize": 219777
"fileSize": 124637
}
Binary file modified experiences/study_hub/screenshots/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified experiences/study_hub/screenshots/screenshot-2.png
Binary file modified experiences/study_hub/study_hub.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion experiences/trip_planner/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
"https://storage.gallery.any.coop/trip_planner/screenshots/screenshot-2.png"
],
"downloadLink": "https://storage.gallery.any.coop/trip_planner/trip_planner.zip",
"fileSize": 4316382
"fileSize": 3449483
}
Binary file modified experiences/trip_planner/screenshots/screenshot-1.png
Binary file modified experiences/trip_planner/screenshots/screenshot-2.png
Binary file modified experiences/trip_planner/trip_planner.zip
Binary file not shown.
Binary file modified experiences/zen_system/screenshots/screenshot-1.png
Binary file modified experiences/zen_system/screenshots/screenshot-2.png
Binary file modified experiences/zen_system/screenshots/screenshot-3.png
Binary file modified experiences/zen_system/screenshots/screenshot-4.png
Binary file modified experiences/zen_system/screenshots/screenshot-5.png

0 comments on commit 45dfd39

Please sign in to comment.