瀏覽代碼

Update the script to put the issues onto the board

Ben Dwyer 4 年之前
父節點
當前提交
9300aaa971
共有 3 個文件被更改,包括 14 次插入42 次删除
  1. 14 9
      create-a-theme-checklist.js
  2. 0 15
      quadrat/assets/theme.css
  3. 0 18
      quadrat/sass/blocks/_query-pagination.scss

+ 14 - 9
create-a-theme-checklist.js

@@ -38,20 +38,23 @@ async function createMilestone() {
 async function createIssues( milestoneNumber ) {
 async function createIssues( milestoneNumber ) {
 	const issues = [
 	const issues = [
 		'Create base theme from boilerplate',
 		'Create base theme from boilerplate',
-		/*'Create a demo site on dotcom',
+		'Create a demo site on dotcom',
 		'theme.json: Typography settings',
 		'theme.json: Typography settings',
 		'theme.json: Color palette',
 		'theme.json: Color palette',
 		'theme.json: Alternative color palettes',
 		'theme.json: Alternative color palettes',
 		'theme.json: Margin/spacing settings',
 		'theme.json: Margin/spacing settings',
-		'Templates:Page templates (one task per template, search, 404 etc.)',
-		'Templates:Header template part (including mobile)',
-		'Templates:Footer template part (including mobile)',
+		'Templates: Page templates: index',
+		'Templates: Page templates: search',
+		'Templates: Page templates: 404',
+		'Templates: Page templates: archive',
+		'Templates: Header template part (including mobile)',
+		'Templates: Footer template part (including mobile)',
 		'Block patterns (if needed)',
 		'Block patterns (if needed)',
 		'Block styles (if needed)',
 		'Block styles (if needed)',
 		'Comment form styles (dotcom and dotorg) (if needed)',
 		'Comment form styles (dotcom and dotorg) (if needed)',
 		'Navigation (if needed)',
 		'Navigation (if needed)',
 		'Core block settings (if needed)',
 		'Core block settings (if needed)',
-		'Third party block settings (Jetpack, Woo, etc.) (if needed)',*/
+		'Third party block settings (Jetpack, Woo, etc.) (if needed)',
 	];
 	];
 	issues.forEach( async ( issue ) => {
 	issues.forEach( async ( issue ) => {
 		try {
 		try {
@@ -62,8 +65,7 @@ async function createIssues( milestoneNumber ) {
 					milestone: milestoneNumber,
 					milestone: milestoneNumber,
 				} )
 				} )
 				.then( ( issueData ) => {
 				.then( ( issueData ) => {
-					const issueUrl = issueData.data.html_url;
-					addIssueToProject( issueUrl );
+					addIssueToProject( issueData );
 				} );
 				} );
 		} catch ( error ) {
 		} catch ( error ) {
 			console.log( error );
 			console.log( error );
@@ -71,10 +73,13 @@ async function createIssues( milestoneNumber ) {
 	} );
 	} );
 }
 }
 
 
-async function addIssueToProject( issueUrl ) {
+async function addIssueToProject( issueData ) {
 	try {
 	try {
 		return await octokit.request( 'POST /projects/columns/11021541/cards', {
 		return await octokit.request( 'POST /projects/columns/11021541/cards', {
-			note: issueUrl,
+			note: null,
+			content_id: issueData.data.id,
+			content_url: issueData.data.url,
+			content_type: 'Issue',
 			mediaType: {
 			mediaType: {
 				previews: [ 'inertia' ],
 				previews: [ 'inertia' ],
 			},
 			},

+ 0 - 15
quadrat/assets/theme.css

@@ -509,21 +509,6 @@ ul ul {
 	border-top: 1px solid var(--wp--custom--color--primary);
 	border-top: 1px solid var(--wp--custom--color--primary);
 }
 }
 
 
-.wp-block-query-pagination .wp-block-query-pagination-previous::before {
-	content: "←";
-	margin-right: 0.5em;
-}
-
-.wp-block-query-pagination .wp-block-query-pagination-next::after {
-	content: "→";
-	margin-left: 0.5em;
-}
-
-.wp-block-query-pagination .wp-block-query-pagination-previous::before,
-.wp-block-query-pagination .wp-block-query-pagination-next::after {
-	display: inline-block;
-}
-
 .wp-block-query-pagination .page-numbers {
 .wp-block-query-pagination .page-numbers {
 	padding: 0 0.1em;
 	padding: 0 0.1em;
 }
 }

+ 0 - 18
quadrat/sass/blocks/_query-pagination.scss

@@ -1,24 +1,6 @@
 .wp-block-query-pagination {
 .wp-block-query-pagination {
 	border-top: 1px solid var(--wp--custom--color--primary);
 	border-top: 1px solid var(--wp--custom--color--primary);
 
 
-	.wp-block-query-pagination-previous {
-		&::before{
-			content:"←";
-			margin-right: 0.5em;
-		}
-	}
-	.wp-block-query-pagination-next {
-		&::after{
-			content:"→";
-			margin-left: 0.5em;
-		}
-	}
-
-	.wp-block-query-pagination-previous::before,
-	.wp-block-query-pagination-next::after {
-		display: inline-block;
-	}
-
 	.page-numbers {
 	.page-numbers {
 		padding: 0 0.1em;
 		padding: 0 0.1em;
 	}
 	}