Sign inSign up

xorima/github-file-manager

By xorima

•Updated over 3 years ago

A file manager for Github

Image
0

10K+

xorima/github-file-manager repository overview

⁠Github-file-manager

This application is designed to manage the files inside your github repository from a source of truth repository.

A good usecase for this is if you want a standardised TESTING.md file across all you repos labeled cookbook you can put that file in a source repo and this script will open pull requests on any repository which does not conform to the standard.

⁠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⁠
GFM_SOURCE_REPO_OWNERStringYesThe Owner of the repository whoch holds the standardised files
GFM_SOURCE_REPO_NAMEStringYesThe name of the repository which holds the standardised files
GFM_SOURCE_REPO_PATHStringYesThe folder inside the Source Repo to find the files you wish to have standardised
GFM_DESTINATION_REPO_OWNERStringYesThe owner of the destination repositories you wish to update
GFM_DESTINATION_REPO_TOPICSStringYesThe topics that the destination repositories are tagged with to search for, Takes a csv, eg: chef-cookbook,vscode
GFM_BRANCH_NAMEStringYesThe name of the branch to create if changes are required
GFM_PULL_REQUEST_TITLEStringYesThe title to apply to the Pull Request
GFM_PULL_REQUEST_BODYStringYesThe body text to apply to the Pull Request
GFM_PULL_REQUEST_LABELSStringNoThe labels to apply to the Pull Request, Takes a csv, eg: tech-debt,automated
GFM_GIT_NAMEStringNoThe Name to use when creating the git commits
GFM_GIT_EMAILStringNoThe E-mail address to use when creating the git commits

⁠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

Tag summary

Content type

Image

Digest

sha256:3a20899bf…

Size

173.3 MB

Last updated

over 3 years ago

docker pull xorima/github-file-manager