Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d60c5a631a | ||
|
|
444fe44d48 | ||
|
|
7d5474cb3d | ||
|
|
945825f03f | ||
|
|
1bd19e3fd5 | ||
|
|
fd8a72a77a | ||
|
|
dfe7dc7a78 | ||
|
|
16086741b8 | ||
|
|
3bbd3f7a3e | ||
|
|
995c8aa0c6 | ||
|
|
e3999ca5bb | ||
|
|
4a9e573107 | ||
|
|
58dc515990 | ||
|
|
d3e92db8a8 | ||
|
|
450d5bb9ae | ||
|
|
5444c46777 | ||
|
|
e451493c0d | ||
|
|
2a247672a6 | ||
|
|
1ae017954b | ||
|
|
1b04c08a1a | ||
|
|
ddfd333b62 | ||
|
|
2087c3da54 |
No files matched your search
@@ -1,19 +1,18 @@
|
|||||||
name: "Issue Automation"
|
name: "Issue Automation"
|
||||||
on:
|
on:
|
||||||
issues:
|
issues:
|
||||||
types: [opened, edited, closed, reopened]
|
types: [opened, edited, closed, reopened, labeled, unlabeled]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
issue-automation:
|
issue-automation:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@v2
|
- uses: actions/github-script@v5
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
script: |
|
script: |
|
||||||
let labels = [];
|
let labels = context.payload.issue.labels.map(label => label.name);
|
||||||
let setLabels = false;
|
let setLabels = false;
|
||||||
context.payload.issue.labels.forEach(label => { labels.push(label.name) });
|
|
||||||
|
|
||||||
switch (context.payload.action) {
|
switch (context.payload.action) {
|
||||||
|
|
||||||
@@ -55,7 +54,7 @@ jobs:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (setLabels) {
|
if (setLabels) {
|
||||||
github.issues.setLabels({
|
github.rest.issues.setLabels({
|
||||||
issue_number: context.issue.number,
|
issue_number: context.issue.number,
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
@@ -67,3 +66,91 @@ jobs:
|
|||||||
# if: github.event_name == 'issues' && (github.event.action == 'opened' || github.event.action == 'edited')
|
# if: github.event_name == 'issues' && (github.event.action == 'opened' || github.event.action == 'edited')
|
||||||
# with:
|
# with:
|
||||||
# repo-token: ${{ secrets.GITHUB_TOKEN }}
|
# repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- uses: actions/github-script@v5
|
||||||
|
env:
|
||||||
|
REMINDER: >
|
||||||
|
Hi @${{ github.event.issue.user.login }}!
|
||||||
|
|
||||||
|
|
||||||
|
It looks like you didn't upload a [system info bundle](https://community.octoprint.org/t/29887) as requested by the template.
|
||||||
|
A bundle is required to further process your issue. It contains important logs and
|
||||||
|
system information to be able to put your issue into context and give pointers as to
|
||||||
|
what has happened.
|
||||||
|
|
||||||
|
|
||||||
|
Please **edit your original post above** and upload **a bundle zip file**. Actually upload the file please and
|
||||||
|
do not paste some link to a cloud provider, we want to have everything in one place here. Also do
|
||||||
|
not unpack, repack or otherwise modify the bundle or its name, share it **exactly** like you get it from OctoPrint.
|
||||||
|
|
||||||
|
|
||||||
|
Without the availability of a bundle, your issue will have to be closed.
|
||||||
|
|
||||||
|
|
||||||
|
Thank you for your collaboration.
|
||||||
|
THANKYOU: >
|
||||||
|
Thank you @${{ github.event.issue.user.login }} for adding a bundle! Now this can actually get looked at.
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const { REMINDER, THANKYOU } = process.env;
|
||||||
|
const bundleRegex = /\[(octoprint-systeminfo-\d{14}\.zip)\]\(([^)]+)\)/g;
|
||||||
|
const marker = "<!-- check_for_bundle -->";
|
||||||
|
|
||||||
|
const issueLabels = await github.rest.issues.listLabelsOnIssue({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
issue_number: context.issue.number
|
||||||
|
});
|
||||||
|
let labels = issueLabels.data.map(label => label.name);
|
||||||
|
|
||||||
|
const comments = await github.rest.issues.listComments({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
issue_number: context.issue.number,
|
||||||
|
})
|
||||||
|
const comment = comments.data.find(c => c.user.login === "github-actions[bot]" && c.body.includes(marker));
|
||||||
|
|
||||||
|
if (!labels.includes("triage")) {
|
||||||
|
console.log("No label, deleting comment if needed");
|
||||||
|
if (comment) {
|
||||||
|
await github.rest.issues.deleteComment({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
comment_id: comment.id,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const found = !!context.payload.issue.body.match(bundleRegex);
|
||||||
|
|
||||||
|
if (!found) {
|
||||||
|
console.log("No bundle found, posting/updating reminder");
|
||||||
|
const text = REMINDER + "\n" + marker;
|
||||||
|
if (comment && comment.body !== text) {
|
||||||
|
await github.rest.issues.updateComment({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
comment_id: comment.id,
|
||||||
|
body: text
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
await github.rest.issues.createComment({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
issue_number: context.issue.number,
|
||||||
|
body: text
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else if (found && comment) {
|
||||||
|
console.log("Bundle found, saying thanks");
|
||||||
|
const text = REMINDER.split("\n\n").map(line => `~~${line.trim()}~~`).join("\n\n") + "\n\n" + THANKYOU + "\n" + marker;
|
||||||
|
if (comment.body !== text) {
|
||||||
|
await github.rest.issues.updateComment({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
comment_id: comment.id,
|
||||||
|
body: text
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,13 +12,18 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
|
||||||
- uses: actions/github-script@v2
|
- uses: actions/github-script@v5
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
script: |
|
script: |
|
||||||
let labels = [];
|
// fetch a fresh set of labels, they might have changed earlier
|
||||||
|
const issueLabels = await github.rest.issues.listLabelsOnIssue({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
issue_number: context.issue.number
|
||||||
|
});
|
||||||
|
let labels = issueLabels.data.map(label => label.name);
|
||||||
let setLabels = false;
|
let setLabels = false;
|
||||||
context.payload.pull_request.labels.forEach(label => { labels.push(label.name) });
|
|
||||||
|
|
||||||
let target = context.payload.pull_request.base.ref;
|
let target = context.payload.pull_request.base.ref;
|
||||||
if (["maintenance", "devel", "staging/maintenance", "staging/devel", "master"].includes(target)) {
|
if (["maintenance", "devel", "staging/maintenance", "staging/devel", "master"].includes(target)) {
|
||||||
@@ -27,7 +32,7 @@ jobs:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (setLabels) {
|
if (setLabels) {
|
||||||
github.issues.setLabels({
|
github.rest.issues.setLabels({
|
||||||
issue_number: context.issue.number,
|
issue_number: context.issue.number,
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
|
|||||||
+3
-3
@@ -24,10 +24,10 @@ maintenance 1.7.0 07c4630d126617c2ae98a9c23ad49facf7bf0bbd pep440-dev
|
|||||||
fix/.* 1.7.0 07c4630d126617c2ae98a9c23ad49facf7bf0bbd pep440-dev
|
fix/.* 1.7.0 07c4630d126617c2ae98a9c23ad49facf7bf0bbd pep440-dev
|
||||||
improve/.* 1.7.0 07c4630d126617c2ae98a9c23ad49facf7bf0bbd pep440-dev
|
improve/.* 1.7.0 07c4630d126617c2ae98a9c23ad49facf7bf0bbd pep440-dev
|
||||||
|
|
||||||
# staging/bugfix is the branch for preparation of the 1.6.1 bugfix release
|
# staging/bugfix is the branch for preparation of the 1.7.2 bugfix release
|
||||||
# so are any bug/... branches
|
# so are any bug/... branches
|
||||||
staging/bugfix 1.6.1 29484fb2926960279e62881d6ee073c374a2a5fe pep440-dev
|
staging/bugfix 1.7.2 945825f03fbd2417a009dd33daf9f787aff60211 pep440-dev
|
||||||
bug/.* 1.6.1 29484fb2926960279e62881d6ee073c374a2a5fe pep440-dev
|
bug/.* 1.7.2 945825f03fbd2417a009dd33daf9f787aff60211 pep440-dev
|
||||||
|
|
||||||
# staging/maintenance is currently the branch for preparation of 1.7.0rc4
|
# staging/maintenance is currently the branch for preparation of 1.7.0rc4
|
||||||
# so is regressionfix/...
|
# so is regressionfix/...
|
||||||
|
|||||||
@@ -149,6 +149,7 @@ date of first contribution):
|
|||||||
* [Ian Wilt](https://github.com/ianwiltdotcom)
|
* [Ian Wilt](https://github.com/ianwiltdotcom)
|
||||||
* [Ben Sycha](https://github.com/Sycha)
|
* [Ben Sycha](https://github.com/Sycha)
|
||||||
* [Bryan Kenote](https://github.com/bryankenote)
|
* [Bryan Kenote](https://github.com/bryankenote)
|
||||||
|
* [Quinn Damerell](https://github.com/QuinnDamerell)
|
||||||
|
|
||||||
OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by
|
OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by
|
||||||
[Daid Braam](https://github.com/daid). Parts of its communication layer and
|
[Daid Braam](https://github.com/daid). Parts of its communication layer and
|
||||||
|
|||||||
@@ -226,6 +226,10 @@ For timelapse type ``zchange``.
|
|||||||
- 1
|
- 1
|
||||||
- float
|
- float
|
||||||
- Size of retraction Z hop to detect and ignore for z-based snapshots
|
- Size of retraction Z hop to detect and ignore for z-based snapshots
|
||||||
|
* - ``minDelay``
|
||||||
|
- 1
|
||||||
|
- int
|
||||||
|
- Snapshots will be rate limited against this interval, to prevent performance issues with vase mode/continuous z prints
|
||||||
|
|
||||||
.. _sec-api-timelapse-datamodel-config-timed:
|
.. _sec-api-timelapse-datamodel-config-timed:
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ INSTALL_REQUIRES = [
|
|||||||
# additional OctoPrint plugins that are maintained on a different release cycle
|
# additional OctoPrint plugins that are maintained on a different release cycle
|
||||||
"OctoPrint-FileCheck>=2021.2.23",
|
"OctoPrint-FileCheck>=2021.2.23",
|
||||||
"OctoPrint-FirmwareCheck>=2021.10.11",
|
"OctoPrint-FirmwareCheck>=2021.10.11",
|
||||||
"OctoPrint-PiSupport>=2021.8.2",
|
"OctoPrint-PiSupport>=2021.10.28",
|
||||||
# the following dependencies are non trivial to update since later versions
|
# the following dependencies are non trivial to update since later versions
|
||||||
# introduce backwards incompatible changes that might affect plugins, or due to
|
# introduce backwards incompatible changes that might affect plugins, or due to
|
||||||
# other observed problems
|
# other observed problems
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ from octoprint.util.version import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
SENTRY_URL_SERVER = (
|
SENTRY_URL_SERVER = (
|
||||||
"https://3d510fcb31be49c8a811639b7ed18377@o118517.ingest.sentry.io/1373987"
|
"https://690e174698034bcc95928e6bfa8573f7@o118517.ingest.sentry.io/1373987"
|
||||||
)
|
)
|
||||||
SENTRY_URL_COREUI = (
|
SENTRY_URL_COREUI = (
|
||||||
"https://c6ab43a97f224198ae62a6e11e253cf0@o118517.ingest.sentry.io/1374096"
|
"https://186f1dc5da7d46ab9d6b6de564d839bb@o118517.ingest.sentry.io/1374096"
|
||||||
)
|
)
|
||||||
|
|
||||||
SETTINGS_DEFAULTS = {
|
SETTINGS_DEFAULTS = {
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ $(function () {
|
|||||||
return !item.enabled;
|
return !item.enabled;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"popularity",
|
"name",
|
||||||
[],
|
[],
|
||||||
[
|
[
|
||||||
["bundled", "3rdparty"],
|
["bundled", "3rdparty"],
|
||||||
@@ -138,7 +138,7 @@ $(function () {
|
|||||||
return !plugin.abandoned;
|
return !plugin.abandoned;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"title",
|
"popularity",
|
||||||
["filter_installed", "filter_incompatible"],
|
["filter_installed", "filter_incompatible"],
|
||||||
[],
|
[],
|
||||||
0
|
0
|
||||||
|
|||||||
@@ -37,6 +37,11 @@ from octoprint.server.util.flask import (
|
|||||||
from octoprint.settings import settings, valid_boolean_trues
|
from octoprint.settings import settings, valid_boolean_trues
|
||||||
from octoprint.util import sv, time_this
|
from octoprint.util import sv, time_this
|
||||||
|
|
||||||
|
try:
|
||||||
|
from urllib.parse import quote as urlquote
|
||||||
|
except ImportError:
|
||||||
|
from urllib import quote as urlquote # noqa: F401
|
||||||
|
|
||||||
# ~~ GCODE file handling
|
# ~~ GCODE file handling
|
||||||
|
|
||||||
_file_cache = {}
|
_file_cache = {}
|
||||||
@@ -448,7 +453,7 @@ def _getFileList(
|
|||||||
+ "downloads/files/"
|
+ "downloads/files/"
|
||||||
+ FileDestinations.LOCAL
|
+ FileDestinations.LOCAL
|
||||||
+ "/"
|
+ "/"
|
||||||
+ file_or_folder["path"],
|
+ urlquote(file_or_folder["path"]),
|
||||||
}
|
}
|
||||||
|
|
||||||
result.append(file_or_folder)
|
result.append(file_or_folder)
|
||||||
@@ -702,7 +707,7 @@ def uploadGcodeFile(target):
|
|||||||
+ "downloads/files/"
|
+ "downloads/files/"
|
||||||
+ FileDestinations.LOCAL
|
+ FileDestinations.LOCAL
|
||||||
+ "/"
|
+ "/"
|
||||||
+ filename,
|
+ urlquote(filename),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1034,7 +1039,10 @@ def gcodeFileCommand(filename, target):
|
|||||||
abort(404, description="Unknown profile")
|
abort(404, description="Unknown profile")
|
||||||
|
|
||||||
location = url_for(
|
location = url_for(
|
||||||
".readGcodeFile", target=target, filename=full_path, _external=True
|
".readGcodeFile",
|
||||||
|
target=target,
|
||||||
|
filename=full_path,
|
||||||
|
_external=True,
|
||||||
)
|
)
|
||||||
result = {
|
result = {
|
||||||
"name": destination,
|
"name": destination,
|
||||||
@@ -1047,7 +1055,7 @@ def gcodeFileCommand(filename, target):
|
|||||||
+ "downloads/files/"
|
+ "downloads/files/"
|
||||||
+ target
|
+ target
|
||||||
+ "/"
|
+ "/"
|
||||||
+ full_path,
|
+ urlquote(full_path),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1154,7 +1162,10 @@ def gcodeFileCommand(filename, target):
|
|||||||
fileManager.move_folder(target, filename, destination)
|
fileManager.move_folder(target, filename, destination)
|
||||||
|
|
||||||
location = url_for(
|
location = url_for(
|
||||||
".readGcodeFile", target=target, filename=destination, _external=True
|
".readGcodeFile",
|
||||||
|
target=target,
|
||||||
|
filename=destination,
|
||||||
|
_external=True,
|
||||||
)
|
)
|
||||||
result = {
|
result = {
|
||||||
"name": name,
|
"name": name,
|
||||||
@@ -1168,7 +1179,7 @@ def gcodeFileCommand(filename, target):
|
|||||||
+ "downloads/files/"
|
+ "downloads/files/"
|
||||||
+ target
|
+ target
|
||||||
+ "/"
|
+ "/"
|
||||||
+ destination
|
+ urlquote(destination)
|
||||||
)
|
)
|
||||||
|
|
||||||
r = make_response(jsonify(result), 201)
|
r = make_response(jsonify(result), 201)
|
||||||
|
|||||||
@@ -24,6 +24,11 @@ from octoprint.server.util.flask import (
|
|||||||
)
|
)
|
||||||
from octoprint.settings import settings, valid_boolean_trues
|
from octoprint.settings import settings, valid_boolean_trues
|
||||||
|
|
||||||
|
try:
|
||||||
|
from urllib.parse import quote as urlquote
|
||||||
|
except ImportError:
|
||||||
|
from urllib import quote as urlquote # noqa: F401
|
||||||
|
|
||||||
_DATA_FORMAT_VERSION = "v2"
|
_DATA_FORMAT_VERSION = "v2"
|
||||||
|
|
||||||
# ~~ timelapse handling
|
# ~~ timelapse handling
|
||||||
@@ -140,7 +145,7 @@ def getTimelapseData():
|
|||||||
finished_list = []
|
finished_list = []
|
||||||
for f in files:
|
for f in files:
|
||||||
output = dict(f)
|
output = dict(f)
|
||||||
output["url"] = url_for("index") + "downloads/timelapse/" + f["name"]
|
output["url"] = url_for("index") + "downloads/timelapse/" + urlquote(f["name"])
|
||||||
finished_list.append(output)
|
finished_list.append(output)
|
||||||
|
|
||||||
result = {
|
result = {
|
||||||
@@ -160,7 +165,7 @@ def getTimelapseData():
|
|||||||
@Permissions.TIMELAPSE_DOWNLOAD.require(403)
|
@Permissions.TIMELAPSE_DOWNLOAD.require(403)
|
||||||
def downloadTimelapse(filename):
|
def downloadTimelapse(filename):
|
||||||
return redirect_to_tornado(
|
return redirect_to_tornado(
|
||||||
request, url_for("index") + "downloads/timelapse/" + filename
|
request, url_for("index") + "downloads/timelapse/" + urlquote(filename)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ default_settings = {
|
|||||||
"port": None,
|
"port": None,
|
||||||
"baudrate": None,
|
"baudrate": None,
|
||||||
"exclusive": True,
|
"exclusive": True,
|
||||||
"lowLatency": True,
|
"lowLatency": False,
|
||||||
"autoconnect": False,
|
"autoconnect": False,
|
||||||
"log": False,
|
"log": False,
|
||||||
"timeout": {
|
"timeout": {
|
||||||
|
|||||||
@@ -426,5 +426,11 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
OctoPrintClient.escapePath = function (path) {
|
||||||
|
return _.map(path.split("/"), function (p) {
|
||||||
|
return encodeURIComponent(p);
|
||||||
|
}).join("/");
|
||||||
|
};
|
||||||
|
|
||||||
return OctoPrintClient;
|
return OctoPrintClient;
|
||||||
});
|
});
|
||||||
@@ -14,19 +14,19 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
var resourceForLocation = function (location) {
|
var resourceForLocation = function (location) {
|
||||||
return url + "/" + location;
|
return url + "/" + OctoPrintClient.escapePath(location);
|
||||||
};
|
};
|
||||||
|
|
||||||
var downloadForLocation = function (location) {
|
var downloadForLocation = function (location) {
|
||||||
return downloadUrl + "/" + location;
|
return downloadUrl + "/" + OctoPrintClient.escapePath(location);
|
||||||
};
|
};
|
||||||
|
|
||||||
var downloadForEntry = function (location, filename) {
|
var downloadForEntry = function (location, filename) {
|
||||||
return downloadForLocation(location) + "/" + filename;
|
return downloadForLocation(location) + "/" + OctoPrintClient.escapePath(filename);
|
||||||
};
|
};
|
||||||
|
|
||||||
var resourceForEntry = function (location, filename) {
|
var resourceForEntry = function (location, filename) {
|
||||||
return resourceForLocation(location) + "/" + filename;
|
return resourceForLocation(location) + "/" + OctoPrintClient.escapePath(filename);
|
||||||
};
|
};
|
||||||
|
|
||||||
var preProcessList = function (response) {
|
var preProcessList = function (response) {
|
||||||
|
|||||||
@@ -11,15 +11,15 @@
|
|||||||
var bulkDownloadUrl = "downloads/timelapses";
|
var bulkDownloadUrl = "downloads/timelapses";
|
||||||
|
|
||||||
var timelapseUrl = function (filename) {
|
var timelapseUrl = function (filename) {
|
||||||
return url + "/" + filename;
|
return url + "/" + OctoPrintClient.escapePath(filename);
|
||||||
};
|
};
|
||||||
|
|
||||||
var timelapseDownloadUrl = function (filename) {
|
var timelapseDownloadUrl = function (filename) {
|
||||||
return downloadUrl + "/" + filename;
|
return downloadUrl + "/" + OctoPrintClient.escapePath(filename);
|
||||||
};
|
};
|
||||||
|
|
||||||
var unrenderedTimelapseUrl = function (name) {
|
var unrenderedTimelapseUrl = function (name) {
|
||||||
return url + "/unrendered/" + name;
|
return url + "/unrendered/" + OctoPrintClient.escapePath(name);
|
||||||
};
|
};
|
||||||
|
|
||||||
var OctoPrintTimelapseClient = function (base) {
|
var OctoPrintTimelapseClient = function (base) {
|
||||||
|
|||||||
Reference in new issue
Block a user