Skip to content

Commit

Permalink
PIMS-693 Update .github workflow and scripts for app-npm-dep-check (#…
Browse files Browse the repository at this point in the history
…2045)

Co-authored-by: Dylan Barkowsky <[email protected]>
  • Loading branch information
TaylorFries and dbarkowsky authored Jan 30, 2024
1 parent 21c0465 commit 4016dee
Show file tree
Hide file tree
Showing 13 changed files with 845 additions and 671 deletions.
23 changes: 23 additions & 0 deletions .github/config/dep-report.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// CONFIG FILE for specifying options in the NPM Dependency Report workflow.
{
// Check package.json files for dependency updates.
packageJsonPaths: ["frontend", "react-app", "express-api"],

// Do not report on the following packages.
ignorePackages: {
// Path to package.json file.
"src/frontend": [], // Add names of packages such as ["typescript"].
"src/backend": [],
},

// The env variables below are used to update the create_tickets.py script

// used to determine what updates to post
LEVEL_FLAGS: "MINOR MAJOR",
// sets what JIRA board to post and pull from
JIRA_BOARD: "PIMS",
// each Jira board has a different issue type for subtasks
JIRA_SUBTASK: "10003",
// epic links are technically a custom field with this specific id and ticket number (for PIMS)
JIRA_EPIC: "10014, PIMS-450"
}
240 changes: 0 additions & 240 deletions .github/helpers/check-npm-dependencies.js

This file was deleted.

22 changes: 22 additions & 0 deletions .github/helpers/create-npm-dep-report-issues.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const path = require("path");
const createAndCloseExistingIssue = require("./github-api/create-and-close-existing-issue");
const outputText = require(path.resolve(__dirname, `../../outputText.json`));

/**
* THIS FILE DOES NOT REQUIRE ANY EDITING.
* Place within .github/helpers/
*/

// Get package.json paths from env.
const packageJsonPaths = JSON.parse(process.env.packageJsonPaths);

(async () => {
// Create an array of promises for each packageJsonPath.
const promises = packageJsonPaths.map(async (packagePath) => {
// Await the completion of create and close existing issue.
await createAndCloseExistingIssue(packagePath, outputText[packagePath]);
});

// Wait for all issues to be created.
await Promise.all(promises);
})();
Loading

0 comments on commit 4016dee

Please sign in to comment.