Skip to content

feat: enable authoring posts via GitHub Issues#5

Merged
atenni merged 6 commits into
mainfrom
issue-authoring-poc
Apr 18, 2025
Merged

feat: enable authoring posts via GitHub Issues#5
atenni merged 6 commits into
mainfrom
issue-authoring-poc

Conversation

@atenni
Copy link
Copy Markdown
Owner

@atenni atenni commented Apr 18, 2025

Problem

I want to be able to author posts from GitHub Issues

Solution

Create a GitHub Action that is:

  • Automatically creates a new blog post file in the repository when a GitHub Issue is closed by @atenni and labeled with blog:post, blog:til, or blog:quote.
  • Generates a filename and slug from the issue title, ensuring it is lowercase, hyphenated, and sanitised.
  • Determines the correct post directory based on the label.
  • Writes the entire issue body to the new post file, preserving formatting and YAML front matter.
  • Commits and pushes the new post to the repository using the GitHub Actions bot.
  • Adds a comment to the original issue with a success message and the post filename.
  • Triggers the existing deploy workflow by pushing to the main branch, which will publish the new post to the static site.

@atenni atenni changed the title Issue authoring poc feat: enable authoring posts via GitHub Issues Apr 18, 2025
@atenni atenni self-assigned this Apr 18, 2025
@atenni atenni merged commit ad535a8 into main Apr 18, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant