From 6f3efc9d290ae29de42f6cfb3bc3d61dcea509be Mon Sep 17 00:00:00 2001 From: lelia Date: Wed, 10 Aug 2022 13:42:05 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20Add=20Renovate=20(#31)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 --- .github/dependabot.yml | 12 ------------ .github/workflows/lint.yml | 24 +++++++++++++++--------- .github/workflows/stale.yml | 6 +++--- .markdownlint.json | 3 +++ CHANGELOG.md | 35 ++++++++++++++++++++++++++++++++++- README.md | 23 ++++++++++++----------- renovate.json | 26 ++++++++++++++++++++++++++ 7 files changed, 93 insertions(+), 36 deletions(-) delete mode 100644 .github/dependabot.yml create mode 100644 renovate.json diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 6589ea8..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,12 +0,0 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 -updates: - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "daily" - diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 7ca3350..565c35a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -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/github-action-renovate-config-validator@v0.1.2 + with: + config_file_path: 'renovate.json' diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index a3652d9..c8e71e5 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,4 +1,4 @@ -name: Identify and close stale issues and pull requests +name: stale on: schedule: @@ -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 diff --git a/.markdownlint.json b/.markdownlint.json index cf11012..2a820e7 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -9,5 +9,8 @@ "MD024": { "siblings_only": true }, + "MD025": { + "front_matter_title": "" + }, "MD041": false } diff --git a/CHANGELOG.md b/CHANGELOG.md index 15c1783..71e6f1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 @@ -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 diff --git a/README.md b/README.md index dcd6ecb..5f7ca94 100644 --- a/README.md +++ b/README.md @@ -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 `` 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 `` 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 `` placeholder with the name of your project +- [ ] Replace the `` 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 diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..ac1e491 --- /dev/null +++ b/renovate.json @@ -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" + } + ] +}