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"
|
||||
on:
|
||||
issues:
|
||||
types: [opened, edited, closed, reopened]
|
||||
types: [opened, edited, closed, reopened, labeled, unlabeled]
|
||||
|
||||
jobs:
|
||||
issue-automation:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v2
|
||||
- uses: actions/github-script@v5
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
let labels = [];
|
||||
let labels = context.payload.issue.labels.map(label => label.name);
|
||||
let setLabels = false;
|
||||
context.payload.issue.labels.forEach(label => { labels.push(label.name) });
|
||||
|
||||
switch (context.payload.action) {
|
||||
|
||||
@@ -55,7 +54,7 @@ jobs:
|
||||
}
|
||||
|
||||
if (setLabels) {
|
||||
github.issues.setLabels({
|
||||
github.rest.issues.setLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
@@ -67,3 +66,91 @@ jobs:
|
||||
# if: github.event_name == 'issues' && (github.event.action == 'opened' || github.event.action == 'edited')
|
||||
# with:
|
||||
# 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:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
- uses: actions/github-script@v2
|
||||
- uses: actions/github-script@v5
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
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;
|
||||
context.payload.pull_request.labels.forEach(label => { labels.push(label.name) });
|
||||
|
||||
let target = context.payload.pull_request.base.ref;
|
||||
if (["maintenance", "devel", "staging/maintenance", "staging/devel", "master"].includes(target)) {
|
||||
@@ -27,7 +32,7 @@ jobs:
|
||||
}
|
||||
|
||||
if (setLabels) {
|
||||
github.issues.setLabels({
|
||||
github.rest.issues.setLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
|
||||
+3
-3
@@ -24,10 +24,10 @@ maintenance 1.7.0 07c4630d126617c2ae98a9c23ad49facf7bf0bbd pep440-dev
|
||||
fix/.* 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
|
||||
staging/bugfix 1.6.1 29484fb2926960279e62881d6ee073c374a2a5fe pep440-dev
|
||||
bug/.* 1.6.1 29484fb2926960279e62881d6ee073c374a2a5fe pep440-dev
|
||||
staging/bugfix 1.7.2 945825f03fbd2417a009dd33daf9f787aff60211 pep440-dev
|
||||
bug/.* 1.7.2 945825f03fbd2417a009dd33daf9f787aff60211 pep440-dev
|
||||
|
||||
# staging/maintenance is currently the branch for preparation of 1.7.0rc4
|
||||
# so is regressionfix/...
|
||||
|
||||
@@ -149,6 +149,7 @@ date of first contribution):
|
||||
* [Ian Wilt](https://github.com/ianwiltdotcom)
|
||||
* [Ben Sycha](https://github.com/Sycha)
|
||||
* [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
|
||||
[Daid Braam](https://github.com/daid). Parts of its communication layer and
|
||||
|
||||
@@ -226,6 +226,10 @@ For timelapse type ``zchange``.
|
||||
- 1
|
||||
- float
|
||||
- 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:
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ INSTALL_REQUIRES = [
|
||||
# additional OctoPrint plugins that are maintained on a different release cycle
|
||||
"OctoPrint-FileCheck>=2021.2.23",
|
||||
"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
|
||||
# introduce backwards incompatible changes that might affect plugins, or due to
|
||||
# other observed problems
|
||||
|
||||
@@ -21,10 +21,10 @@ from octoprint.util.version import (
|
||||
)
|
||||
|
||||
SENTRY_URL_SERVER = (
|
||||
"https://3d510fcb31be49c8a811639b7ed18377@o118517.ingest.sentry.io/1373987"
|
||||
"https://690e174698034bcc95928e6bfa8573f7@o118517.ingest.sentry.io/1373987"
|
||||
)
|
||||
SENTRY_URL_COREUI = (
|
||||
"https://c6ab43a97f224198ae62a6e11e253cf0@o118517.ingest.sentry.io/1374096"
|
||||
"https://186f1dc5da7d46ab9d6b6de564d839bb@o118517.ingest.sentry.io/1374096"
|
||||
)
|
||||
|
||||
SETTINGS_DEFAULTS = {
|
||||
|
||||
@@ -50,7 +50,7 @@ $(function () {
|
||||
return !item.enabled;
|
||||
}
|
||||
},
|
||||
"popularity",
|
||||
"name",
|
||||
[],
|
||||
[
|
||||
["bundled", "3rdparty"],
|
||||
@@ -138,7 +138,7 @@ $(function () {
|
||||
return !plugin.abandoned;
|
||||
}
|
||||
},
|
||||
"title",
|
||||
"popularity",
|
||||
["filter_installed", "filter_incompatible"],
|
||||
[],
|
||||
0
|
||||
|
||||
@@ -37,6 +37,11 @@ from octoprint.server.util.flask import (
|
||||
from octoprint.settings import settings, valid_boolean_trues
|
||||
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
|
||||
|
||||
_file_cache = {}
|
||||
@@ -448,7 +453,7 @@ def _getFileList(
|
||||
+ "downloads/files/"
|
||||
+ FileDestinations.LOCAL
|
||||
+ "/"
|
||||
+ file_or_folder["path"],
|
||||
+ urlquote(file_or_folder["path"]),
|
||||
}
|
||||
|
||||
result.append(file_or_folder)
|
||||
@@ -702,7 +707,7 @@ def uploadGcodeFile(target):
|
||||
+ "downloads/files/"
|
||||
+ FileDestinations.LOCAL
|
||||
+ "/"
|
||||
+ filename,
|
||||
+ urlquote(filename),
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1034,7 +1039,10 @@ def gcodeFileCommand(filename, target):
|
||||
abort(404, description="Unknown profile")
|
||||
|
||||
location = url_for(
|
||||
".readGcodeFile", target=target, filename=full_path, _external=True
|
||||
".readGcodeFile",
|
||||
target=target,
|
||||
filename=full_path,
|
||||
_external=True,
|
||||
)
|
||||
result = {
|
||||
"name": destination,
|
||||
@@ -1047,7 +1055,7 @@ def gcodeFileCommand(filename, target):
|
||||
+ "downloads/files/"
|
||||
+ target
|
||||
+ "/"
|
||||
+ full_path,
|
||||
+ urlquote(full_path),
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1154,7 +1162,10 @@ def gcodeFileCommand(filename, target):
|
||||
fileManager.move_folder(target, filename, destination)
|
||||
|
||||
location = url_for(
|
||||
".readGcodeFile", target=target, filename=destination, _external=True
|
||||
".readGcodeFile",
|
||||
target=target,
|
||||
filename=destination,
|
||||
_external=True,
|
||||
)
|
||||
result = {
|
||||
"name": name,
|
||||
@@ -1168,7 +1179,7 @@ def gcodeFileCommand(filename, target):
|
||||
+ "downloads/files/"
|
||||
+ target
|
||||
+ "/"
|
||||
+ destination
|
||||
+ urlquote(destination)
|
||||
)
|
||||
|
||||
r = make_response(jsonify(result), 201)
|
||||
|
||||
@@ -24,6 +24,11 @@ from octoprint.server.util.flask import (
|
||||
)
|
||||
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"
|
||||
|
||||
# ~~ timelapse handling
|
||||
@@ -140,7 +145,7 @@ def getTimelapseData():
|
||||
finished_list = []
|
||||
for f in files:
|
||||
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)
|
||||
|
||||
result = {
|
||||
@@ -160,7 +165,7 @@ def getTimelapseData():
|
||||
@Permissions.TIMELAPSE_DOWNLOAD.require(403)
|
||||
def downloadTimelapse(filename):
|
||||
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,
|
||||
"baudrate": None,
|
||||
"exclusive": True,
|
||||
"lowLatency": True,
|
||||
"lowLatency": False,
|
||||
"autoconnect": False,
|
||||
"log": False,
|
||||
"timeout": {
|
||||
|
||||
@@ -426,5 +426,11 @@
|
||||
});
|
||||
};
|
||||
|
||||
OctoPrintClient.escapePath = function (path) {
|
||||
return _.map(path.split("/"), function (p) {
|
||||
return encodeURIComponent(p);
|
||||
}).join("/");
|
||||
};
|
||||
|
||||
return OctoPrintClient;
|
||||
});
|
||||
@@ -14,19 +14,19 @@
|
||||
};
|
||||
|
||||
var resourceForLocation = function (location) {
|
||||
return url + "/" + location;
|
||||
return url + "/" + OctoPrintClient.escapePath(location);
|
||||
};
|
||||
|
||||
var downloadForLocation = function (location) {
|
||||
return downloadUrl + "/" + location;
|
||||
return downloadUrl + "/" + OctoPrintClient.escapePath(location);
|
||||
};
|
||||
|
||||
var downloadForEntry = function (location, filename) {
|
||||
return downloadForLocation(location) + "/" + filename;
|
||||
return downloadForLocation(location) + "/" + OctoPrintClient.escapePath(filename);
|
||||
};
|
||||
|
||||
var resourceForEntry = function (location, filename) {
|
||||
return resourceForLocation(location) + "/" + filename;
|
||||
return resourceForLocation(location) + "/" + OctoPrintClient.escapePath(filename);
|
||||
};
|
||||
|
||||
var preProcessList = function (response) {
|
||||
|
||||
@@ -11,15 +11,15 @@
|
||||
var bulkDownloadUrl = "downloads/timelapses";
|
||||
|
||||
var timelapseUrl = function (filename) {
|
||||
return url + "/" + filename;
|
||||
return url + "/" + OctoPrintClient.escapePath(filename);
|
||||
};
|
||||
|
||||
var timelapseDownloadUrl = function (filename) {
|
||||
return downloadUrl + "/" + filename;
|
||||
return downloadUrl + "/" + OctoPrintClient.escapePath(filename);
|
||||
};
|
||||
|
||||
var unrenderedTimelapseUrl = function (name) {
|
||||
return url + "/unrendered/" + name;
|
||||
return url + "/unrendered/" + OctoPrintClient.escapePath(name);
|
||||
};
|
||||
|
||||
var OctoPrintTimelapseClient = function (base) {
|
||||
|
||||
Reference in new issue
Block a user