From b94894651faed105192c7d164f0f6fb6cb70b101 Mon Sep 17 00:00:00 2001 From: t-will-gillis <40799239+t-will-gillis@users.noreply.github.com> Date: Thu, 28 Nov 2024 09:04:08 -0800 Subject: [PATCH] hard-code status-field-ids only --- github-actions/utils/_data/status-field-ids.js | 4 ++-- github-actions/utils/mutate-issue-status.js | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/github-actions/utils/_data/status-field-ids.js b/github-actions/utils/_data/status-field-ids.js index 48d78b7521..5e1651bfce 100644 --- a/github-actions/utils/_data/status-field-ids.js +++ b/github-actions/utils/_data/status-field-ids.js @@ -12,8 +12,8 @@ function statusFieldIds(statusField) { const statusValues = new Map([ // Default values for HfLA Website Project 86 - ["WEBSITE_PROJECT_ID", "PVT_kwDOALGKNs4Ajuck"], - ["STATUS_FIELD_ID", "PVTSSF_lADOALGKNs4AjuckzgcCutQ"], + ["PROJECT_ID", "PVT_kwDOALGKNs4Ajuck"], + ["FIELD_ID", "PVTSSF_lADOALGKNs4AjuckzgcCutQ"], // Individual Status field values ["Agendas", "864392c1"], diff --git a/github-actions/utils/mutate-issue-status.js b/github-actions/utils/mutate-issue-status.js index 6f1961c045..fea00e687e 100644 --- a/github-actions/utils/mutate-issue-status.js +++ b/github-actions/utils/mutate-issue-status.js @@ -1,5 +1,5 @@ // Import modules -const statusFieldIds = require('../../utils/_data/status-field-ids'); +const statusFieldIds = require('./_data/status-field-ids'); /** * Changes the 'Status' of an issue (with the corresponding itemId) to a newStatusValue @@ -14,8 +14,8 @@ async function mutateIssueStatus( newStatusValue ) { // Defaults for HfLA Website Project 86 - const WEBSITE_PROJECT_ID = statusFieldIds("WEBSITE_PROJECT_ID"); - const STATUS_FIELD_ID = statusFieldIds("STATUS_FIELD_ID"); + const PROJECT_ID = statusFieldIds("PROJECT_ID"); + const FIELD_ID = statusFieldIds("FIELD_ID"); const mutation = `mutation($projectId: ID!, $fieldId: ID!, $itemId: ID!, $value: String!) { updateProjectV2ItemFieldValue(input: { @@ -33,8 +33,8 @@ async function mutateIssueStatus( }`; const variables = { - projectId: WEBSITE_PROJECT_ID, - fieldId: STATUS_FIELD_ID, + projectId: PROJECT_ID, + fieldId: FIELD_ID, itemId: itemId, value: newStatusValue, };