2022-03-03 10:35:26 +01:00
|
|
|
import { regEx } from '../../../util/regex';
|
2021-10-20 10:23:49 +05:45
|
|
|
|
2019-11-24 08:43:24 +01:00
|
|
|
export function readOnlyIssueBody(body: string): string {
|
2019-05-21 09:21:44 +03:00
|
|
|
return body
|
|
|
|
.replace(' only once you click their checkbox below', '')
|
|
|
|
.replace(' unless you click a checkbox below', '')
|
2021-08-03 12:44:07 +02:00
|
|
|
.replace(' To discard all commits and start over, click on a checkbox.', '')
|
2021-10-20 10:23:49 +05:45
|
|
|
.replace(regEx(/ Click (?:on |)a checkbox.*\./g), '')
|
2023-02-22 10:28:30 -05:00
|
|
|
.replace(regEx(/\[ ] <!-- \w*-branch.*-->/g), '')
|
2023-04-10 16:23:22 +03:00
|
|
|
.replace(regEx(/- \[ ] <!-- rebase-all-open-prs -->.*/g), '')
|
|
|
|
.replace(regEx(/ - \[ ] <!-- create-all-rate-limited-prs -->.*/g), '');
|
2019-05-21 09:21:44 +03:00
|
|
|
}
|
2019-05-21 11:15:50 +02:00
|
|
|
|
|
|
|
export default readOnlyIssueBody;
|