Cobel’s Automated Publishing Test



This content originally appeared on DEV Community and was authored by ladyofcode

Cobel’s Automated Publishing Test

This is a test post created to verify that the automated cross-posting system is working correctly after implementing the improved git-based deletion detection.

What This Tests

  • New post creation on both DevTo and Hashnode
  • Frontmatter parsing and metadata extraction
  • Platform-specific ID storage (dev_to_id and hashnode_id)
  • Git-based deletion detection using git show --name-status HEAD
  • Unpublishing workflow when the post is deleted

Recent Improvements

  1. Fixed deletion detection – Now uses git show --name-status HEAD instead of complex diff comparisons
  2. Simplified workflow – No more commit comparison, just looks at the latest commit
  3. Better error handling – More robust git history lookup for unpublishing
  4. Cleaner logic – Streamlined approach that’s easier to debug

Expected Workflow

Publishing:

  1. ✅ GitHub Actions detects new post
  2. ✅ DevTo publisher creates new article
  3. ✅ Hashnode publisher creates new post
  4. ✅ Frontmatter updated with platform IDs

Unpublishing (when deleted):

  1. ✅ GitHub Actions detects deleted post via git show --name-status HEAD
  2. ✅ Scripts find post in git history using improved logic
  3. ✅ Scripts extract platform IDs from frontmatter
  4. ✅ Scripts call unpublish APIs for both platforms

Test Content

Here’s some test content to verify everything works:

// Test code block
function testCobelPost() {
  console.log("Cobel's test post is working!");
  return {
    published: true,
    platforms: ['devto', 'hashnode'],
    deletionDetection: 'git show --name-status HEAD',
    status: 'success'
  };
}

Conclusion

If you’re reading this on DevTo or Hashnode, then Cobel’s automated publishing workflow is functioning perfectly! 🎉

The next step will be to delete this post and verify that the unpublishing works correctly with the new git-based detection.

This is an automated test post created to verify the publishing system functionality.


This content originally appeared on DEV Community and was authored by ladyofcode