Add workflow and script to track draft blog posts#56107
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
✅ Pull request preview available for checkingBuilt without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
lmktfy
left a comment
There was a problem hiding this comment.
@KashishV999 - thank you for the time you put into this.
Let's discuss what we'd need to do, as a SIG, before we could switch to using this tool.
I'm afraid there are barriers. Some we can remove; others need to remain and be considered.
I actually suggest we start by making a script that people run manually and that outputs locally. Even that would be an improvement, and it's a good first step towards full automation.
| EOF | ||
|
|
||
| cd "$WIKI_DIR" | ||
| git config user.email "draft-blog-bot@users.noreply.github.com" |
There was a problem hiding this comment.
🤔 Is this a real identity? Who controls it.
|
|
||
| cd "$WIKI_DIR" | ||
| git config user.email "draft-blog-bot@users.noreply.github.com" | ||
| git config user.name "github-actions[bot]" |
There was a problem hiding this comment.
This name could actually be misleading. Let's reword it.
There was a problem hiding this comment.
- I'm wary to use GitHub Actions for this.
- AIUI, we don't trust Actions' security much. A pin to a full ref should be used
(v4is potentially under control of a malicious party or an organisation with poor security; if we did use Actions, we need multiple levels of defence against that).
| - name: Run draft blog scanner | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| REPO: ${{ github.repository }} |
There was a problem hiding this comment.
I don't think this is right. You have the wrong name here for the Wiki repository.
Problem
When a blog post PR is merged into
main, a follow-up PR is still needed to setdraft: falseto publish it. There is no tracking for which posts are merged but still unpublished.Solution
Adds a daily workflow that scans
mainfordraft: trueblog posts and updates the Wiki page . Maintainers can check the Draft-Blog-Tracker wiki page to see which posts still are unpublished .Changes
.github/workflows/update-draft-wiki.yml: runs daily and on manual triggerscripts/find-draft-blogs.sh— checks front matter and updates the wiki