Skip to content

Commit

Permalink
hard-code status-field-ids only
Browse files Browse the repository at this point in the history
  • Loading branch information
t-will-gillis committed Nov 28, 2024
1 parent c133ebb commit b948946
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions github-actions/utils/_data/status-field-ids.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
10 changes: 5 additions & 5 deletions github-actions/utils/mutate-issue-status.js
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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: {
Expand All @@ -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,
};
Expand Down

0 comments on commit b948946

Please sign in to comment.