Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update default config application #110

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dist/config.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/config.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

146 changes: 145 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"@octokit/types": "13.6.1",
"@probot/octokit-plugin-config": "3.0.2",
"bugzilla": "3.1.2",
"deepmerge": "^4.3.1",
"dotenv": "16.4.5",
"jira.js": "4.0.2",
"node-fetch": "3.3.2",
Expand Down
4 changes: 3 additions & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { debug, getInput } from '@actions/core';
import { context } from '@actions/github';
import deepmerge from 'deepmerge';

import { CustomOctokit } from './octokit';
import { configSchema, ConfigLabels, ConfigProducts } from './schema/config';
Expand Down Expand Up @@ -31,7 +32,8 @@
await octokit.config.get({
...context.repo,
path,
defaults: Config.defaults,
defaults: configs =>
deepmerge.all([this.defaults, ...configs]) as Partial<Config>,

Check warning on line 36 in src/config.ts

View check run for this annotation

Codecov / codecov/patch

src/config.ts#L35-L36

Added lines #L35 - L36 were not covered by tests
})
).config;

Expand Down
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1240,6 +1240,13 @@ __metadata:
languageName: node
linkType: hard

"deepmerge@npm:^4.3.1":
version: 4.3.1
resolution: "deepmerge@npm:4.3.1"
checksum: 10c0/e53481aaf1aa2c4082b5342be6b6d8ad9dfe387bc92ce197a66dea08bd4265904a087e75e464f14d1347cf2ac8afe1e4c16b266e0561cc5df29382d3c5f80044
languageName: node
linkType: hard

"delayed-stream@npm:~1.0.0":
version: 1.0.0
resolution: "delayed-stream@npm:1.0.0"
Expand Down Expand Up @@ -2453,6 +2460,7 @@ __metadata:
"@vercel/ncc": "npm:0.38.2"
"@vitest/coverage-v8": "npm:2.1.3"
bugzilla: "npm:3.1.2"
deepmerge: "npm:^4.3.1"
dotenv: "npm:16.4.5"
jira.js: "npm:4.0.2"
node-fetch: "npm:3.3.2"
Expand Down