Skip to content

Commit 262ab77

Browse files
committed
update message for commit
1 parent 00a419f commit 262ab77

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.github/workflows/syndicate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ jobs:
4040
PRIVATE_DEVTO: ${{ secrets.PRIVATE_DEVTO }}
4141
- uses: stefanzweifel/git-auto-commit-action@v4
4242
with:
43-
commit_message: Shrink images
43+
commit_message: devto updated

apps/codingcatdev/scripts/dev-to.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,14 @@ for await (const file of g) {
5656

5757
// Get new devto url and update
5858
if (response.status === 201) {
59-
const { url } = response.json();
60-
if (url) {
59+
const json = await response.json();
60+
console.log('data from devto', json);
61+
if (json?.url) {
62+
console.log('Updating', file, { devto: json.url });
6163
const newMdFile = matter.stringify(content, {
6264
...data,
63-
devto: url
65+
devto: json.url
6466
});
65-
console.log('Updating', file, { devto: url });
6667
fs.writeFileSync(file, newMdFile, { encoding: 'utf8', flag: 'r' });
6768
}
6869
}

0 commit comments

Comments
 (0)