jackfirth / jackfirth/resyntax

Zero-config autofixer

Open
#399 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ci-integration enhancement
Dominant language
Racket
Stars
70
Forks
11
PR merge metrics
No merged PRs in 30d

Description

The Autofixer is quite useful, but requires a lot of fiddly manual setup. Even with the custom action I've created, setting up weekly Autofixer pull requests requires creating a new GitHub workflow, figuring out how to properly install the project in that workflow, getting a private key for the Resyntax CI bot account, and using the jackfirth/create-resyntax-pull-request action. It's a lot of steps and it's easy to get something wrong.

Ideally, the Autofixer would operate on a zero configuration model by using the package catalog. Instead of each user setting up their own CI integration with the autofixer, a central server would periodically run Resyntax on all GitHub-based packages in the package catalog and create pull requests for each of them. Users could opt-in (or out, depending on the signup model) using the package's info.rkt file. Optionally users could specify limits on the number of fixes, frequency and size of pull requests, etc, but the default experience should only require opting in or out. The benefits of this approach include:

  • Far simpler setup hopefully leading to much wider adoption, which in turn helps greatly with migrating the Racket ecosystem away from deprecated code.
  • More motivation for third-party libraries to provide their own library-specific refactoring rules.
  • Much easier debugging on my end, as I won't need to deal with permissions issues in dozens of different repositories.

Downsides:

  • I'll have to either run my own infrastructure or integrate with the package build server.
  • Users have a lot less control and are more likely to receive unwanted pull requests.
  • Code not in published packages can't be refactored.
  • Code in the base package can't be refactored, probably. At the very least, special handling of base is required.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the package catalog and package build server integration, then inspect the existing GitHub workflow setup and the info.rkt opt-in mechanism described here. Define the scope around package discovery, pull-request authentication, scheduling, limits, and special handling for base; done means an agreed design for the zero-configuration workflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, github-actions
Domain
devops, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.