Elffuss BraidHub

kikocis/continue public

send to slack
Changeset6fe6344740975097dff90630c93ca68a0adf189fa3e10dc4b140b625ba7f1ee5
AuthorNate <sestinj@gmail.com> · 2025-05-10 10:29 -07:00
CommitterNate <sestinj@gmail.com> · 2025-05-10 10:29 -07:00
Parents2f2706f6e238

Browse the files at this changeset

1 file changed

modified .github/workflows/metrics.yaml +34 −5
@@ -33,11 +33,40 @@
3333 echo "$first_day..$last_day"
3434 echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV"
3535
36- - name: Run issue-metrics tool
37- uses: github/issue-metrics@v3
38- env:
39- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40- SEARCH_QUERY: 'repo:continuedev/continue created:${{ env.last_month }} -reason:"not planned"'
36+ # - name: Run issue-metrics tool
37+ # uses: github/issue-metrics@v3
38+ # env:
39+ # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+ # SEARCH_QUERY: 'repo:continuedev/continue created:${{ env.last_month }} -reason:"not planned"'
41+
42+ - name: Read metrics file content
43+ id: read-metrics
44+ run: |
45+ content=$(echo "abc")
46+ echo "metrics_content=$content" >> "$GITHUB_OUTPUT"
47+
48+ # content=$(cat ./issue_metrics.md)
49+ # # This prepares the content in a way that can be used in GitHub Actions
50+ # content="${content//'%'/'%25'}"
51+ # content="${content//$'\n'/'%0A'}"
52+ # content="${content//$'\r'/'%0D'}"
53+ - name: Post a message in a channel
54+ uses: slackapi/slack-github-action@v2.1.0
55+ with:
56+ webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
57+ webhook-type: incoming-webhook
58+ payload: |
59+ text: "Issue / PR Metrics Report"
60+ blocks:
61+ - type: "header"
62+ text:
63+ type: "plain_text"
64+ text: "Monthly Issue Metrics Report"
65+ emoji: true
66+ - type: "section"
67+ text:
68+ type: "mrkdwn"
69+ text: "${{ steps.read-metrics.outputs.metrics_content }}"
4170
4271 - name: Upload metrics report as artifact
4372 uses: actions/upload-artifact@v4