Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 4 additions & 15 deletions .github/workflows/blog-slack-notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,24 +160,24 @@ jobs:
}

- name: Notify Slack (Regular)
if: steps.changed-files.outputs.has_files == 'true' && steps.unpublish-check.outputs.is_unpublish != 'true'
if: steps.changed-files.outputs.has_files == 'true' && steps.unpublish-check.outputs.is_unpublish != 'true' && steps.review-status.outputs.ready_for_review == 'true'
uses: slackapi/[email protected]
with:
method: chat.postMessage
token: ${{ secrets.SLACK_BOT_TOKEN }}
payload: |
{
"channel": "${{ secrets.SLACK_BLOG_CHANNEL_ID }}",
"text": "${{ steps.review-status.outputs.ready_for_review == 'true' && format('Article submitted for review: {0}', steps.article-info.outputs.title) || (steps.article-info.outputs.is_edit == 'true' && format('{0} made changes to {1}', steps.article-info.outputs.slack_user, steps.article-info.outputs.title) || format('{0} is ready to publish: {1}', steps.article-info.outputs.slack_user, steps.article-info.outputs.title)) }}",
"text": "Article submitted for review: ${{ steps.article-info.outputs.title }}",
"attachments": [
{
"color": "${{ steps.review-status.outputs.ready_for_review == 'true' && '#3b82f6' || '#2eb886' }}",
"color": "#3b82f6",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "${{ steps.review-status.outputs.ready_for_review == 'true' && format('👀 *Article submitted for review*\n<@U08PVBSGL31> please review\n\n>*{0}*', steps.article-info.outputs.title) || (steps.article-info.outputs.is_edit == 'true' && format('✏️ {0} made changes to *{1}*', steps.article-info.outputs.slack_user, steps.article-info.outputs.title) || format('🚀 {0} is ready to publish a new article: *{1}*', steps.article-info.outputs.slack_user, steps.article-info.outputs.title)) }}"
"text": "👀 *Article submitted for review*\n<@U08PVBSGL31> please review\n\n>*${{ steps.article-info.outputs.title }}*"
}
},
{
Expand Down Expand Up @@ -210,17 +210,6 @@ jobs:
},
"url": "${{ github.event.pull_request.html_url }}",
"style": "primary"
},
{
"type": "button",
"text": {
"type": "plain_text",
"text": "Merge",
"emoji": true
},
"action_id": "merge_pr",
"value": "${{ github.event.pull_request.number }}",
"style": "primary"
}
]
}
Expand Down
11 changes: 5 additions & 6 deletions apps/web/src/routes/admin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,7 @@ Complete flow from editing to publication:

**3. GitHub Actions Trigger**
- `blog-grammar-check.yml` - Runs AI grammar check, posts suggestions as PR comment
- `blog-slack-notify.yml` - Sends Slack notification (green border):
```
✏️ @user made changes to *Article Title*
```
- `blog-slack-notify.yml` - No notification sent (waiting for review submission)

**4. User Continues Editing (Optional)**
- Each "Save" updates the same PR branch
Expand All @@ -74,11 +71,13 @@ Complete flow from editing to publication:
- Adds `ComputelessComputer` as PR reviewer

**6. GitHub Actions Trigger Again**
- Slack notification changes to (blue border):
- Slack notification sent (blue border):
```
👀 *Article submitted for review*
@john please review
```
- Includes "Preview" and "View PR" buttons
- No "Merge" button (merge through GitHub interface)

**7. Reviewer Merges PR**
- Article goes live on the website
Expand All @@ -87,7 +86,7 @@ Complete flow from editing to publication:

| Action | `ready_for_review` | Slack Message | Border |
|--------|-------------------|---------------|--------|
| Save | `false` | "✏️ made changes" | Green |
| Save | `false` | No notification | - |
| Submit for Review | `true` | "👀 submitted for review" @john | Blue |

## API Endpoints
Expand Down