forked from hackforla/website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Post PBB Migration 7079 - Refactor GHA for Moving Closed Issues (hack…
…forla#7493) * implement steps to move closed issues in PBB * add semicolons * prep for testing * error-handling checks * refactor step 2 * refactor steps 2-4 into step 2 and incorporate into move-closed-issues.js * add github graphql token * rename projectItems to projectData, change variable definition * clean code * revert to hackforla defaults * add JSDoc * remove duplicated variable
- Loading branch information
Showing
5 changed files
with
74 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Module imports | ||
const statusFieldIds = require('../utils/_data/status-field-ids'); | ||
const queryIssueInfo = require('../utils/query-issue-info'); | ||
const mutateIssueStatus = require('../utils/mutate-issue-status'); | ||
|
||
/** | ||
* @description - Changes the closed 'status' of the issue based on `sort-closed-issues.js` | ||
* @param {Object} github - GitHub object from actions/github-script | ||
* @param {Object} context - Context object from actions/github-script | ||
* @param {String} results - Status to which issue will be sorted from previous step | ||
*/ | ||
async function main({ github, context }, results) { | ||
const issueNum = context.payload.issue.number; | ||
let statusValue = statusFieldIds(results); | ||
const itemInfo = await queryIssueInfo(github, context, issueNum); | ||
await mutateIssueStatus(github, context, itemInfo.id, statusValue); | ||
} | ||
|
||
module.exports = main; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters