Sign inSign up

xorima/github-cookstyle-runner

By xorima

•Updated over 3 years ago

Checks our repositories and runs cookstyle against them

Image
0

10K+

xorima/github-cookstyle-runner repository overview

⁠Github-cookstyle-runner

This application is designed to run cookstyle against repositories found by a topic in a github org and issue pull requests with the changes

⁠User Permissions

  • It is recommended to use a github bot account when using this application
  • You must ensure the account has permissions to create branches and pull requests directly on the repository, it will not try to fork.
  • You must also supply a GITHUB_TOKEN to access the github api server with.

⁠Items of Note

Github has a rate limiter, do not run this script continously you will get rate limited and then the script will fail

⁠Configuration

Below are a list of variables, what they mean and example values

NameTypeRequiredDescription
GITHUB_TOKENStringYesToken to access the github api with, see Creating a token⁠
GCR_DESTINATION_REPO_OWNERStringYesThe owner of the destination repositories you wish to update
GCR_DESTINATION_REPO_TOPICSStringYesThe topics that the destination repositories are tagged with to search for, Takes a csv, eg: chef-cookbook,vscode
GCR_BRANCH_NAMEStringYesThe name of the branch to create if changes are required
GCR_PULL_REQUEST_TITLEStringYesThe title to apply to the Pull Request
GCR_PULL_REQUEST_BODYStringYesThe body text to apply to the Pull Request
GCR_PULL_REQUEST_LABELSStringNoThe labels to apply to the Pull Request, Takes a csv, eg: tech-debt,automated
GCR_GIT_NAMEStringNoThe Name to use when creating the git commits
GCR_GIT_EMAILStringNoThe E-mail address to use when creating the git commits
GCR_CHANGELOG_LOCATIONStringNoThe location of the change log to update relative to the root of the repo, if supplied we will update it
GCR_CHANGELOG_MARKERStringNoThe string to use as the update point in the changelog, if not found it will be added on line 3

⁠Git Authentication

We use the GITHUB_TOKEN environment variable to also authenticate against git, github allows this to be used instead of username and password

⁠Docker Tags

This application is tagged as follows

NameDescription
latestThe latest master merge
devThe latest Pull Request build
semvar (eg: 1.0.0)A Github Release of a fixed point in time

While all updates should result in a release this is not always the case, sometimes master will change for non-functional related changes and a release will not be made, eg a new file in the infrastructure folder

⁠Cookstyle version

Cookstyle will be baked into the image, it is baked into the image as part of chef workstation, the chef workstation version will be the latest version available at runtime.

Tag summary

Content type

Image

Digest

sha256:7e7dc6741…

Size

213.5 MB

Last updated

over 3 years ago

docker pull xorima/github-cookstyle-runner