File tree Expand file tree Collapse file tree 1 file changed +34
-1
lines changed Expand file tree Collapse file tree 1 file changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -197,9 +197,42 @@ jobs:
197
197
198
198
# Lint files against EditorConfig:
199
199
- name : ' Lint against EditorConfig'
200
+ id : lint-editorconfig
200
201
run : |
201
202
files=$(echo "${{ steps.random-files.outputs.files }}" | tr ',' ' ')
202
- make lint-editorconfig-files FILES="${files}"
203
+ make lint-editorconfig-files FILES="${files}" 2>&1 | tee lint_editorconfig_errors.txt
204
+
205
+ # Create sub-issue for EditorConfig lint failures:
206
+ - name : ' Create sub-issue for EditorConfig lint failures'
207
+ if : failure() && contains(steps.lint-editorconfig.outcome, 'failure')
208
+ env :
209
+ GITHUB_TOKEN : ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
210
+ run : |
211
+ BODY_FILE="$GITHUB_WORKSPACE/lint_issue_body.md"
212
+ cat << EOF > "$BODY_FILE"
213
+ ## EditorConfig Linting Failures
214
+
215
+ Linting failures were detected in the automated EditorConfig lint workflow run.
216
+
217
+ ### Workflow Details
218
+
219
+ - Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
220
+ - Type: EditorConfig Linting
221
+ - Date: $(date -u +"%Y-%m-%d %H:%M:%S UTC")
222
+
223
+ ### Error Details
224
+
225
+ \`\`\`
226
+ $(cat lint_editorconfig_errors.txt)
227
+ \`\`\`
228
+ EOF
229
+
230
+ . "$GITHUB_WORKSPACE/.github/workflows/scripts/create_sub_issue" \
231
+ 'Fix EditorConfig lint errors' \
232
+ "$BODY_FILE" \
233
+ "5156"
234
+
235
+ rm "$BODY_FILE"
203
236
204
237
# Lint Markdown files:
205
238
- name : ' Lint Markdown files'
You can’t perform that action at this time.
0 commit comments