Automatically open a pull request for repositories that have no CONTRIBUTING.md file for a targeted set of repositories.
This code is for a GitHub Action that opens pull requests in the repositories that have a specified repository topic and also don't have a CONTRIBUTING.md file.
If you need support using this project or have questions about it, please open up an issue in this repository. Requests made directly to GitHub staff or support team will be redirected here to open an issue. GitHub SLA's and support/services contracts do not apply to this repository.
All feedback regarding our GitHub Actions, as a whole, should be communicated through issues on our github-ospo repository.
It is desirable, for example, for all Open Source and InnerSource projects to have a CONTRIBUTING.md file that specifies for new contributors what the processes and procedures are for making a new contribution. This has been done in some large GitHub customers organizations.
- It pulls a list of labelled repositories from a
repos.jsonwhich can be generated by the InnerSource-Crawler GitHub Action. - It opens a pull request in each of those repositories which adds the
CONTRIBUTING.mdfile with some template contents.
- Create a repository to host this GitHub Action or select an existing repository.
- Create the env values from the sample workflow below (
GH_TOKEN,GH_ACTOR,PR_TITLE,PR_BODY, andORGANIZATION) with your information as repository secrets. More info on creating secrets can be found here. Note: Your GitHub token will need to have read/write access to all the repositories in therepos.jsonfile. - Copy the below example workflow to your repository and put it in the
.github/workflows/directory with the file extension.yml(ie..github/workflows/auto-contrib-file.yml)
Below are the allowed configuration options: