Skip to content

Commit 433a1c9

Browse files
committed
New Version 1.16.0
- E #191 Release-Channel and Stale-Action - E #189 Sample Print Report - E #33 Permissions for Editing and Deleting - B #184, #190 reading thumbnail from base64 gcode fixed - B #123 M118 gcode for Image Capturing (not tested on real printer)
1 parent f238799 commit 433a1c9

15 files changed

+399
-89
lines changed

.github/workflows/github-release-actions.yml

+32-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
###
2-
### Script for:
3-
### - build a zip file of the needed files/directories
4-
### - extract the version number from setup.py
5-
### - deploy a draft-release into github repository
2+
### Simple script to build a zip file of the whole repository
63
###
4+
## Major - Tasks:
5+
# - ZIP
6+
# - Build draft release
7+
# - Attach Zip
8+
# - Download Zip
9+
710
name: Build Plugin Release - Action
811
on: [push]
912
jobs:
@@ -27,17 +30,37 @@ jobs:
2730
run: echo "::set-output name=version::$(cat setup.py | grep 'plugin_version = "*"' | cut -d '"' -f2)"
2831
id: version
2932

33+
- name: Repository and Branch name
34+
id: branch
35+
run: |
36+
export branch_name=${GITHUB_REF##*/}
37+
echo "::set-output name=branch_name::$branch_name"
38+
echo running on branch $branch_name
39+
export repo_name=${GITHUB_REPOSITORY#*/}
40+
echo "::set-output name=repo_name::$repo_name"
41+
42+
3043
- name: release
31-
uses: actions/create-release@v1
44+
uses: actions/create-release@latest
3245
id: create_release
3346
env:
3447
GITHUB_TOKEN: ${{ github.token }}
3548
with:
3649
draft: true
50+
commitish: ${{ steps.branch.outputs.branch_name }}
3751
prerelease: false
3852
release_name: V${{ steps.version.outputs.version }}-draft
3953
tag_name: ${{ steps.version.outputs.version }}-draft
40-
body_path: .github/workflows/RELEASE_TEMPLATE.md
54+
body: |
55+
## [BugFix]
56+
- #xxx
57+
58+
## [Enhancement]
59+
- #xxx
60+
61+
## Counter
62+
![downloaded](https://img.shields.io/github/downloads/OllisGit/${{ steps.branch.outputs.repo_name }}/${{ steps.version.outputs.version }}/total)
63+
# body_path: RELEASE_TEMPLATE.md
4164

4265
- name: upload master.zip to release
4366
uses: actions/upload-release-asset@v1
@@ -49,4 +72,7 @@ jobs:
4972
asset_name: master.zip
5073
asset_content_type: application/gzip
5174

75+
- name: download master.zip
76+
run: curl -O -J -L -v https://github.com/OllisGit/${{ steps.branch.outputs.repo_name }}/releases/download/${{ steps.version.outputs.version }}/master.zip
77+
5278
- run: echo "🍏 This job's status is ${{ job.status }}."
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## Documentation could be found here
2+
## https://github.com/actions/stale
3+
##
4+
name: 'Stale and close issues'
5+
on:
6+
schedule:
7+
# Each day at 1:30am run the action
8+
- cron: '30 1 * * *'
9+
10+
jobs:
11+
stale:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/stale@v4
15+
with:
16+
exempt-issue-labels: 'status: analysing,status: inNextRelease,status: inProgress,status: wontfix'
17+
18+
days-before-issue-stale: 30
19+
stale-issue-message: 'This issue has been automatically marked for closing, because it has not had activity in 30 days. It will be closed if no further activity occurs in 10 days.'
20+
stale-issue-label: 'status: markedForAutoClose'
21+
22+
days-before-issue-close: 10
23+
close-issue-message: 'This issue was closed, because it has been already marked for 10 days with no activity.'
24+
close-issue-label: 'status: closedByBot'

octoprint_PrintJobHistory/CameraManager.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def takePluginThumbnail(self, snapshotFilename, thumbnailLocation, storeImage =
251251
# Convert png to jpg and save in printjobhistory storage
252252
if (storeImage):
253253
self._logger.info("Try converting thumbnail '" + thumbnailLocation + "' to '" + snapshotFilename + "'")
254-
im = Image.open(thumbnailLocation)
254+
im = Image.open(thumbnailLocation).convert("RGBA")
255255
# fill_color = (120, 8, 220)
256256
# bg = Image.new("RGB", im.size, fill_color) see https://github.com/OllisGit/OctoPrint-PrintJobHistory/issues/160
257257
bg = Image.new("RGB", im.size, (255, 255, 255))

octoprint_PrintJobHistory/DatabaseManager.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121

2222
FORCE_CREATE_TABLES = False
23-
SQL_LOGGING = True
23+
SQL_LOGGING = False
2424

2525
CURRENT_DATABASE_SCHEME_VERSION = 7
2626

0 commit comments

Comments
 (0)