-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
65 changed files
with
1,116 additions
and
536 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: category.Bug | ||
assignees: '' | ||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
|
||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
|
||
- OS: [e.g. Windows 11] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
name: Custom issue template | ||
about: Describe this issue template's purpose here. | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: 'category.Feature' | ||
assignees: '' | ||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/app/core/models/templates/section-parsers/common-parsers.model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const { char, choice, coroutine, everyCharUntil, str, whitespace } = require('arcsecond'); | ||
|
||
const TEAM_RESPONSE_HEADER = "# Team's Response"; | ||
const DEFAULT_TEAM_RESPONSE = 'No details provided by team.'; | ||
|
||
export function buildTeamResponseSectionParser(nextHeader: string) { | ||
return coroutine(function* () { | ||
yield str(TEAM_RESPONSE_HEADER); | ||
yield whitespace; | ||
const teamResponse = yield everyCharUntil(str(nextHeader)); | ||
return teamResponse.trim() ? teamResponse.trim() : DEFAULT_TEAM_RESPONSE; | ||
}); | ||
} | ||
|
||
export function buildCheckboxParser(description: string) { | ||
return coroutine(function* () { | ||
yield str('- ['); | ||
const checkbox = yield choice([char('x'), whitespace]); | ||
yield str('] ' + description); | ||
|
||
return checkbox === 'x'; | ||
}); | ||
} |
18 changes: 18 additions & 0 deletions
18
src/app/core/models/templates/section-parsers/issue-dispute-section-parser.model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { IssueDispute } from '../../issue-dispute.model'; | ||
|
||
const { coroutine, everyCharUntil, optionalWhitespace, str } = require('arcsecond'); | ||
|
||
const SECTION_TITLE_PREFIX = '## :question: '; | ||
const TEAM_SAYS_HEADER = '### Team says:'; | ||
const LINE_SEPARATOR = '-------------------'; | ||
|
||
export const IssueDisputeSectionParser = coroutine(function* () { | ||
yield str(SECTION_TITLE_PREFIX); | ||
const title = yield everyCharUntil(str(TEAM_SAYS_HEADER)); | ||
|
||
const description = yield everyCharUntil(str(LINE_SEPARATOR)); | ||
yield str(LINE_SEPARATOR); | ||
yield optionalWhitespace; | ||
|
||
return new IssueDispute(title.trim(), description.trim()); | ||
}); |
30 changes: 30 additions & 0 deletions
30
src/app/core/models/templates/section-parsers/moderation-section-parser.model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { Checkbox } from '../../checkbox.model'; | ||
import { IssueDispute } from '../../issue-dispute.model'; | ||
import { buildCheckboxParser } from './common-parsers.model'; | ||
|
||
const { coroutine, everyCharUntil, lookAhead, optionalWhitespace, str, whitespace } = require('arcsecond'); | ||
|
||
const SECTION_TITLE_PREFIX = '## :question: '; | ||
const DONE_CHECKBOX_DESCRIPTION = 'Done'; | ||
const LINE_SEPARATOR = '-------------------'; | ||
|
||
export const DoneCheckboxParser = buildCheckboxParser(DONE_CHECKBOX_DESCRIPTION); | ||
|
||
export const ModerationSectionParser = coroutine(function* () { | ||
yield str(SECTION_TITLE_PREFIX); | ||
const title = yield everyCharUntil(str('- [')); // every char until the done checkbox | ||
|
||
const description = yield lookAhead(everyCharUntil(str(LINE_SEPARATOR))); | ||
|
||
const doneCheckboxValue = yield DoneCheckboxParser; | ||
yield whitespace; | ||
const tutorResponse = yield everyCharUntil(str(LINE_SEPARATOR)); | ||
yield str(LINE_SEPARATOR); | ||
yield optionalWhitespace; | ||
|
||
const dispute = new IssueDispute(title.trim(), description.trim()); | ||
dispute.todo = new Checkbox(DONE_CHECKBOX_DESCRIPTION, doneCheckboxValue); | ||
dispute.tutorResponse = tutorResponse.trim(); | ||
|
||
return dispute; | ||
}); |
113 changes: 113 additions & 0 deletions
113
src/app/core/models/templates/section-parsers/tester-response-section-parser.model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
import { buildCheckboxParser } from './common-parsers.model'; | ||
|
||
const { | ||
between, | ||
coroutine, | ||
everyCharUntil, | ||
letters, | ||
lookAhead, | ||
optionalWhitespace, | ||
pipeParsers, | ||
possibly, | ||
str, | ||
whitespace | ||
} = require('arcsecond'); | ||
|
||
const SECTION_TITLE_PREFIX = '## :question: Issue '; | ||
const TEAM_CHOSE_PREFIX = 'Team chose '; | ||
const TESTER_CHOSE_PREFIX = 'Originally '; | ||
const DISAGREE_CHECKBOX_DESCRIPTION = 'I disagree'; | ||
const DISAGREEMENT_REASON_PREFIX = '**Reason for disagreement:** '; | ||
const LINE_SEPARATOR = '-------------------'; | ||
const DUPLICATE_STATUS_MESSAGE = | ||
"Team chose to mark this issue as a duplicate of another issue (as explained in the _**Team's response**_ above)"; | ||
|
||
export const DisagreeCheckboxParser = buildCheckboxParser(DISAGREE_CHECKBOX_DESCRIPTION); | ||
|
||
function buildExtractResponseParser(category: string) { | ||
return between(str('[`' + category + '.'))(str('`]'))(letters); | ||
} | ||
|
||
function buildTeamResponseParser(category: string) { | ||
const extractResponseParser = buildExtractResponseParser(category); | ||
|
||
return pipeParsers([str(TEAM_CHOSE_PREFIX), extractResponseParser]); | ||
} | ||
|
||
function buildTesterResponseParser(category: string) { | ||
const extractResponseParser = buildExtractResponseParser(category); | ||
|
||
return pipeParsers([str(TESTER_CHOSE_PREFIX), extractResponseParser]); | ||
} | ||
|
||
export const DisagreeReasonParser = coroutine(function* () { | ||
yield str(DISAGREEMENT_REASON_PREFIX); | ||
const reasonForDisagreement = yield everyCharUntil(str(LINE_SEPARATOR)); | ||
yield str(LINE_SEPARATOR); | ||
|
||
return reasonForDisagreement.trim(); | ||
}); | ||
|
||
// Issue duplicate section has a different format than the other three | ||
const DuplicateSectionParser = coroutine(function* () { | ||
yield str('status'); | ||
yield whitespace; | ||
yield str(DUPLICATE_STATUS_MESSAGE); | ||
yield whitespace; | ||
|
||
const disagreeCheckboxValue = yield DisagreeCheckboxParser; | ||
yield whitespace; | ||
const reasonForDisagreement = yield DisagreeReasonParser; | ||
|
||
return { | ||
disagreeCheckboxValue: disagreeCheckboxValue, | ||
reasonForDisagreement: reasonForDisagreement | ||
}; | ||
}); | ||
|
||
export const TesterResponseSectionParser = coroutine(function* () { | ||
// section title | ||
yield str(SECTION_TITLE_PREFIX); | ||
const title = yield letters; | ||
yield whitespace; | ||
|
||
if (title === 'duplicate') { | ||
const dupSectionResult = yield DuplicateSectionParser; | ||
yield optionalWhitespace; | ||
|
||
return { | ||
title: title + ' status', | ||
description: DUPLICATE_STATUS_MESSAGE, | ||
teamChose: null, | ||
testerChose: null, | ||
disagreeCheckboxValue: dupSectionResult.disagreeCheckboxValue, | ||
reasonForDisagreement: dupSectionResult.reasonForDisagreement | ||
}; | ||
} | ||
|
||
const description = yield lookAhead(everyCharUntil(DisagreeCheckboxParser)); | ||
|
||
// team and tester response | ||
const teamResponseParser = buildTeamResponseParser(title); | ||
const testerResponseParser = buildTesterResponseParser(title); | ||
|
||
const teamChose = yield teamResponseParser; | ||
yield whitespace; | ||
// response section does not have tester response | ||
const testerChose = yield possibly(testerResponseParser); | ||
yield optionalWhitespace; | ||
|
||
const disagreeCheckboxValue = yield DisagreeCheckboxParser; | ||
yield whitespace; | ||
const reasonForDisagreement = yield DisagreeReasonParser; | ||
yield optionalWhitespace; | ||
|
||
return { | ||
title: title, | ||
description: description.trim(), | ||
teamChose: teamChose, | ||
testerChose: testerChose, | ||
disagreeCheckboxValue: disagreeCheckboxValue, | ||
reasonForDisagreement: reasonForDisagreement | ||
}; | ||
}); |
25 changes: 0 additions & 25 deletions
25
src/app/core/models/templates/sections/duplicate-of-section.model.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.