File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
apps/codingcatdev/scripts Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,10 @@ ${content}`;
112
112
// Get new devto url and update
113
113
if ( response . status === 200 ) {
114
114
const json = await response . json ( ) ;
115
+ if ( json ?. errors ?. length ) {
116
+ console . error ( JSON . stringify ( json . errors ) ) ;
117
+ continue ;
118
+ }
115
119
console . log ( 'hashnode url' , json ?. data ?. createPublicationStory ?. post ?. slug ) ;
116
120
const hashnodeSlug = json ?. data ?. createPublicationStory ?. post ?. slug ;
117
121
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ for await (const file of g) {
56
56
// TODO: We might need to add a check on cononical if this page is already in dev.to
57
57
if (
58
58
fm ?. slug &&
59
+ fm . slug === 'angular-17-cypress-testing' &&
59
60
fm ?. title &&
60
61
fm ?. cover &&
61
62
fm ?. published === 'published' &&
@@ -107,6 +108,11 @@ ${content}`;
107
108
// Get new devto url and update
108
109
if ( response . status === 200 ) {
109
110
const json = await response . json ( ) ;
111
+ if ( json ?. errors ?. length ) {
112
+ console . error ( JSON . stringify ( json . errors ) ) ;
113
+ continue ;
114
+ }
115
+
110
116
console . log ( 'hashnode url' , json ?. data ?. createPublicationStory ?. post ?. slug ) ;
111
117
const hashnodeSlug = json ?. data ?. createPublicationStory ?. post ?. slug ;
112
118
You can’t perform that action at this time.
0 commit comments