Skip to content

Use Jenkins to perform automatic formatting on select repositories upon push #224

@maxachis

Description

@maxachis

Jenkins can be configured to run certain operations upon a Github push to a given repository. We can use this to perform automatic Black formatting, rather than using Github Actions to check if black would reformat anything.

This could eventually be expanded to other options, but this would be a good demonstration of the general principle of having Jenkins perform actions in response to repository pushes.

This Digital Ocean documentation will be helpful for this.

Tentative Steps

  • Setup a Jenkins build which, when a push is made to a given repository/branch, Jenkins downloads that repository, applies black code formatting, and pushes the result to Github with Automatic Code Formatting notice.
  • Obtain the necessary access token with the permissions to make pull requests as needed.
  • Test build against one of our several repositories
  • Expand to other repositories as we see fit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions