* Expect that the workspace has a pull_request_template.md file, and that it * is a non-empty string. The pull_request_template.md is expected to: * * - Not contain an examples section (unless the workspace is the module * template itself). * * @param {Workspace} workspace - The workspace to c
(workspace, workspaceName)
| 173 | * @returns {Promise<void>} |
| 174 | */ |
| 175 | async function expectPullRequestTemplate(workspace, workspaceName) { |
| 176 | if (workspaceName === 'metamask-module-template') { |
| 177 | return; |
| 178 | } |
| 179 | |
| 180 | const pullRequestTemplate = await getWorkspaceFile( |
| 181 | workspace, |
| 182 | '.github/pull_request_template.md', |
| 183 | ); |
| 184 | |
| 185 | if (!pullRequestTemplate) { |
| 186 | workspace.error( |
| 187 | 'The pull_request_template.md is missing. This should be added.', |
| 188 | ); |
| 189 | } |
| 190 | |
| 191 | if (pullRequestTemplate.includes('## Examples')) { |
| 192 | workspace.error( |
| 193 | 'The pull_request_template.md contains an examples section. This section should be removed.', |
| 194 | ); |
| 195 | } |
| 196 | } |
| 197 | |
| 198 | /** |
| 199 | * Expect that the workspace has a valid `exports` field. The `exports` field |
no test coverage detected
searching dependent graphs…