@@ -335,7 +335,7 @@ async function createGithubIssue(
335335 }
336336
337337 if ( ! isValidZipUrl ( formData . feedLink ) ) {
338- if ( ! await isValidZipDownload ( formData . feedLink ) ) {
338+ if ( ! await isValidZipDownload ( formData . feedLink ) ) {
339339 labels . push ( "invalid" ) ;
340340 }
341341 }
@@ -467,8 +467,8 @@ export function buildGithubIssueBody(
467467
468468/**
469469 * Parses the provided URL to check if it is a valid ZIP file URL
470- * @param url The direct download URL provided in the feed form
471- * @returns {boolean } Whether the URL is a valid ZIP file URL
470+ * @param { string | undefined | null } url The direct download URL provided in the feed form
471+ * @return {boolean } Whether the URL is a valid ZIP file URL
472472 */
473473function isValidZipUrl ( url : string | undefined | null ) : boolean {
474474 if ( ! url ) return false ;
@@ -481,11 +481,13 @@ function isValidZipUrl(url: string | undefined | null): boolean {
481481}
482482
483483/**
484- * Checks if the provided URL points to a valid ZIP file by making a HEAD request
485- * @param url The direct download URL provided in the feed form
486- * @returns {boolean } Whether the URL downloads a valid ZIP file
484+ * Checks if URL points to a valid ZIP file by making HEAD request
485+ * @param { string | undefined | null } url The download URL
486+ * @return {boolean } Whether the URL downloads a valid ZIP file
487487 */
488- async function isValidZipDownload ( url : string | undefined | null ) : Promise < boolean > {
488+ async function isValidZipDownload (
489+ url : string | undefined | null
490+ ) : Promise < boolean > {
489491 try {
490492 if ( ! url ) return false ;
491493 const response = await axios . head ( url , { maxRedirects : 2 } ) ;
@@ -518,10 +520,10 @@ async function addIssueToProjectV2(
518520 try {
519521 const addToProjectMutation = `
520522 mutation($projectId: ID!, $contentId: ID!) {
521- addProjectV2ItemById(input: {projectId: $projectId, contentId: $contentId}) {
522- item {
523- id
524- }
523+ addProjectV2ItemById(
524+ input: {projectId: $projectId, contentId: $contentId}
525+ ) {
526+ item { id }
525527 }
526528 }
527529 ` ;
@@ -546,13 +548,21 @@ async function addIssueToProjectV2(
546548 const itemId = addToProjectResponse . data . data . addProjectV2ItemById . item . id ;
547549
548550 const updateStatusMutation = `
549- mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $value: ProjectV2FieldValue!) {
551+ mutation(
552+ $projectId: ID!
553+ $itemId: ID!
554+ $fieldId: ID!
555+ $value: ProjectV2FieldValue!
556+ ) {
550557 updateProjectV2ItemFieldValue(
551- input: {projectId: $projectId, itemId: $itemId, fieldId: $fieldId, value: $value}
552- ) {
553- projectV2Item {
554- id
558+ input: {
559+ projectId: $projectId
560+ itemId: $itemId
561+ fieldId: $fieldId
562+ value: $value
555563 }
564+ ) {
565+ projectV2Item { id }
556566 }
557567 }
558568 ` ;
@@ -582,4 +592,4 @@ async function addIssueToProjectV2(
582592 } catch ( error ) {
583593 logger . error ( "Error adding issue to Feed Submissions Backlog:" , error ) ;
584594 }
585- }
595+ }
0 commit comments