use shorthand to calm codeql warnings (#27882)
* use shorthand to calm codeql warnings * there was more
This commit is contained in:
2
.github/actions-scripts/enable-automerge.js
vendored
2
.github/actions-scripts/enable-automerge.js
vendored
@@ -17,7 +17,7 @@ async function main() {
|
||||
const github = getOctokit(token)
|
||||
const pull = await github.rest.pulls.get({
|
||||
owner: org,
|
||||
repo: repo,
|
||||
repo,
|
||||
pull_number: parseInt(prNumber),
|
||||
})
|
||||
|
||||
|
||||
@@ -191,16 +191,16 @@ async function run() {
|
||||
|
||||
await graphql(updateProjectNextItemMutation, {
|
||||
project: projectID,
|
||||
statusID: statusID,
|
||||
statusID,
|
||||
statusValueID: readyForReviewID,
|
||||
datePostedID: datePostedID,
|
||||
reviewDueDateID: reviewDueDateID,
|
||||
contributorTypeID: contributorTypeID,
|
||||
contributorType: contributorType,
|
||||
sizeTypeID: sizeTypeID,
|
||||
datePostedID,
|
||||
reviewDueDateID,
|
||||
contributorTypeID,
|
||||
contributorType,
|
||||
sizeTypeID,
|
||||
sizeType: '', // Although we aren't populating size, we are passing the variable so that we can use the shared mutation function
|
||||
featureID: featureID,
|
||||
authorID: authorID,
|
||||
featureID,
|
||||
authorID,
|
||||
headers: {
|
||||
authorization: `token ${process.env.TOKEN}`,
|
||||
'GraphQL-Features': 'projects_next_graphql',
|
||||
|
||||
16
.github/actions-scripts/projects.js
vendored
16
.github/actions-scripts/projects.js
vendored
@@ -59,7 +59,7 @@ export async function addItemsToProject(items, project) {
|
||||
`
|
||||
|
||||
const newItems = await graphql(mutation, {
|
||||
project: project,
|
||||
project,
|
||||
headers: {
|
||||
authorization: `token ${process.env.TOKEN}`,
|
||||
'GraphQL-Features': 'projects_next_graphql',
|
||||
@@ -221,40 +221,40 @@ export function generateUpdateProjectNextItemFieldMutation({
|
||||
$authorID: ID!
|
||||
) {
|
||||
${generateMutationToUpdateField({
|
||||
item: item,
|
||||
item,
|
||||
fieldID: '$statusID',
|
||||
value: '$statusValueID',
|
||||
})}
|
||||
${generateMutationToUpdateField({
|
||||
item: item,
|
||||
item,
|
||||
fieldID: '$datePostedID',
|
||||
value: formatDateForProject(datePosted),
|
||||
literal: true,
|
||||
})}
|
||||
${generateMutationToUpdateField({
|
||||
item: item,
|
||||
item,
|
||||
fieldID: '$reviewDueDateID',
|
||||
value: formatDateForProject(dueDate),
|
||||
literal: true,
|
||||
})}
|
||||
${generateMutationToUpdateField({
|
||||
item: item,
|
||||
item,
|
||||
fieldID: '$contributorTypeID',
|
||||
value: '$contributorType',
|
||||
})}
|
||||
${generateMutationToUpdateField({
|
||||
item: item,
|
||||
item,
|
||||
fieldID: '$sizeTypeID',
|
||||
value: '$sizeType',
|
||||
})}
|
||||
${generateMutationToUpdateField({
|
||||
item: item,
|
||||
item,
|
||||
fieldID: '$featureID',
|
||||
value: feature,
|
||||
literal: true,
|
||||
})}
|
||||
${generateMutationToUpdateField({
|
||||
item: item,
|
||||
item,
|
||||
fieldID: '$authorID',
|
||||
value: author,
|
||||
literal: true,
|
||||
|
||||
22
.github/actions-scripts/ready-for-docs-review.js
vendored
22
.github/actions-scripts/ready-for-docs-review.js
vendored
@@ -171,8 +171,8 @@ async function run() {
|
||||
const updateProjectNextItemMutation = generateUpdateProjectNextItemFieldMutation({
|
||||
item: newItemID,
|
||||
author: firstTimeContributor ? 'first time contributor' : process.env.AUTHOR_LOGIN,
|
||||
turnaround: turnaround,
|
||||
feature: feature,
|
||||
turnaround,
|
||||
feature,
|
||||
})
|
||||
|
||||
// Determine which variable to use for the contributor type
|
||||
@@ -192,16 +192,16 @@ async function run() {
|
||||
|
||||
await graphql(updateProjectNextItemMutation, {
|
||||
project: projectID,
|
||||
statusID: statusID,
|
||||
statusID,
|
||||
statusValueID: readyForReviewID,
|
||||
datePostedID: datePostedID,
|
||||
reviewDueDateID: reviewDueDateID,
|
||||
contributorTypeID: contributorTypeID,
|
||||
contributorType: contributorType,
|
||||
sizeTypeID: sizeTypeID,
|
||||
sizeType: sizeType,
|
||||
featureID: featureID,
|
||||
authorID: authorID,
|
||||
datePostedID,
|
||||
reviewDueDateID,
|
||||
contributorTypeID,
|
||||
contributorType,
|
||||
sizeTypeID,
|
||||
sizeType,
|
||||
featureID,
|
||||
authorID,
|
||||
headers: {
|
||||
authorization: `token ${process.env.TOKEN}`,
|
||||
'GraphQL-Features': 'projects_next_graphql',
|
||||
|
||||
Reference in New Issue
Block a user