Coder Social home page Coder Social logo

isabella232 / repo_housekeeper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mikaelsmith/repo_housekeeper

0.0 0.0 0.0 74 KB

Tools for helping to keep the Puppetlabs/* repositories namespaces cleaned up and welcoming.

License: Apache License 2.0

Ruby 45.46% HTML 54.54%

repo_housekeeper's Introduction

Repo Housekeeper

This repository contains some simple tools for helping to keep the puppetlabs/* repository namespace cleaned up and welcoming. For example, the first task is a weekly email reminder to our [email protected] mailing list with a sampling of some of our oldest open pull requests and some instructions on cleaning them up.

Using the tools

Note: Right now, there's only a few tasks; stale_pulls that calls out old stagnant pull requests, and codeowner_coverage that just looks for public repositories without CODEOWNERS files.

The tasks are self-configured in the repository as config.yaml. You'll also need the Community Team sendgrid token for sending mail. You can get that from the Community Team for testing, but when running as a GitHub action, it's accessible as the SENDGRID_PASSWORD secret.

Running during development

Before running any task, you'll need to export the SendGrid token as an environment variable. Note that many tasks will expect other environment variables set as well. For example, this is how you would run the stale_pulls task:

$ bundle install --path vendor/bundle
...
$ export SENDGRID_PASSWORD=<sendgrid token -- get this from the Community Team>
$ export EMAIL_ADDRESS='[email protected]'
$ bundle exec rake stale_pulls

Tasks

stale_pulls

This task is very simple. It gets a list of the 100 oldest open pull requests in the entire @puppetlabs namespace. Then it takes a random sampling of 15 of those and emails a report. The sampling ensures that it's not just reporting about the same PRs every week.

It's configured via environment variables in the workflow.

  • GITHUB_TOKEN: comes automatically with the workflow and allows higher API rate limits
  • SENDGRID_PASSWORD: configured as a GitHub secret
  • EMAIL_ADDRESS: the email address to send the report to.

The email content is configured by html and text format templates.

codeowner_coverage

This task just iterates all public repositories and builds a list of those without CODEOWNERS. Right after we did the push to get all the repos covered, that list should be empty. But over time as people create new repos, this task will help keep that coverage. This task requires the escalated privileges of the GITHUB_TOKEN_EXTENDED token.

It's currently configured via environment variables in the poorly named workflow file.

  • GITHUB_TOKEN_EXTENDED: a personal access token created on @binford2k's account that allows org-team access.
  • SENDGRID_PASSWORD: configured as a GitHub secret
  • EMAIL_ADDRESS: the email address to send the report to.

The email content is configured by html and text format templates.

repo_housekeeper's People

Contributors

binford2k avatar mikaelsmith avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.