-
Notifications
You must be signed in to change notification settings - Fork 22.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use @mdn-bot as committer + author instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's more of a question of "should" instead of "can" 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Quote from https://github.com/peter-evans/create-pull-request#action-behaviour:
|
bc43c2f
to
2aa6f3d
Compare
I've added the MDN-bot as the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one last suggestion to link directly to the log of the action run.
Co-authored-by: Claas Augner <[email protected]>
* chore: Add Markdownlint cleanup job yarn cache chore: use mdn-bot as author chore: update PR titles and branch * chore: add direct link to failing job Co-authored-by: Claas Augner <[email protected]> Co-authored-by: Claas Augner <[email protected]>
GitHub Action to create daily PR fixes for auto-fixable Markdownlint issues