Skip to content

Commit

Permalink
feat(actions): add dependabot-auto-merge.yml workflow (#1541)
Browse files Browse the repository at this point in the history
  • Loading branch information
ybiquitous authored May 20, 2023
1 parent 5e5d02d commit 3d1c77a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ export async function init({ cwd = process.cwd(), logger = defaultLogger } = {})
await cmd.updatePackageFile();
await cmd.writePackageFile(".editorconfig");
await cmd.writePackageFile(".remarkignore");
await cmd.writePackageFile(".github", "workflows", "dependabot-auto-merge.yml");
await cmd.writePackageFile(".github", "workflows", "npm-audit-fix.yml");
await cmd.writePackageFile(".github", "workflows", "npm-diff.yml");
await cmd.writePackageFile(".github", "workflows", "release.yml");
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"types",
".editorconfig",
".remarkignore",
".github/workflows/dependabot-auto-merge.yml",
".github/workflows/npm-audit-fix.yml",
".github/workflows/npm-diff.yml",
".github/workflows/release.yml",
Expand Down
13 changes: 13 additions & 0 deletions test/__snapshots__/init.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,19 @@ trim_trailing_whitespace = false
"
`;

exports[`write ".github/workflows/dependabot-auto-merge.yml" 1`] = `
"name: Dependabot auto-merge
on:
pull_request:
types: [opened, synchronize]
jobs:
auto-merge:
uses: ybiquitous/.github/.github/workflows/dependabot-auto-merge-reusable.yml@main
"
`;

exports[`write ".github/workflows/npm-audit-fix.yml" 1`] = `
"name: npm audit fix
Expand Down
2 changes: 2 additions & 0 deletions test/init.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ test('update "package.json" without fields', () =>
[
".editorconfig",
".remarkignore",
".github/workflows/dependabot-auto-merge.yml",
".github/workflows/npm-audit-fix.yml",
".github/workflows/npm-diff.yml",
".github/workflows/release.yml",
Expand Down Expand Up @@ -89,6 +90,7 @@ test("End-to-End via CLI", () =>
"=> 'package.json' was updated
=> '.editorconfig' was updated
=> '.remarkignore' was updated
=> '.github/workflows/dependabot-auto-merge.yml' was updated
=> '.github/workflows/npm-audit-fix.yml' was updated
=> '.github/workflows/npm-diff.yml' was updated
=> '.github/workflows/release.yml' was updated
Expand Down

0 comments on commit 3d1c77a

Please sign in to comment.