chore: Add Markdownlint cleanup job#16036
Conversation
| branch: daily-markdownlint-fix | ||
| title: "Daily Markdownlint auto-cleanup" | ||
| body: | | ||
| Auto-fix cleanup PR using Markdown CLI. |
There was a problem hiding this comment.
Can we append unfixable issues to the body?
Like:
./files/en-us/web/index.md:2 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "### Title"]
Is it possible to pipe the output to a lint.log file and attach file contents to the PR body.
There was a problem hiding this comment.
A good compromise would be to link to the run that triggered the PR: https://github.com/mdn/content/actions/runs/${GITHUB_RUN_ID}
|
I've been cleaning these up for awhile, there were only ~40 changed files when I tested it on my repo nschonni#105 |
|
#16075 are the only outstanding issues currently |
|
You are right. I accidentally ran it with default config and got ~700 files updated. 😬 Also the processing all the files didn't take much time. Looks like it keeps track of modified files and directories. We need to include issues, in PR body, that the linter couldn't fix and need manual work. |
|
BTW, I have been looking at the "append log to body", but it hasn't been simple and I don't know if I'll be able to resolve it |
9ca981a to
47abd2f
Compare
|
Once #12316 is merged, should this be updated to use the |
|
Yes, I think using the script would make sense. If the other one lands, I'll adjust this one, but I didn't want either to block the other |
47abd2f to
fccb97e
Compare
teoli2003
left a comment
There was a problem hiding this comment.
LGTM. I would like a dev review before merging this as I'm not an expert in these workflows, but we definitively would like to make a try with this one.
| commit-message: "chore: auto-fix Markdownlint issues" | ||
| branch: daily-markdownlint-fix | ||
| title: "Daily Markdownlint auto-cleanup" | ||
| body: | | ||
| No unfixable issues found |
There was a problem hiding this comment.
The Author and/or committer can be overridden https://github.com/peter-evans/create-pull-request#action-inputs
There was a problem hiding this comment.
Yeah, it's more of a question of "should" instead of "can" 😄
There was a problem hiding this comment.
Yes, it would be nice to have a bot as the author, it makes clear that it is an automatic process.
There was a problem hiding this comment.
The latest user who creates the schedule trigger is the author by default. [ref]
To make @mdn-bot the author see #16036 (comment)
There was a problem hiding this comment.
I think it's okay to use @mdn-bot as author (though committer is not quite correct), but the default (GitHub <[email protected]>) wouldn't hurt either.
|
This is an interesting workflow. I have a few queries about how this is going to work:
|
This is not critical, but it looks like a good time. Night in the US, and about 10am Central European time.
I think we should start by merging them manually. If it goes well, we can later do what is done with the daily yari update and merge them automatically.
Squash and merge should be the default, like for any other PR on mdn/content.
I like what dependabot is doing: closing the old PR and opening a new one.
I'm a bit afraid of reusing a branch: it could be in a strange state. What does dependabot does? It works pretty well and we should do the same. |
| commit-message: "chore: auto-fix Markdownlint issues" | ||
| branch: daily-markdownlint-fix | ||
| title: "Daily Markdownlint auto-cleanup" | ||
| body: | | ||
| No unfixable issues found |
There was a problem hiding this comment.
I think it's okay to use @mdn-bot as author (though committer is not quite correct), but the default (GitHub <[email protected]>) wouldn't hurt either.
|
bc43c2f to
2aa6f3d
Compare
|
I've added the MDN-bot as the |
Josh-Cena
left a comment
There was a problem hiding this comment.
LGTM, we can play with this
|
Yes, let's try this. |
ca64f21 to
c981724
Compare
|
@caugner you still have a blocking review on this |
|
Is anything blocking this? (I would prefer to merge this near the beginning of the week rather than close to the weekend) |
|
None, just waiting on @caugner to re-review |
yarn cache chore: use mdn-bot as author chore: update PR titles and branch
c981724 to
b39f11f
Compare
caugner
left a comment
There was a problem hiding this comment.
LGTM, just one last suggestion to link directly to the log of the action run.
Co-authored-by: Claas Augner <[email protected]>
GitHub Action to create daily PR fixes for auto-fixable Markdownlint issues