File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ ( function ( ) {
2+ var textareaId = '#pull_request_body' ;
3+ var textarea = document . querySelector ( textareaId ) ;
4+ var template = '' ;
5+ var firstLine ;
6+
7+ template += firstLine = 'ID (ticket/card/issue): ' ;
8+ template += '\n\n' ;
9+ template += '## Task/Problem\n\n' ;
10+ template += '## Solution\n\n' ;
11+ template += '## Steps to reproduce\n\n' ;
12+ template += '## UAT\n\n' ;
13+ template += '## Code review\n\n\n' ;
14+ template += '- [ ] Unit tests passed\n' ;
15+ template += '- [ ] System tests passed\n' ;
16+
17+ if ( textarea ) {
18+ textarea . value = template ;
19+ textarea . focus ( ) ;
20+ textarea . scrollTop = 0 ;
21+ textarea . selectionStart = textarea . selectionEnd = firstLine . length ;
22+ } else {
23+ alert ( 'You are either not on the PR page or there is no ' + textareaId + ' element.' ) ;
24+ }
25+ } ) ( ) ;
You can’t perform that action at this time.
0 commit comments