-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.js
More file actions
17 lines (14 loc) · 754 Bytes
/
index.js
File metadata and controls
17 lines (14 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const { analyzeCommits: ac } = require("./src/commit-analyzer");
const { generateNotes: gn } = require("./src/release-notes-generator");
const { validateStrategy } = require("./src/utils");
const analyzeCommits = async (pluginConfig, context) => {
const { commitAnalyzerConfig, strategy: strtg } = pluginConfig || {};
const strategy = validateStrategy(strtg);
return ac(strategy, { ...pluginConfig, ...commitAnalyzerConfig }, context);
};
const generateNotes = async (pluginConfig, context) => {
const { notesGeneratorConfig, strategy: strtg } = pluginConfig || {};
const strategy = validateStrategy(strtg);
return gn(strategy, { ...pluginConfig, ...notesGeneratorConfig }, context);
};
module.exports = { generateNotes, analyzeCommits };