Skip to content

Conversation

@novusnota
Copy link
Collaborator

@novusnota novusnota commented Nov 17, 2025

Closes #1006
Towards #1352

This PR:

  1. Makes our formatter actually format JSX elements and expressions that the parser could parse as such.
  2. Adds a commander.yml workflow, which is meant to respond to comments. Currently, it can respond to /fmt comments by creating a new commit that applies formatting (npm run fmt:some) to the .mdx and .md files changed in this PR. Notice that it will only react to maintainers and only do work in direct branches.
  3. Does a slight retouch of neighboring pipelines. Those were too small to put in another PR IMHO.

Now, regarding forks, you can read the prior notes or review the commit history, but in short, they are very tough to manage. New commits are often not possible to make without author's discretion, and sending automated review changes is also somewhat error-prone (we do it for our AI pipeline, but the formatter is another story), not to mention the need to secure the dependencies and scripts from various malicious uses.

What we can do, as @Danil42Russia mentioned, is set up https://autofix.ci and run it either on forks or on regular PRs, but only after they are open for review — to avoid hindering the iterative work processes otherwise. For that, someone with higher access to this repository should add it.

Prior notes

Things to try:

  1. Different event activity triggers and check statuses
  2. Merged version of this PR and such checks (in a repo for experiments)
  3. Creating a "GitHub App" and placing it here in the root -- that has the least chances of success because it requires listening to webhooks and I don't want to spawn extra infra for CI right now.

UPD: After some testing, I know that:

  1. Different event activities did not help
  2. check_run always runs from the base (like pull_request_target), so merge was required. That said, it did not help either
  3. Buttons in the UI can only be displayed via GitHub Apps — we won't do that

Also, commits in forks are a massive issue for some reason. We might just use autofix.ci for forks specifically and forget about it.

@github-actions

This comment was marked as outdated.

@novusnota

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@novusnota

This comment was marked as outdated.

@novusnota

This comment was marked as outdated.

novusnota

This comment was marked as outdated.

@novusnota novusnota changed the title feat(ci): add /fmt command for maintainers feat(ci): revamp formatting workflow Dec 4, 2025
@novusnota novusnota force-pushed the closes-1006/dispatch-the-fmt branch from b583b0c to 7fc1c50 Compare December 4, 2025 14:48
@github-actions

This comment has been minimized.

@novusnota novusnota marked this pull request as ready for review December 11, 2025 02:48
@novusnota novusnota changed the title feat(ci): revamp formatting workflow feat(ci): revamp JSX formatting and add the /fmt command for maintainers Dec 11, 2025
@novusnota novusnota changed the title feat(ci): revamp JSX formatting and add the /fmt command for maintainers feat(ci): revamp JSX-in-MDX formatting and add the /fmt command for maintainers Dec 11, 2025
@novusnota novusnota changed the title feat(ci): revamp JSX-in-MDX formatting and add the /fmt command for maintainers feat(ci): revamp JSX-in-MDX formatting and add /fmt command for maintainers Dec 11, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No documentation issues detected.

@novusnota novusnota marked this pull request as ready for review January 6, 2026 10:54
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No documentation issues detected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Format] Allow to fix the PR formatting from GitHub's UI

2 participants