ci: add Slack meeting reminder workflow for OPA Gatekeeper weekly meetings#4277
Conversation
Co-authored-by: JaydipGabani <20255485+JaydipGabani@users.noreply.github.com>
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
|
I already set repository secret for slack webhook url. |
There was a problem hiding this comment.
Pull request overview
This PR adds a GitHub Actions workflow to send automated Slack meeting reminders for OPA Gatekeeper weekly meetings.
- Sends reminders to #opa-gatekeeper Slack channel every Wednesday, 1 hour before meetings
- Uses ISO week numbers to alternate between 9 AM PST (odd weeks) and 1 PM PST (even weeks)
- Includes Slack Block Kit formatted message with meeting details, notes link, and Zoom information
| curl -X POST -H 'Content-type: application/json' \ | ||
| --data '{ | ||
| "blocks": [ | ||
| { | ||
| "type": "section", | ||
| "text": { | ||
| "type": "mrkdwn", | ||
| "text": "The OPA Gatekeeper weekly is starting in 1 hour! :clock1:\n\nAdd your agenda items to the meeting notes to get your questions answered by one of the Gatekeeper maintainers.\n\n<https://docs.google.com/document/d/1A1-Q-1OMw3QODs1wT6eqfLTagcGmgzAJAjJihiO3T48/edit|Meeting Notes>" | ||
| } | ||
| }, | ||
| { | ||
| "type": "section", | ||
| "text": { | ||
| "type": "mrkdwn", | ||
| "text": "*Starting time is every Wednesday alternating between:*" | ||
| } | ||
| }, | ||
| { | ||
| "type": "section", | ||
| "text": { | ||
| "type": "mrkdwn", | ||
| "text": "• 10:00 and 14:00 Pacific Time" | ||
| } | ||
| }, | ||
| { | ||
| "type": "section", | ||
| "text": { | ||
| "type": "mrkdwn", | ||
| "text": "• 21:00 and 05:00 Central European Time" | ||
| } | ||
| }, | ||
| { | ||
| "type": "section", | ||
| "text": { | ||
| "type": "mrkdwn", | ||
| "text": "<https://zoom.us/j/332405601|Join Meeting> :point_left:" | ||
| } | ||
| }, | ||
| { | ||
| "type": "context", | ||
| "elements": [ | ||
| { | ||
| "type": "mrkdwn", | ||
| "text": "Check out previous meetings on <https://www.youtube.com/@openpolicyagent8458|YouTube>" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| }' \ | ||
| ${{ secrets.SLACK_WEBHOOK_URL }} |
There was a problem hiding this comment.
The curl command lacks error handling and will silently fail if the Slack webhook call fails. Add the --fail flag to make curl return a non-zero exit code on HTTP errors:
curl -X POST -H 'Content-type: application/json' \
--fail \
--data '{
...
}' \
${{ secrets.SLACK_WEBHOOK_URL }}This ensures the workflow step fails if the Slack notification cannot be sent.
There was a problem hiding this comment.
Added the --fail flag to the curl command in e820b44. Also added the workflow_dispatch trigger with force_run input and updated the week check logic to bypass the schedule check when manually triggered.
Co-authored-by: JaydipGabani <20255485+JaydipGabani@users.noreply.github.com>
JaydipGabani
left a comment
There was a problem hiding this comment.
@copilot address these changes
| description: 'Force send notification (bypass week check)' | ||
| required: false | ||
| default: 'true' | ||
| type: boolean |
| echo "Manual trigger with force_run enabled" | ||
| echo "should_run=true" >> $GITHUB_OUTPUT | ||
| exit 0 | ||
| fi |
Co-authored-by: JaydipGabani <20255485+JaydipGabani@users.noreply.github.com>
|
@copilot can you fix the CI? |
|
@copilot can see why scan_vulns CI task is failing and fix the issue? |
The This PR only adds a new workflow file ( The fix requires upgrading to Go 1.25.5 or later when released, which is outside the scope of this PR. This is a known pre-existing issue that should be tracked separately. |
@copilot can you raise another PR to fix this? |
I'm unable to create new PRs - I can only work on the current PR that I'm assigned to. To fix the GO-2025-4155 vulnerability, you would need to upgrade Go to version 1.25.5 or later when it's released. This can be done by updating the Go version in |
What this PR does / why we need it:
Adds a GitHub Actions workflow that sends meeting reminders to the #opa-gatekeeper Slack channel every Wednesday, alternating between 9 AM PST and 1 PM PST (1 hour before the 10 AM and 2 PM meetings).
step-security/harden-runner--failflag for proper error handling on HTTP failuresWhich issue(s) this PR fixes (optional, using
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when the PR gets merged):Fixes #
Special notes for your reviewer:
The CET times (21:00 and 05:00) in the message are as specified in the requirements and may account for daylight saving transitions.
The
SLACK_WEBHOOK_URLsecret has already been configured by @JaydipGabani.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.