Skip to content

revisit prettier automation #2470

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

Open
pkra opened this issue Mar 7, 2025 · 6 comments
Open

revisit prettier automation #2470

pkra opened this issue Mar 7, 2025 · 6 comments
Assignees
Labels
editorial a change to an example, note, spelling, grammar, or is related to publishing or the repo

Comments

@pkra
Copy link
Member

pkra commented Mar 7, 2025

In #2464 I had re-activated prettier after it had been disabled in #2307.

I don't know if the dry-run option was really relevant. But it disabled the automation and didn't surface the errors. I don't think that was what we wanted.

I'm not sure if the dry-run option was necessary. It looks to me that the failure should be caught by handle-commit-failure anyway?

If it was, then we could change the action to run prettier on commits to main (instead of on PRs).

Alternatively, we could give up on automated formatting and just use dry-run, but surfacing errors (which authors then need to fix).

Or there are other ideas.

@pkra pkra added the editorial a change to an example, note, spelling, grammar, or is related to publishing or the repo label Mar 7, 2025
@daniel-montalvo daniel-montalvo moved this to Todo in ARIA Editors Mar 11, 2025
@pkra pkra moved this from Todo to Agenda+ in ARIA Editors Mar 12, 2025
@pkra
Copy link
Member Author

pkra commented Mar 17, 2025

In light of https://www.stepsecurity.io/blog/harden-runner-detection-tj-actions-changed-files-action-is-compromised (though we luckily don't use tj-actions/changed) perhaps we should reconsider using a third party action.

@pkra
Copy link
Member Author

pkra commented Mar 25, 2025

Aside: I keep seeing "random" small changes like 39412c3 in #2489

I don't know if prettier is at fault or if CI may run different versions.

In any case, it might be worth figuring out a solution that only runs prettier on files with changes.

@pkra
Copy link
Member Author

pkra commented Mar 26, 2025

Discussed at editors' meeting today https://www.w3.org/2025/03/26-aria-editors-minutes.html#475b

@pkra
Copy link
Member Author

pkra commented Mar 26, 2025

We want to explore formatting after merge. While there is a chance of introducing merge conflicts, it seems fairly unlikely that formatting will add unexpected merge conflicts - the expectation is that formatting only affects lines that were changed.

@daniel-montalvo I realized it would cause unnecessary respec builds from main. How much of a concern is that?

@daniel-montalvo
Copy link
Contributor

Partially addressed in #2536

Still pending is how to handle forks more properly. We are now just throwing an error, which is not very helpful.

@pkra
Copy link
Member Author

pkra commented May 28, 2025

Discussed today at the editors' call https://www.w3.org/2025/05/28-aria-editors-minutes.html

We're leaning towards switching to a custom action. We also want to additionally run that action on commits to main, so that PRs from forks get fixed upon merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editorial a change to an example, note, spelling, grammar, or is related to publishing or the repo
Projects
Status: Todo
Development

No branches or pull requests

2 participants