Skip to content

Commit af6283a

Browse files
authored
add a crash template, and remove redundancies (#3255)
* add a crash template, and remove redundancies * use placeholder instead of value for required fields in bug and crash tempalte
1 parent 1caf3cb commit af6283a

File tree

8 files changed

+157
-107
lines changed

8 files changed

+157
-107
lines changed

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ body:
9999
attributes:
100100
label: What analysis are you seeing the problem on?
101101
description: Please mention the name of the analysis or method that the causes the issue.
102-
placeholder: "One Sample T-Test"
102+
placeholder: One Sample T-Test
103103
validations:
104104
required: false
105105
- type: dropdown
@@ -133,7 +133,7 @@ body:
133133
Please tell us what happened.
134134
135135
Note: You can attach images or log files by clicking this area to highlight it and then dragging files in. If you upload a JASP file, you need to compress your .jasp-file before uploading it to GitHub (aka as a .zip-file; for additional help, see https://jasp-stats.org/2018/03/29/request-feature-report-bug-jasp/). In addition, if you would prefer to not make your data publicly available, you can send your files directly to us, [email protected].
136-
placeholder: "A bug happened!"
136+
placeholder: A bug happened!
137137
validations:
138138
required: true
139139
- type: textarea
@@ -149,7 +149,7 @@ body:
149149
attributes:
150150
label: Steps to Reproduce
151151
description: Can you reproduce the bug? If so, please let us know what steps you take to reproduce this bug.
152-
value: |
152+
placeholder: |
153153
1.
154154
2.
155155
3.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
blank_issues_enabled: false
22
contact_links:
3-
- name: JASP Guide for Requesting Features or Reporting Bugs
3+
- name: JASP Guide for Requesting Features or Reporting Bugs/Crashes
44
url: https://jasp-stats.org/2018/03/29/request-feature-report-bug-jasp/
5-
about: Please use one of the templates to request a feature or report a bug
5+
about: Please use one of the templates to request a feature, report a bug or a crash
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: Crash Report
2+
description: File a crash report
3+
labels: Crash
4+
title: "[Crash]: "
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to fill out this crash report! If this is your first time reporting an issue, please read our [guide](https://jasp-stats.org/2018/03/29/request-feature-report-bug-jasp/) first.
10+
- type: textarea
11+
id: system-info
12+
attributes:
13+
label: System Info
14+
description: Please fill the system information into this field. If you have arrived here via the crash reporter in JASP, this will be filled automatically. If not, go to JASP > About > Copy Debug Information.
15+
placeholder: JASP Version: 0.19.3 (Apple Silicon) | Build Branch: 0.19.3 | Build Date: Jan 3 2025 12:51:39 (Netherlands) | Last Commit: c8710df5442149527b0692cc1367ea5b3c982d04 | OS: macOS Sequoia 15.3 (darwin 24.3.0, arm64) | Install Path: /Applications/JASP.app/Contents/MacOS | Platform: cocoa | System Locale: en_NL
16+
validations:
17+
required: true
18+
- type: dropdown
19+
id: jasp-module
20+
attributes:
21+
label: JASP Module
22+
description: Is there a specific JASP module that caused the crash?
23+
multiple: true
24+
options:
25+
- Unrelated
26+
- Acceptance Sampling
27+
- ANOVA
28+
- Audit
29+
- Bain
30+
- Bayes Factor Functions
31+
- BFpack
32+
- Bsts
33+
- Circular Statistics
34+
- Cochrane Meta-Analyses
35+
- Descriptives
36+
- Distributions
37+
- Equivalence T-Tests
38+
- Factor
39+
- Frequencies
40+
- JAGS
41+
- Learn Bayes
42+
- Learn Stats
43+
- Machine Learning
44+
- Meta Analysis
45+
- Mixed Models
46+
- Network
47+
- Power
48+
- Predictive Analytics
49+
- Process
50+
- Prophet
51+
- Quality Control
52+
- Regression
53+
- Reliability
54+
- Robust T-Tests
55+
- SEM
56+
- Survival
57+
- Summary Statistics
58+
- T-Tests
59+
- Time Series
60+
- Visual Modeling
61+
- Other
62+
validations:
63+
required: true
64+
- type: input
65+
id: jasp-analysis
66+
attributes:
67+
label: Is there a specific analysis that caused the crash?
68+
description: Please mention the name of the analysis or method that the causes the issue.
69+
placeholder: One Sample T-Test
70+
validations:
71+
required: false
72+
- type: textarea
73+
id: log
74+
attributes:
75+
label: Log files
76+
description:
77+
Please upload your Log files by dropping them into the area below, and add any information notes if necessary.
78+
79+
**Read our [Logging Guide](https://github.com/jasp-stats/jasp-desktop/blob/stable/Docs/user-guide/logging-howto.md) page to learn where to (and how to) find JASP log files.**
80+
validations:
81+
required: true
82+
- type: textarea
83+
id: steps-to-reproduce
84+
attributes:
85+
label: Steps to Reproduce
86+
description: |
87+
Please tell us what happened. Can you reproduce the crash? If so, please let us know what steps you take to reproduce this bug.
88+
89+
Note: You can attach images or data by clicking this area to highlight it and then dragging files in. If you upload a JASP file, you need to compress your .jasp-file before uploading it to GitHub (aka as a .zip-file; for additional help, see https://jasp-stats.org/2018/03/29/request-feature-report-bug-jasp/). In addition, if you would prefer to not make your data publicly available, you can send your files directly to us, [email protected].
90+
placeholder: |
91+
1.
92+
2.
93+
3.
94+
...
95+
96+
validations:
97+
required: true
98+
99+
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
module.exports = async function ({github, context}) {
2+
const issue = await github.rest.issues.get({
3+
issue_number: context.issue.number,
4+
owner: context.repo.owner,
5+
repo: context.repo.repo
6+
});
7+
8+
const body = issue.data.body;
9+
// if any of these string are in the issue body, then there was a user upload,
10+
// the first string covers all the image/video files
11+
const regex = /\.log\b/; // Updated regex to remove "user-attachments"
12+
if (!regex.test(body)) {
13+
const comment = "@" + issue.data.user.login +
14+
", thanks for taking the time to create this report. \
15+
Please upload to the issue website ("
16+
+ issue.data.html_url +
17+
", attaching to an email does not work) the **log files** from JASP. \
18+
For more information read our [Logging Guide](https://github.com/jasp-stats/jasp-desktop/blob/stable/Docs/user-guide/logging-howto.md) \
19+
page to learn where to (and how to) find JASP log files.";
20+
21+
github.rest.issues.createComment({
22+
issue_number: context.issue.number,
23+
owner: context.repo.owner,
24+
repo: context.repo.repo,
25+
body: comment
26+
});
27+
28+
github.rest.issues.addLabels({
29+
issue_number: context.issue.number,
30+
owner: context.repo.owner,
31+
repo: context.repo.repo,
32+
labels: ["Waiting for requester"]
33+
});
34+
};
35+
}

.github/scripts/feature_labelAssign.js

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/scripts/bug_labelAssign.js renamed to .github/scripts/issue_labelAssign.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ module.exports = async function ({github, context}, keywords) {
44
// define an array of keyword triples, including the label and
55
// the maintainer to assign
66

7-
8-
97
// get the issue info
108
const issue = await github.rest.issues.get({
119
issue_number: context.issue.number,
@@ -27,8 +25,8 @@ module.exports = async function ({github, context}, keywords) {
2725
}
2826

2927
// test if module keyword is in issue body
30-
const regexModule1 = "\\#\\#\\# JASP Module\\s+,*.*("
31-
const regexModule2 = ").*\\s+\\#\\#\\#";
28+
const regexModule1 = "### (JASP Module|Is your feature request related to a JASP module\\?)\\s+,*.*(";
29+
const regexModule2 = ").*\\s+###";
3230
for (const words of keywords.modules) {
3331
// create the regex to match with, case insensitive
3432
var regex = new RegExp(regexModule1 + words[0] + regexModule2, "i");

.github/workflows/issue_bug_firstResponse.yml renamed to .github/workflows/issue_firstResponse copy.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
- opened
99

1010
jobs:
11-
First-response:
11+
First-response-bug:
1212
runs-on: ubuntu-latest
1313
if: ${{ contains(github.event.issue.labels.*.name, 'Bug') }}
1414
steps:
@@ -18,4 +18,14 @@ jobs:
1818
script: |
1919
const script = require('./.github/scripts/bug_firstResponse.js');
2020
script({github, context});
21-
21+
22+
First-response-crash:
23+
runs-on: ubuntu-latest
24+
if: ${{ contains(github.event.issue.labels.*.name, 'Crash') }}
25+
steps:
26+
- uses: actions/checkout@v3
27+
- uses: actions/github-script@v6
28+
with:
29+
script: |
30+
const script = require('./.github/scripts/crash_firstResponse.js');
31+
script({github, context});
Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,19 @@
1-
2-
# The script consists of several steps:
3-
# 1. define module keyword patterns, the designated label and assignee
4-
# 2. define operating system keyword patterns, and the designated label
5-
# 3. get the info about the issue
6-
# 4. check if module keyword pattern matches text in the issue,
7-
# looping over all patterns:
8-
# - if pattern is found, label the issue, and assign the maintainer
9-
# - if the pattern is not found, check if the label or assignee for the pattern
10-
# is attached to the issue and remove them
11-
# 5. do 4 but with OS keyword patterns
12-
13-
# so far this workflow works best with the bug_template.
14-
# some resources: https://github.com/actions/github-script
15-
# https://octokit.github.io/rest.js/v19
16-
# https://docs.github.com/en/rest
17-
18-
191
name: Label and Assign
202
on:
213
issues:
22-
types:
4+
types:
235
- opened
246
- reopened
257

268
jobs:
27-
Bug-label-and-assign:
9+
Label-and-assign:
2810
runs-on: ubuntu-latest
29-
if: ${{ contains(github.event.issue.labels.*.name, 'Bug') }}
3011
steps:
3112
- uses: actions/checkout@v3
3213
- uses: actions/github-script@v6
3314
with:
3415
script: |
3516
const keyFun = require('./.github/scripts/keywords.js');
3617
const keywords = keyFun();
37-
const script = require('./.github/scripts/bug_labelAssign.js');
38-
script({github, context}, keywords);
39-
40-
Feature-label-and-assign:
41-
runs-on: ubuntu-latest
42-
if: ${{ contains(github.event.issue.labels.*.name, 'Feature Request') }}
43-
steps:
44-
- uses: actions/checkout@v3
45-
- uses: actions/github-script@v6
46-
with:
47-
script: |
48-
const keyFun = require('./.github/scripts/keywords.js');
49-
const keywords = keyFun();
50-
const script = require('./.github/scripts/feature_labelAssign.js');
51-
script({github, context}, keywords);
18+
const script = require('./.github/scripts/issue_labelAssign.js');
19+
script({github, context}, keywords);

0 commit comments

Comments
 (0)