1
0
mirror of synced 2026-01-06 06:02:35 -05:00

use shorthand to calm codeql warnings (#27882)

* use shorthand to calm codeql warnings

* there was more
This commit is contained in:
Peter Bengtsson
2022-05-21 14:50:56 -04:00
committed by GitHub
parent f46c1df49a
commit e2ec55c7d8
4 changed files with 28 additions and 28 deletions

View File

@@ -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),
})

View File

@@ -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',

View File

@@ -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,

View File

@@ -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',