Fetching the name, version and URL from the package.json file
This commit is contained in:
Generated
+162
-4120
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -19,7 +19,7 @@
|
|||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/advanced-security/maven-dependency-submission-action/issues"
|
"url": "https://github.com/advanced-security/maven-dependency-submission-action/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/advanced-security/maven-dependency-submission-action#readme",
|
"homepage": "https://github.com/advanced-security/maven-dependency-submission-action",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.1",
|
"@actions/core": "^1.10.1",
|
||||||
"@github/dependency-submission-toolkit": "^1.2.10",
|
"@github/dependency-submission-toolkit": "^1.2.10",
|
||||||
|
|||||||
@@ -6,8 +6,7 @@ import { Depgraph, MavenDependencyGraph, parseDependencyJson } from './depgraph'
|
|||||||
import { MavenRunner } from './maven-runner';
|
import { MavenRunner } from './maven-runner';
|
||||||
import { loadFileContents } from './utils/file-utils';
|
import { loadFileContents } from './utils/file-utils';
|
||||||
|
|
||||||
const version = require('../package.json')['version'];
|
const packageData = require('../package.json');
|
||||||
|
|
||||||
const DEPGRAPH_MAVEN_PLUGIN_VERSION = '4.0.2';
|
const DEPGRAPH_MAVEN_PLUGIN_VERSION = '4.0.2';
|
||||||
|
|
||||||
export type MavenConfiguration = {
|
export type MavenConfiguration = {
|
||||||
@@ -67,9 +66,9 @@ export async function generateSnapshot(directory: string, mvnConfig?: MavenConfi
|
|||||||
|
|
||||||
function getDetector() {
|
function getDetector() {
|
||||||
return {
|
return {
|
||||||
name: 'maven-dependency-submission-action',
|
name: packageData.name,
|
||||||
url: 'https://github.com/advanced-security/maven-dependency-submission-action',
|
url: packageData.homepage,
|
||||||
version: version
|
version: packageData.version
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user