diff --git a/.github/workflows/pr-tagging.yml b/.github/workflows/pr-tagging.yml new file mode 100644 index 0000000000..d2f2264e29 --- /dev/null +++ b/.github/workflows/pr-tagging.yml @@ -0,0 +1,32 @@ +name: Tag app authors + +on: + pull_request: + types: [opened, synchronize] + +permissions: + issues: write + pull-requests: write + +jobs: + mention-app-authors: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install deps + run: | + sudo apt-get update + sudo apt-get install -y jq nodejs + + - name: Fetch relevant refs + run: | + # fetch master and unshallow HEAD + git fetch origin --unshallow + + - name: Tag app authors + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO: ${{ github.repository }} + PR_NUM: ${{ github.event.pull_request.number }} + run: node bin/pr-tag.js diff --git a/README.md b/README.md index 0bc5114500..eec0d0ef71 100644 --- a/README.md +++ b/README.md @@ -250,6 +250,7 @@ and which gives information about the app for the Launcher. "name": "Readable name", // readable name "shortName": "Short name", // short name for launcher "version": "0.01", // the version of this app + "author": "name", // name of app author (can be an array - ["author1", "author2"], used for tagging in PRs for the app) "description": "...", // long description (can contain markdown) "icon": "icon.png", // icon in apps/ "screenshots" : [ { "url":"screenshot.png" } ], // optional screenshot for app diff --git a/apps/_example_app/metadata.json b/apps/_example_app/metadata.json index 42dfca2b8b..6e1751cd9b 100644 --- a/apps/_example_app/metadata.json +++ b/apps/_example_app/metadata.json @@ -2,6 +2,7 @@ "name": "My app's human readable name", "shortName":"Short Name", "version":"0.01", + "author": "gfwilliams", "description": "A detailed description of my great app", "icon": "app.png", "tags": "", diff --git a/apps/_example_clkinfo/metadata.json b/apps/_example_clkinfo/metadata.json index 83b8184d8c..22acdf8123 100644 --- a/apps/_example_clkinfo/metadata.json +++ b/apps/_example_clkinfo/metadata.json @@ -2,6 +2,7 @@ "name": "My clock info's human readable name", "shortName":"Short Name", "version":"0.01", + "author": "gfwilliams", "description": "A detailed description of my clock info", "icon": "icon.png", "type": "clkinfo", diff --git a/apps/_example_clock/metadata.json b/apps/_example_clock/metadata.json index d9150af3c2..3bce63fd33 100644 --- a/apps/_example_clock/metadata.json +++ b/apps/_example_clock/metadata.json @@ -2,6 +2,7 @@ "name": "My clock human readable name", "shortName":"Short Name", "version":"0.01", + "author": "gfwilliams", "description": "A detailed description of my clock", "icon": "icon.png", "screenshots": [{"url":"screenshot.png"}], diff --git a/apps/_example_widget/metadata.json b/apps/_example_widget/metadata.json index 8dc7c75c61..7122d72cb3 100644 --- a/apps/_example_widget/metadata.json +++ b/apps/_example_widget/metadata.json @@ -2,6 +2,7 @@ "name": "My widget's human readable name", "shortName":"Short Name", "version":"0.01", + "author": "gfwilliams", "description": "A detailed description of my great widget", "icon": "icon.png", "type": "widget", diff --git a/apps/autoreset/metadata.json b/apps/autoreset/metadata.json index c8866924bc..902ffb6cd3 100644 --- a/apps/autoreset/metadata.json +++ b/apps/autoreset/metadata.json @@ -1,6 +1,7 @@ { "id": "autoreset", "name": "Auto Reset", "version":"0.02", + "author": "thyttan", "description": "Sets a timeout to load the clock face. The timeout is stopped and started again upon user input.", "icon": "app.png", "type": "bootloader", diff --git a/apps/beeptest/metadata.json b/apps/beeptest/metadata.json index 7c25a38488..abc0fe6d2c 100644 --- a/apps/beeptest/metadata.json +++ b/apps/beeptest/metadata.json @@ -3,6 +3,7 @@ "name": "Beep Test", "shortName": "Beep Test", "version": "0.01", + "author": "bb0x88", "description": "Aerobic fitness test created by Léger & Lambert", "icon": "beeptest.png", "tags": "health", diff --git a/apps/btadv/metadata.json b/apps/btadv/metadata.json index 71a0fedaf4..58fd2e0ed0 100644 --- a/apps/btadv/metadata.json +++ b/apps/btadv/metadata.json @@ -3,6 +3,7 @@ "name": "btadv", "shortName": "btadv", "version": "0.04", + "author": "bobrippling", "description": "Advertise & export live heart rate, accel, pressure, GPS & mag data over bluetooth", "icon": "icon.png", "tags": "health,tool,sensors,bluetooth", diff --git a/apps/bwclklite/metadata.json b/apps/bwclklite/metadata.json index ef51f72fef..19603178ea 100644 --- a/apps/bwclklite/metadata.json +++ b/apps/bwclklite/metadata.json @@ -2,6 +2,7 @@ "id": "bwclklite", "name": "BW Clock Lite", "version": "0.36", + "author": "thyttan", "description": "A very minimalistic clock. This version of BW Clock is quicker at the cost of the custom font.", "readme": "README.md", "icon": "app.png", diff --git a/apps/chess/metadata.json b/apps/chess/metadata.json index 1e2885392f..ac49d04c64 100644 --- a/apps/chess/metadata.json +++ b/apps/chess/metadata.json @@ -3,6 +3,7 @@ "name": "Chess", "shortName": "Chess", "version": "0.06", + "author": "nxdefiant", "description": "Chess game based on the [p4wn engine](https://p4wn.sourceforge.net/). Drag on the touchscreen to move the green cursor onto a piece, select it with a single touch and drag the now red cursor around. Release the piece with another touch to finish the move. The button opens a menu.", "icon": "app.png", "tags": "game", diff --git a/apps/chronlog/metadata.json b/apps/chronlog/metadata.json index 50a9166bf4..1775de2f85 100644 --- a/apps/chronlog/metadata.json +++ b/apps/chronlog/metadata.json @@ -1,6 +1,7 @@ { "id": "chronlog", "name": "Chrono Logger", "version":"0.01", + "author": "thyttan", "description": "Record time active on a task, course, work or anything really.", "icon": "app.png", "tags": "logging,record,work,tasks", diff --git a/apps/clkinfostopw/metadata.json b/apps/clkinfostopw/metadata.json index f33f61dbbf..4a85dd0ba2 100644 --- a/apps/clkinfostopw/metadata.json +++ b/apps/clkinfostopw/metadata.json @@ -2,6 +2,7 @@ "id": "clkinfostopw", "name": "Stop Watch Clockinfo", "version":"0.03", + "author": "bobrippling", "description": "A simple stopwatch, shown via clockinfo", "icon": "app.png", "type": "clkinfo", diff --git a/apps/confthyttan/metadata.json b/apps/confthyttan/metadata.json index e662879a76..cf199f66c2 100644 --- a/apps/confthyttan/metadata.json +++ b/apps/confthyttan/metadata.json @@ -1,6 +1,7 @@ { "id": "confthyttan", "name": "Thyttan's Default Config", "version":"0.06", + "author": "thyttan", "description": "A different default set of apps and configurations. Brings many quality of life improvements. Opinionated based on the creators taste. Read more below before installing.", "icon": "app.png", "type": "defaultconfig", diff --git a/apps/ctrlpad/metadata.json b/apps/ctrlpad/metadata.json index 273dcdd7f7..a4e1573239 100644 --- a/apps/ctrlpad/metadata.json +++ b/apps/ctrlpad/metadata.json @@ -3,6 +3,7 @@ "name": "Control Panel", "shortName": "ctrlpad", "version": "0.02", + "author": "bobrippling", "description": "Fast access (via a downward swipe) to common functions, such as bluetooth/HRM power and Do Not Disturb", "icon": "icon.png", "readme": "README.md", diff --git a/apps/delaylock/metadata.json b/apps/delaylock/metadata.json index 7441d822be..8a485fb0b5 100644 --- a/apps/delaylock/metadata.json +++ b/apps/delaylock/metadata.json @@ -1,6 +1,7 @@ { "id": "delaylock", "name": "Delayed Locking", "version":"0.01", + "author": "thyttan", "description": "Delay the locking of the screen to 5 seconds after the backlight turns off.", "icon": "app.png", "tags": "settings,configuration,backlight,touchscreen,screen", diff --git a/apps/dragboard/metadata.json b/apps/dragboard/metadata.json index c4596d7bdf..2819234918 100644 --- a/apps/dragboard/metadata.json +++ b/apps/dragboard/metadata.json @@ -1,6 +1,7 @@ { "id": "dragboard", "name": "Dragboard", "version":"0.10", + "author": "thyttan", "description": "A library for text input via swiping keyboard", "icon": "app.png", "type":"textinput", diff --git a/apps/drained/metadata.json b/apps/drained/metadata.json index 8aaec1220b..1e80f24294 100644 --- a/apps/drained/metadata.json +++ b/apps/drained/metadata.json @@ -2,6 +2,7 @@ "id": "drained", "name": "Drained", "version": "0.08", + "author": "bobrippling", "description": "Switches to displaying a simple clock when the battery percentage is low, and disables some peripherals", "readme": "README.md", "icon": "icon.png", diff --git a/apps/fastreset/metadata.json b/apps/fastreset/metadata.json index ccd5e1ce40..76632d1554 100644 --- a/apps/fastreset/metadata.json +++ b/apps/fastreset/metadata.json @@ -2,6 +2,7 @@ "name": "Fast Reset", "shortName":"Fast Reset", "version":"0.03", + "author": "thyttan", "description": "Reset the watch to the clock face by pressing the hardware button just a little bit longer than a click. If 'Fastload Utils' is installed this will typically be done with fastloading. A buzz acts as indicator.", "icon": "app.png", "type": "bootloader", diff --git a/apps/folderlaunch/metadata.json b/apps/folderlaunch/metadata.json index 9853c7dafe..2701b4e46b 100644 --- a/apps/folderlaunch/metadata.json +++ b/apps/folderlaunch/metadata.json @@ -2,6 +2,7 @@ "id": "folderlaunch", "name": "Folder launcher", "version": "0.04", + "author": "bruceblore", "description": "Launcher that allows you to put your apps into folders", "icon": "icon.png", "type": "launch", @@ -45,5 +46,5 @@ { "url": "screenshot2.png" } - ] + ] } diff --git a/apps/gbdiscon/metadata.json b/apps/gbdiscon/metadata.json index 904b4c6a22..f962e58d94 100644 --- a/apps/gbdiscon/metadata.json +++ b/apps/gbdiscon/metadata.json @@ -2,6 +2,7 @@ "name": "Disconnect from Gadgetbridge", "shortName":"Disconnect Gadgetbridge", "version":"0.01", + "author": "thyttan", "description": "Disconnect from your android device by running this app. The app will forward you to your clock face immediately after triggering the command. (Gadgetbridge nightly required until version 82 is released)", "icon": "app.png", "tags": "android,gadgetbridge,bluetooth,bt", diff --git a/apps/gpsautotime/metadata.json b/apps/gpsautotime/metadata.json index c852c6a3e7..8c63c176de 100644 --- a/apps/gpsautotime/metadata.json +++ b/apps/gpsautotime/metadata.json @@ -3,6 +3,7 @@ "name": "GPS auto time", "shortName": "GPS auto time", "version": "0.04", + "author": "nxdefiant", "description": "A widget that automatically updates the Bangle.js time to the GPS time whenever there is a valid GPS fix.", "icon": "widget.png", "type": "widget", diff --git a/apps/gpsmagcourse/metadata.json b/apps/gpsmagcourse/metadata.json index 057b01383f..fc45c6cc5b 100644 --- a/apps/gpsmagcourse/metadata.json +++ b/apps/gpsmagcourse/metadata.json @@ -4,6 +4,7 @@ "shortName":"GPS/Compass course", "icon": "app.png", "version":"0.01", + "author": "nxdefiant", "description": "Replaces the GPS course with the compass heading when speed is slow or standing still to avoid the value from jumping randomly. For best experience also install \"Navigation Compass\", although not a requirement (see README).", "type": "bootloader", "tags": "outdoors,widget", @@ -16,4 +17,3 @@ ], "data": [{"name":"gpsmagcourse.json"}] } - diff --git a/apps/hidjoystick/metadata.json b/apps/hidjoystick/metadata.json index c13ae2efa4..5662698736 100644 --- a/apps/hidjoystick/metadata.json +++ b/apps/hidjoystick/metadata.json @@ -3,6 +3,7 @@ "name": "Bluetooth Joystick", "shortName": "Joystick", "version": "0.02", + "author": "nxdefiant", "description": "Emulates a 2 axis/5 button Joystick using the accelerometer as stick input and buttons 1-3, touch left as button 4 and touch right as button 5. On Bangle.js 2 buttons 2-5 are emulated with the touchscreen.", "icon": "app.png", "tags": "bluetooth", diff --git a/apps/hrmmar/metadata.json b/apps/hrmmar/metadata.json index 5ff49f3fc3..a35923fd5d 100644 --- a/apps/hrmmar/metadata.json +++ b/apps/hrmmar/metadata.json @@ -4,6 +4,7 @@ "shortName":"HRM MA removal", "icon": "app.png", "version":"0.02", + "author": "nxdefiant", "description": "Removes Motion Artifacts in Bangle.js's heart rate sensor data. **WARNING:** On Bangle.js 2 this has been found to make heart rate readings substantially less accurate in some cases.", "type": "bootloader", "tags": "health", diff --git a/apps/longpressbuzz/metadata.json b/apps/longpressbuzz/metadata.json index 56e06f0bd1..182d1a9e7f 100644 --- a/apps/longpressbuzz/metadata.json +++ b/apps/longpressbuzz/metadata.json @@ -2,6 +2,7 @@ "name": "Long Press, Buzz!", "shortName":"LPB", "version":"0.01", + "author": "thyttan", "description": "Buzz at boot after a long press to indicate the watch was reinitiated at your command.", "icon": "app.png", "type": "bootloader", diff --git a/apps/messagesmusic/metadata.json b/apps/messagesmusic/metadata.json index eef528f557..f09821163a 100644 --- a/apps/messagesmusic/metadata.json +++ b/apps/messagesmusic/metadata.json @@ -3,6 +3,7 @@ "name":"Messages Music", "shortName": "Music", "version":"0.05", + "author": "thyttan", "description": "Uses Messages library to push a music message which in turn displays Messages app music controls", "icon":"app.png", "type": "app", diff --git a/apps/miclock2/metadata.json b/apps/miclock2/metadata.json index 6f586c6965..16416ecdf1 100644 --- a/apps/miclock2/metadata.json +++ b/apps/miclock2/metadata.json @@ -2,6 +2,7 @@ "id": "miclock2", "name": "Mixed Clock 2", "version": "0.05", + "author": "nxdefiant", "description": "White color variant of the Mixed Clock with thicker clock hands for better readability in the bright sunlight, extra space under the clock for widgets and seconds in the digital clock.", "icon": "clock-mixed.png", "type": "clock", diff --git a/apps/msgtwscr/metadata.json b/apps/msgtwscr/metadata.json index 6f267ea011..7c3883aef7 100644 --- a/apps/msgtwscr/metadata.json +++ b/apps/msgtwscr/metadata.json @@ -1,6 +1,7 @@ { "id": "msgtwscr", "name": "Message Twist to Scroll", "version":"0.01", + "author": "thyttan", "description": "Temporarily activate scroll on twist function when a new message triggers the message app.", "icon": "app.png", "tags": "messages,tweak,scroll", diff --git a/apps/msgwakefup/metadata.json b/apps/msgwakefup/metadata.json index 857bebc0a8..77decfed68 100644 --- a/apps/msgwakefup/metadata.json +++ b/apps/msgwakefup/metadata.json @@ -1,6 +1,7 @@ { "id": "msgwakefup", "name": "Message wake on face up", "version":"0.02", + "author": "thyttan", "description": "Temporarily activate wake on face up function when a new message is auto displayed.", "icon": "app.png", "tags": "messages,tweak", diff --git a/apps/myprofile/metadata.json b/apps/myprofile/metadata.json index 136de289be..8d0cf4db6b 100644 --- a/apps/myprofile/metadata.json +++ b/apps/myprofile/metadata.json @@ -4,6 +4,7 @@ "icon": "app.png", "type": "settings", "version":"0.02", + "author": "nxdefiant", "description": "Configure your personal profile. All settings are optional and only stored on the watch.", "readme": "README.md", "tags": "tool,utility", diff --git a/apps/pace/metadata.json b/apps/pace/metadata.json index 188802aa98..830cdc6562 100644 --- a/apps/pace/metadata.json +++ b/apps/pace/metadata.json @@ -2,6 +2,7 @@ "id": "pace", "name": "Pace", "version": "0.06", + "author": "bobrippling", "description": "Show pace and time running splits", "icon": "app.png", "tags": "run,running,fitness,outdoors", diff --git a/apps/podadrem/metadata.json b/apps/podadrem/metadata.json index c6c9f1f8e1..75564d2a97 100644 --- a/apps/podadrem/metadata.json +++ b/apps/podadrem/metadata.json @@ -3,10 +3,11 @@ "name": "Podcast Addict Remote", "shortName": "PA Remote", "version": "0.11", + "author": "thyttan", "description": "Control Podcast Addict on your android device.", "readme": "README.md", "type": "app", - "tags": "remote,podcast,podcasts,radio,player,intent,intents,gadgetbridge,podadrem,pa remote", + "tags": "remote,podcast,podcasts,radio,player,intent,intents,gadgetbridge,podadrem,pa remote", "icon": "app.png", "screenshots" : [ {"url":"screenshot1.png"}, {"url":"screenshot2.png"} ], "supports": ["BANGLEJS2"], diff --git a/apps/popconlaunch/metadata.json b/apps/popconlaunch/metadata.json index 012ca67650..a97855855a 100644 --- a/apps/popconlaunch/metadata.json +++ b/apps/popconlaunch/metadata.json @@ -3,6 +3,7 @@ "name": "Popcon Launcher", "shortName": "Popcon", "version": "0.05", + "author": "bobrippling", "description": "Launcher modification - your launchers will display your favourite (popular) apps first. Overrides `readJSON`, may slow down your watch", "readme": "README.md", "icon": "app.png", diff --git a/apps/promenu/metadata.json b/apps/promenu/metadata.json index cfbd1ebd8f..4cc831f99d 100644 --- a/apps/promenu/metadata.json +++ b/apps/promenu/metadata.json @@ -2,6 +2,7 @@ "id": "promenu", "name": "Pro Menu", "version": "0.15", + "author": "bobrippling", "description": "Replace the built in menu function. Supports Bangle.js 1 and Bangle.js 2.", "icon": "icon.png", "type": "bootloader", diff --git a/apps/recorder/metadata.json b/apps/recorder/metadata.json index 7d8251a6c9..083cc063c3 100644 --- a/apps/recorder/metadata.json +++ b/apps/recorder/metadata.json @@ -3,6 +3,7 @@ "name": "Recorder", "shortName": "Recorder", "version": "0.48", + "author": "bobrippling", "description": "Record GPS position, heart rate and more in the background, then download to your PC.", "icon": "app.png", "tags": "tool,outdoors,gps,widget,clkinfo", diff --git a/apps/rep/metadata.json b/apps/rep/metadata.json index 4d0e806a1e..a89f6d2361 100644 --- a/apps/rep/metadata.json +++ b/apps/rep/metadata.json @@ -2,6 +2,7 @@ "id": "rep", "name": "Rep", "version":"0.03", + "author": "bobrippling", "description": "Time running reps, using a rep schedule/program uploaded via the app loader", "icon": "app.png", "tags": "run,running,fitness,outdoors", diff --git a/apps/runplus/metadata.json b/apps/runplus/metadata.json index f26204123f..fc2f1ccec0 100644 --- a/apps/runplus/metadata.json +++ b/apps/runplus/metadata.json @@ -2,6 +2,7 @@ "id": "runplus", "name": "Run+", "version": "0.30", + "author": "thyttan", "description": "Displays distance, time, steps, cadence, pace and more for runners. Based on the Run app, but extended with additional screens for heart rate interval training and individual stat focus.", "icon": "app.png", "tags": "run,running,fitness,outdoors,gps,karvonen,karvonnen", diff --git a/apps/scrolly/metadata.json b/apps/scrolly/metadata.json index 6194813afd..b073020be0 100644 --- a/apps/scrolly/metadata.json +++ b/apps/scrolly/metadata.json @@ -5,6 +5,7 @@ "icon": "app.png", "screenshots" : [ { "url":"screenshot.gif" } ], "version":"0.01", + "author": "retcurve", "description": "Scrolly is a simple app designed to display scrolling text across your screen in a clean and dynamic way. Perfect for announcements or just for fun!", "readme":"README.md", "type": "app", @@ -15,7 +16,7 @@ {"name":"scrolly.app.js","url":"app.js"}, {"name":"scrolly.img","url":"app-icon.js","evaluate":true} ], - "data": [ + "data": [ {"name":"scrolly.json"} ] } diff --git a/apps/sevenmin/metadata.json b/apps/sevenmin/metadata.json index 8a1867e4a0..9c309675ba 100644 --- a/apps/sevenmin/metadata.json +++ b/apps/sevenmin/metadata.json @@ -2,6 +2,7 @@ "name": "Seven minute workout", "shortName": "7 min wo", "version": "0.02", + "author": "thyttan", "description": "A basic implementation of the famous consice workout", "icon": "icon.png", "type":"app", diff --git a/apps/sleepphasealarm/metadata.json b/apps/sleepphasealarm/metadata.json index 2ba003cf72..2ae56eb1ca 100644 --- a/apps/sleepphasealarm/metadata.json +++ b/apps/sleepphasealarm/metadata.json @@ -3,6 +3,7 @@ "name": "SleepPhaseAlarm", "shortName": "SleepPhaseAlarm", "version": "0.18", + "author": "nxdefiant", "description": "Uses the accelerometer to estimate sleep and wake states with the principle of Estimation of Stationary Sleep-segments (ESS, see https://ubicomp.eti.uni-siegen.de/home/datasets/ichi14/index.html.en). This app will read the next alarm from the alarm application and will wake you up to 30 minutes early at the best guessed time when you are almost already awake.", "icon": "app.png", "tags": "tool,alarm", diff --git a/apps/sportmode/metadata.json b/apps/sportmode/metadata.json index 65e7efee7c..5f363ac708 100644 --- a/apps/sportmode/metadata.json +++ b/apps/sportmode/metadata.json @@ -4,6 +4,7 @@ "shortName":"Sport mode", "icon": "app.png", "version":"0.01", + "author": "nxdefiant", "description": "Allows to set the sport mode of the Heart rate monitor in app settings.", "type": "bootloader", "tags": "health", diff --git a/apps/spotrem/metadata.json b/apps/spotrem/metadata.json index 8ecc0d867c..1df56cb19c 100644 --- a/apps/spotrem/metadata.json +++ b/apps/spotrem/metadata.json @@ -2,6 +2,7 @@ "id": "spotrem", "name": "Remote for Spotify", "version": "0.13", + "author": "thyttan", "description": "Control spotify on your android device.", "readme": "README.md", "type": "app", diff --git a/apps/swipeinv/metadata.json b/apps/swipeinv/metadata.json index f24609e2bf..d98fc6cf6d 100644 --- a/apps/swipeinv/metadata.json +++ b/apps/swipeinv/metadata.json @@ -4,6 +4,7 @@ "shortName":"Swipe inv.", "icon": "app.png", "version": "0.03", + "author": "nxdefiant", "description": "Inverts swipe direction globally or per app, see settings. If global inversion is enabled, you can unselect the inversion per app and vice versa.", "readme":"README.md", "type": "bootloader", @@ -15,4 +16,3 @@ ], "data": [{"name":"swipeinv.json"}] } - diff --git a/apps/swscroll/metadata.json b/apps/swscroll/metadata.json index 20b52d129f..ade720ab62 100644 --- a/apps/swscroll/metadata.json +++ b/apps/swscroll/metadata.json @@ -2,6 +2,7 @@ "id": "swscroll", "name": "Swipe menus", "version": "0.08", + "author": "thyttan", "description": "Replace built in E.showScroller to act on swipe instead of drag. Navigate menus in discrete steps instead of a continuous motion.", "readme": "README.md", "icon": "app.png", diff --git a/apps/taglaunch/metadata.json b/apps/taglaunch/metadata.json index f8ead20f97..c4cafaa1c5 100644 --- a/apps/taglaunch/metadata.json +++ b/apps/taglaunch/metadata.json @@ -3,6 +3,7 @@ "name": "Tag Launcher", "shortName": "Taglauncher", "version": "0.08", + "author": "nxdefiant", "description": "Launcher that puts all applications into submenus based on their tag. With many applications installed this can result in a faster application selection than the linear access from the default launcher.", "readme": "README.md", "icon": "app.png", diff --git a/apps/tally/metadata.json b/apps/tally/metadata.json index 98c74930d3..3583dbaa5e 100644 --- a/apps/tally/metadata.json +++ b/apps/tally/metadata.json @@ -3,6 +3,7 @@ "name": "Tally Keeper", "shortName": "Tally", "version": "0.01", + "author": "bobrippling", "description": "Add to a tally from clock info", "icon": "app.png", "tags": "clkinfo", diff --git a/apps/txtreader/metadata.json b/apps/txtreader/metadata.json index d27c79d797..e6aff8e6ca 100644 --- a/apps/txtreader/metadata.json +++ b/apps/txtreader/metadata.json @@ -3,6 +3,7 @@ "name": "txtreader", "shortName": "txtreader", "version": "0.02", + "author": "tonykakuuu", "description": "Basic text reader with pages and a file selector.", "icon": "txtreader.png", "screenshots": [{"url":"screenshot_txtreader.png"}], diff --git a/apps/voldisp/metadata.json b/apps/voldisp/metadata.json index 3af0dc7fd9..e8b539345a 100644 --- a/apps/voldisp/metadata.json +++ b/apps/voldisp/metadata.json @@ -1,6 +1,7 @@ { "id": "voldisp", "name": "Display Volume for Android", "version":"0.01", + "author": "thyttan", "description": "Display the media volume of your android device when it's changed. A bar shows up at the top of your Bangles screen. (Needs recent Gadgetbridge nightly or stable ver. 85 once out)", "icon": "app.png", "tags": "audio,media,android,volume,sound", diff --git a/apps/widalarmeta/metadata.json b/apps/widalarmeta/metadata.json index b3ae7aa1f0..d07a811238 100644 --- a/apps/widalarmeta/metadata.json +++ b/apps/widalarmeta/metadata.json @@ -3,6 +3,7 @@ "name": "Alarm & Timer ETA", "shortName": "Alarm ETA", "version": "0.15", + "author": "nxdefiant", "description": "A widget that displays the time to the next Alarm or Timer in hours and minutes, maximum 24h (configurable).", "icon": "widget.png", "type": "widget", diff --git a/apps/widbattpwr/metadata.json b/apps/widbattpwr/metadata.json index 2a41169ab4..084dfb3e22 100644 --- a/apps/widbattpwr/metadata.json +++ b/apps/widbattpwr/metadata.json @@ -4,6 +4,7 @@ "shortName": "Batt Pwr", "icon": "widget.png", "version": "0.03", + "author": "bobrippling", "type": "widget", "supports": ["BANGLEJS2"], "readme": "README.md", diff --git a/apps/widbtstates/metadata.json b/apps/widbtstates/metadata.json index 1345752a3b..88b3e15718 100644 --- a/apps/widbtstates/metadata.json +++ b/apps/widbtstates/metadata.json @@ -2,6 +2,7 @@ "id": "widbtstates", "name": "Bluetooth States", "version": "0.02", + "author": "bobrippling", "description": "If active, shows a white bluetooth icon, if connected, a blue one (nothing if sleeping)", "icon": "widget.png", "type": "widget", diff --git a/apps/widclkscrl/metadata.json b/apps/widclkscrl/metadata.json index 81221cbe43..b722ed93fe 100644 --- a/apps/widclkscrl/metadata.json +++ b/apps/widclkscrl/metadata.json @@ -2,6 +2,7 @@ "id": "widclkscrl", "name": "Scrolling clock widget", "version": "0.01", + "author": "nxdefiant", "description": "A widget that displays the current date & time after unlocking the watch when not showing a fullscreen clock. The information is scrolled by in a two digit field, so this widget is kept tight.", "icon": "widget.png", "type": "widget", diff --git a/apps/widhid/metadata.json b/apps/widhid/metadata.json index b819c9b649..3dad35b68c 100644 --- a/apps/widhid/metadata.json +++ b/apps/widhid/metadata.json @@ -3,6 +3,7 @@ "name": "Bluetooth Music Swipe Control Widget", "shortName": "BLE Swipe Widget", "version": "0.03", + "author": "bobrippling", "description": "Based on Swipe Bluetooth Music Controls (based on Bluetooth Music Controls). Swipe down to enable, then swipe up/down for volume, left/right for previous and next and tap for play/pause. Enable HID in settings, pair with your phone/computer, then use this widget to control music from your watch!", "icon": "icon.png", "readme": "README.md", diff --git a/apps/widhrzone/metadata.json b/apps/widhrzone/metadata.json index 6d4f7bf5a4..e8f76f6520 100644 --- a/apps/widhrzone/metadata.json +++ b/apps/widhrzone/metadata.json @@ -3,6 +3,7 @@ "name": "Heart rate zone widget", "shortName": "HRzone widget", "version": "0.02", + "author": "nxdefiant", "description": "Widget that displays the current out of five heart rate training zones 1. HEALTH (50-60% of max. HR, Recovery, grey), 2. FAT-B (60-70% of max. HR, burns fat, blue), 3. AROBIC (70-80% of max. HR, Endurance, green), 4. ANAROB (80-90% of max. HR, Speed, yellow), 5. MAX (90-100% of max. HR, red). Only visible when heart rate monitor is active and inside one of the zones. Requires to set the maximum heart rate in settings (if unsure set to 220-age).", "icon": "widget.png", "type": "widget", diff --git a/apps/widminbate/metadata.json b/apps/widminbate/metadata.json index 5fed8eef5f..f0f16b15ba 100644 --- a/apps/widminbate/metadata.json +++ b/apps/widminbate/metadata.json @@ -2,6 +2,7 @@ "name": "Extra Minimal Battery", "shortName":"ExtraMinBat", "version":"0.05", + "author": "thyttan", "description": "An extra minimal (only use system theme foreground colour) version of the battery widget that only appears if the battery is running low (below 30%)", "icon": "widget.png", "type": "widget", diff --git a/apps/widshipbell/metadata.json b/apps/widshipbell/metadata.json index 1c4a7613e7..ec4a3772c2 100644 --- a/apps/widshipbell/metadata.json +++ b/apps/widshipbell/metadata.json @@ -3,6 +3,7 @@ "name": "Ship's bell Widget", "shortName": "Ship's bell", "version": "0.02", + "author": "nxdefiant", "description": "A widget that buzzes according to a nautical bell, one strike at 04:30, two strikes at 05:00, up to eight strikes at 08:00 and so on.", "icon": "widget.png", "type": "widget", diff --git a/apps/zambretti/metadata.json b/apps/zambretti/metadata.json index a1fc0f263f..2c6d8df743 100644 --- a/apps/zambretti/metadata.json +++ b/apps/zambretti/metadata.json @@ -3,6 +3,7 @@ "name": "Zambretti Weather Forecaster", "shortName": "Zn. Weather", "version": "0.01", + "author": "nxdefiant", "description": "Zambretti Forecaster by Negretti and Zambra, uses the Barometer for empirical weather forecast in the Northern Hemisphere (see https://web.archive.org/web/20110610213848/http://www.meteormetrics.com/zambretti.htm), similar to weather stations. Watch must be stationary and its height above sea level set.", "icon": "app.png", "tags": "outdoors,weather", @@ -17,4 +18,3 @@ ], "data": [{"name":"zambretti.json"}, {"name":"zambretti.log.json"}] } - diff --git a/bin/pr-tag.js b/bin/pr-tag.js new file mode 100644 index 0000000000..8a55863c7f --- /dev/null +++ b/bin/pr-tag.js @@ -0,0 +1,221 @@ +const { execSync } = require("child_process"); +const { readFileSync } = require("fs"); +const https = require("https"); + +function usage(){ + console.log(`Usage: pr-tag.js [--local] [--dry] [revision-range]`); + console.log(`--local: don't fetch the PR description, etc, just show the changes apps/authors`); + console.log(`--dry: don't perform the final comment`); + process.exit(2); +} + +async function main() { + let local = false; + let dry = false; + let rev; + for(const arg of process.argv.slice(2)){ + if(arg === "--local") + local = true; + else if(arg === "--dry") + dry = true; + else if(/^-/.test(arg)) + usage(); + else if(!rev) + rev = arg; + else + usage(); + } + + if(!rev) rev = "origin/master..."; + + if(!local && await shouldSkip()){ + debug("Skipping PR"); + process.exit(0); + } + + const apps = execSync( + `git diff --name-only ${rev} -- apps/ | + grep -o "apps/[^/]*" | + sort | + uniq`, + { encoding: "utf8" } + ).split("\n").filter(x => x); + + if(apps.length === 0) process.exit(1); // pipeline failed + + const authorToApp = {}; + + for(const app of apps){ + const metadata = JSON.parse(readFileSync(`${app}/metadata.json`, "utf8")); + let authorField = metadata.author; + debug(`Changed app: ${app}, author field: ${authorField}`); + if(!authorField) continue; + + const authors = Array.isArray(authorField) ? authorField : [authorField]; + + for(const author of authors){ + if(!authorToApp[author]) + authorToApp[author] = new Set(); + + authorToApp[author].add(app); + } + } + + const prevTags = local ? {} : await previousTags(); + const output = []; + + for(let [author, apps] of Object.entries(authorToApp)){ + if(author in prevTags){ + apps = new Set([...apps].filter(app => !prevTags[author].has(app))); + if(apps.size === 0){ + debug(`Skipping ${author} - no new apps`); + continue; + } + } + + output.push(makeLine({ author, apps })); + } + + if(output.length){ + if(local || dry){ + for(const out of output) + console.log(out) + }else{ + await postComment({ + prNumber: getenv("PR_NUM"), + repo: getenv("REPO"), + token: getenv("GITHUB_TOKEN"), + comment: output.join("\n"), + }); + } + } +} + +function makeLine({ author, apps }) { + apps = [...apps].sort(); + + return `tagging ${author} for ${apps.map(a => `\`${a}\``).join(", ")}` +} + +function parseLine(line) { + const parts = line.split(" "); + + if(parts.length >= 4 && parts[0] === "tagging" && parts[2] === "for") + return { author: parts[1], apps: parts.slice(3).map(app => app.replace(/[,`]/g, "")) }; +} + +// allow skipping of tagging if the PR description contains a specific message +async function shouldSkip() { + const desc = await fetchPRDesc({ + prNumber: getenv("PR_NUM"), + repo: getenv("REPO"), + token: getenv("GITHUB_TOKEN"), + }); + + return desc + .split("\n") + .filter(line => /^tag-bot: skip\s*$/.test(line)) + .length > 0; +} + +// returns { author: Set(apps) } +async function previousTags() { + const comments = await fetchPRComments({ + prNumber: getenv("PR_NUM"), + repo: getenv("REPO"), + token: getenv("GITHUB_TOKEN"), + }); + + const tags = {}; + + comments + .filter(({ user: { login, type } }) => type === "Bot" && login === "github-actions[bot]") + .map(({ body }) => body) + .flatMap(body => + body + .split("\n") + .map(parseLine) + .filter(x => x) + ) + .forEach(({ author, apps }) => { + if(!tags[author]) tags[author] = new Set(); + for(const app of apps) + tags[author].add(app); + }); + + return tags; +} + +function fetchPRDesc({ prNumber, repo, token }) { + return fetchGH({ + path: `/repos/${repo}/pulls/${prNumber}`, + token + }).then(data => JSON.parse(data).body); +} + +function fetchPRComments({ prNumber, repo, token }) { + return fetchGH({ + path: `/repos/${repo}/issues/${prNumber}/comments`, + token + }).then(data => JSON.parse(data)); +} + +function postComment({ prNumber, repo, token, comment }) { + return fetchGH({ + path: `/repos/${repo}/issues/${prNumber}/comments`, + token, + data: { body: comment }, + }).then(data => JSON.parse(data)); +} + +function fetchGH({ path, token, data }) { + return new Promise((resolve, reject) => { + const options = { + hostname: "api.github.com", + path, + method: data ? "POST" : "GET", + headers: { + "User-Agent": "node.js", + "Authorization": `Bearer ${token}`, + "Accept": "application/vnd.github+json" + }, + }; + + if(data) + options.body = data; + + https.get(options, res => { + let data = ""; + res.on("data", chunk => data += chunk); + res.on("end", () => { + if (res.statusCode === 200) { + try { + resolve(data); + } catch (e) { + reject(e); + } + } else { + reject(new Error(`GitHub API error: ${res.statusCode}`)); + } + }); + }).on("error", reject); + }); +} + +function getenv(name) { + const val = process.env[name]; + if(!val){ + console.error(`Need environment variable $${name}`); + process.exit(1); + } + return val; +} + +function debug(...args) { + console.error(...args); +} + +main().catch(e => { + console.error(e); + process.exit(1); +}); diff --git a/bin/sanitycheck.js b/bin/sanitycheck.js index 27f3b7b0d3..2e728efbb9 100755 --- a/bin/sanitycheck.js +++ b/bin/sanitycheck.js @@ -163,7 +163,8 @@ const APP_KEYS = [ 'id', 'name', 'shortName', 'version', 'icon', 'screenshots', 'description', 'tags', 'type', 'sortorder', 'readme', 'custom', 'customConnect', 'interface', 'storage', 'data', 'supports', 'allow_emulator', - 'dependencies', 'provides_modules', 'provides_widgets', 'provides_features', "default" + 'dependencies', 'provides_modules', 'provides_widgets', 'provides_features', "default", + "author" ]; const STORAGE_KEYS = ['name', 'url', 'content', 'evaluate', 'noOverwite', 'supports', 'noOverwrite']; const DATA_KEYS = ['name', 'wildcard', 'storageFile', 'url', 'content', 'evaluate'];