Skip to content

Commit

Permalink
🧹 Add Renovate (#31)
Browse files Browse the repository at this point in the history
* Update lint rules

* Remove dependabot config

* Update stale PR workflow

* Add linting for renovate config

* Update CHANGELOG and fix #30

* Add base project config for renovate

* Add renovate customization instructions to README
  • Loading branch information
lelia authored Aug 10, 2022
1 parent 97a6d1b commit 6f3efc9
Show file tree
Hide file tree
Showing 7 changed files with 93 additions and 36 deletions.
12 changes: 0 additions & 12 deletions .github/dependabot.yml

This file was deleted.

24 changes: 15 additions & 9 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,20 @@ on: # Rebuild any PRs and main branch changes
pull_request:

jobs:
lint:
markdown:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Lint Markdown files
uses: avto-dev/markdown-lint@v1
with:
config: '.markdownlint.json'
args: '**/*.md .github/**/*.md'
- uses: actions/checkout@v3
- name: ⬇️ lint markdown files # Lints all markdown (.md) files
uses: avto-dev/markdown-lint@v1
with:
config: '.markdownlint.json'
args: '**/*.md .github/**/*.md'
renovate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 🧼 lint renovate config # Validates changes to renovate.json config file
uses: suzuki-shunsuke/[email protected]
with:
config_file_path: 'renovate.json'
6 changes: 3 additions & 3 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Identify and close stale issues and pull requests
name: stale

on:
schedule:
Expand All @@ -10,9 +10,9 @@ jobs:
permissions:
issues: write
pull-requests: write

steps:
- uses: actions/stale@v5
- name: 📆 mark stale PRs # Automatically marks inactive PRs as stale
uses: actions/stale@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 60
Expand Down
3 changes: 3 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@
"MD024": {
"siblings_only": true
},
"MD025": {
"front_matter_title": ""
},
"MD041": false
}
35 changes: 34 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,34 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- Recommended configuration for [renovate](https://github.com/renovatebot/renovate)
- Linting workflow for `renovate.json` config

### Changed

- Pinned v4 of [github-pages-deploy-action](https://github.com/marketplace/actions/deploy-to-github-pages)
- Removed [dependabot](https://github.com/dependabot) configuration

## [0.3.7] - 2022-04-04

### Changed

- Update lint workflow trigger behavior

## [0.3.6] - 2022-03-22

- Bumps actions/checkout from 2 to 3
### Added

- Adds new template badges to README

### Changed

- Bumps [actions/checkout](https://github.com/marketplace/actions/checkout) from v2 to v3

## [0.3.5] - 2021-10-21

### Added
Expand Down Expand Up @@ -88,3 +107,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Maintainers file
- README template
- Security guidance

[unreleased]: https://github.com/wayfair-incubator/oss-template/compare/v0.3.7...HEAD
[0.3.7]: https://github.com/wayfair-incubator/oss-template/compare/v0.3.6...v0.3.7
[0.3.6]: https://github.com/wayfair-incubator/oss-template/compare/v0.3.5...v0.3.6
[0.3.5]: https://github.com/wayfair-incubator/oss-template/compare/v0.3.4...v0.3.5
[0.3.4]: https://github.com/wayfair-incubator/oss-template/compare/v0.3.3...v0.3.4
[0.3.3]: https://github.com/wayfair-incubator/oss-template/compare/v0.3.2...v0.3.3
[0.3.2]: https://github.com/wayfair-incubator/oss-template/compare/v0.3.1...v0.3.2
[0.3.1]: https://github.com/wayfair-incubator/oss-template/compare/v0.3.0...v0.3.1
[0.3.0]: https://github.com/wayfair-incubator/oss-template/compare/v0.2.1...v0.3.0
[0.2.1]: https://github.com/wayfair-incubator/oss-template/compare/v0.2.0...v0.2.1
[0.2.0]: https://github.com/wayfair-incubator/oss-template/compare/v0.1.1...v0.2.0
[0.1.1]: https://github.com/wayfair-incubator/oss-template/compare/v0.1.0...v0.1.1
[0.1.0]: https://github.com/wayfair-incubator/oss-template/releases/tag/v0.1.0
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,29 @@

As much as possible, we have tried to provide enough tooling to get you up and running quickly and with a minimum of effort. This includes sane defaults for documentation; templates for bug reports, feature requests, and pull requests; and [GitHub Actions](https://github.com/features/actions) that will automatically manage stale issues and pull requests. This latter defaults to labeling issues and pull requests as stale after 60 days of inactivity, and closing them after 7 additional days of inactivity. These [defaults](.github/workflows/stale.yml) and more can be configured. For configuration options, please consult the documentation for the [stale action](https://github.com/actions/stale).

In trying to keep this template as generic and reusable as possible, there are some things that were omitted out of necessity and others that need a little tweaking. Before you begin developing in earnest, there are a few changes that need to be made.
In trying to keep this template as generic and reusable as possible, there are some things that were omitted out of necessity and others that need a little tweaking. Before you begin developing in earnest, there are a few changes that need to be made:

- [ ] Select an appropriate license for your project. This can easily be achieved through the 'Add File' button on the GitHub UI, naming the file `LICENSE`, and selecting your desired license from the provided list.
- [ ] Update the `<License name>` placeholder in this file to reflect the name of the license you selected above
- [ ] Replace `[INSERT CONTACT METHOD]` in [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md) with a suitable communication channel
- [ ] Change references to `org_name` to the name of the org your repo belongs to (eg. `wayfair-incubator`)
- [ ] Update the `<License name>` placeholder in this file to reflect the name of the license you selected above.
- [ ] Replace `[INSERT CONTACT METHOD]` in [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md) with a suitable communication channel.
- [ ] Change references to `org_name` to the name of the org your repo belongs to (eg. `wayfair-incubator`):
- [ ] In [`README.md`](README.md)
- [ ] In [`CONTRIBUTING.md`](CONTRIBUTING.md)
- [ ] Change references to `repo_name` to the name of your new repo
- [ ] Change references to `repo_name` to the name of your new repo:
- [ ] In [`README.md`](README.md)
- [ ] In [`CONTRIBUTING.md`](CONTRIBUTING.md)
- [ ] Update the link to the contribution guidelines to point to your project
- [ ] Update the link to the contribution guidelines to point to your project:
- [ ] In [`.github/ISSUE_TEMPLATE/BUG_REPORT.md`](.github/ISSUE_TEMPLATE/BUG_REPORT.md)
- [ ] In [`.github/PULL_REQUEST_TEMPLATE.md`](.github/PULL_REQUEST_TEMPLATE.md)
- [ ] Replace the `<project name>` placeholder with the name of your project
- [ ] Replace the `<project name>` placeholder with the name of your project:
- [ ] In [`CONTRIBUTING.md`](CONTRIBUTING.md)
- [ ] In [`SECURITY.md`](SECURITY.md)
- [ ] Add names and contact information for actual project maintainers to [`MAINTAINERS.md`](MAINTAINERS.md)
- [ ] Add names and contact information for actual project maintainers to [`MAINTAINERS.md`](MAINTAINERS.md).
- [ ] Delete the content of [`CHANGELOG.md`](CHANGELOG.md). We encourage you to [keep a changelog](https://keepachangelog.com/en/1.0.0/).
- [ ] Replace the generic content in this file with the relevant details about your project
- [ ] Acknowledge that some features like [branch protection rules](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule) are only available when the repo is `public`
- [ ] Delete this section of the README
- [ ] Configure [`renovate.json`](renovate.json) for your project's language and tooling needs. You can enable enable specific [package managers](https://docs.renovatebot.com/modules/manager/), create [custom schedules](https://docs.renovatebot.com/presets-schedule/), [group updates](https://docs.renovatebot.com/presets-group/) together by type, [auto-merge PRs](https://docs.renovatebot.com/configuration-options/#automerge), and [much more](https://docs.renovatebot.com/). Check [here](https://github.com/wayfair-incubator/forker/blob/main/renovate.json) for an example TypeScript project configuration.
- [ ] Replace the generic content in this file with the relevant details about your project.
- [ ] Acknowledge that some features like [branch protection rules](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule) are only available when the repo is `public`.
- [ ] Delete this section of the `README`.

## About The Project

Expand Down
26 changes: 26 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"description": "Renovate configuration recommended by the Wayfair OSPO",
"labels": [
"renovate/{{depName}}"
],
"extends": [
"config:base",
":rebaseStalePrs",
"schedule:earlyMondays"
],
"enabledManagers": [
"github-actions"
],
"packageRules": [
{
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
"groupName": "Minor Updates",
"automerge": true
},
{
"matchManagers": ["github-actions"],
"groupName": "GitHub Actions"
}
]
}

0 comments on commit 6f3efc9

Please sign in to comment.