Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.

github/automatic-contrib-prs

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

automatic-contrib-prs

.github/workflows/linter.yml CodeQL Docker Image CI OpenSSF Scorecard

Automatically open a pull request for repositories that have no CONTRIBUTING.md file for a targeted set of repositories.

What this repository does

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.

Support

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.

OSPO GitHub Actions as a Whole

All feedback regarding our GitHub Actions, as a whole, should be communicated through issues on our github-ospo repository.

Why would someone do this

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.

How it does this

  • It pulls a list of labelled repositories from a repos.json which can be generated by the InnerSource-Crawler GitHub Action.
  • It opens a pull request in each of those repositories which adds the CONTRIBUTING.md file with some template contents.

Use as a GitHub Action

  1. Create a repository to host this GitHub Action or select an existing repository.
  2. Create the env values from the sample workflow below (GH_TOKEN, GH_ACTOR, PR_TITLE, PR_BODY, and ORGANIZATION) 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 the repos.json file.
  3. 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)

Configuration

Below are the allowed configuration options: