mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-05 08:09:22 +00:00
Bumps [slackapi/slack-github-action](https://github.com/slackapi/slack-github-action) from 3.0.2 to 3.0.3. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/slackapi/slack-github-action/releases">slackapi/slack-github-action's releases</a>.</em></p> <blockquote> <h2>Slack GitHub Action v3.0.3</h2> <h3>Patch Changes</h3> <ul> <li>66834e4: feat: add instrumentation to address error rates</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/slackapi/slack-github-action/blob/main/CHANGELOG.md">slackapi/slack-github-action's changelog</a>.</em></p> <blockquote> <h2>3.0.3</h2> <h3>Patch Changes</h3> <ul> <li>66834e4: feat: add instrumentation to address error rates</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/slackapi/slack-github-action/commit/45a88b9581bfab2566dc881e2cd66d334e621e2c"><code>45a88b9</code></a> chore: release</li> <li><a href="https://github.com/slackapi/slack-github-action/commit/1c0bcf08feaa559a9bcfcc249184e13b136ffa55"><code>1c0bcf0</code></a> chore: release (<a href="https://redirect.github.com/slackapi/slack-github-action/issues/606">#606</a>)</li> <li><a href="https://github.com/slackapi/slack-github-action/commit/66834e4b0cad4cbf09ca680587ad8af71d615d4b"><code>66834e4</code></a> feat: add instrumentation to address error rates (<a href="https://redirect.github.com/slackapi/slack-github-action/issues/600">#600</a>)</li> <li><a href="https://github.com/slackapi/slack-github-action/commit/0fe0f902b9f8da107ca0e1314a388c0f57e20d48"><code>0fe0f90</code></a> build(deps): bump <code>@actions/github</code> from 9.0.0 to 9.1.1 (<a href="https://redirect.github.com/slackapi/slack-github-action/issues/605">#605</a>)</li> <li><a href="https://github.com/slackapi/slack-github-action/commit/c5e70597945c255539c5218d4178ed3c7d8188be"><code>c5e7059</code></a> build(deps): bump <code>@slack/web-api</code> from 7.15.0 to 7.15.1 (<a href="https://redirect.github.com/slackapi/slack-github-action/issues/604">#604</a>)</li> <li><a href="https://github.com/slackapi/slack-github-action/commit/0325526875571a27abcfd2b302453a90871abbff"><code>0325526</code></a> build(deps-dev): bump <code>@biomejs/biome</code> from 2.4.10 to 2.4.13 (<a href="https://redirect.github.com/slackapi/slack-github-action/issues/601">#601</a>)</li> <li><a href="https://github.com/slackapi/slack-github-action/commit/900cd3e6fa9d6eacd8a5512ecff230d08e65aec7"><code>900cd3e</code></a> build(deps-dev): bump <code>@types/node</code> from 24.12.0 to 24.12.2 (<a href="https://redirect.github.com/slackapi/slack-github-action/issues/603">#603</a>)</li> <li><a href="https://github.com/slackapi/slack-github-action/commit/53fdcffeb6e4d34cbdf3276f7beadb0ecc7c9fcd"><code>53fdcff</code></a> build(deps): bump <code>@actions/core</code> from 3.0.0 to 3.0.1 (<a href="https://redirect.github.com/slackapi/slack-github-action/issues/602">#602</a>)</li> <li><a href="https://github.com/slackapi/slack-github-action/commit/26856cc7fb2c1c2951483645f5fdc3643dbe96eb"><code>26856cc</code></a> build(deps): bump slackapi/slack-github-action from 3.0.1 to 3.0.2 (<a href="https://redirect.github.com/slackapi/slack-github-action/issues/596">#596</a>)</li> <li><a href="https://github.com/slackapi/slack-github-action/commit/feba1e29702383a5a3cd5136af0559ba10859b04"><code>feba1e2</code></a> ci: skip publish step if no release is needed (<a href="https://redirect.github.com/slackapi/slack-github-action/issues/599">#599</a>)</li> <li>Additional commits viewable in <a href="https://github.com/slackapi/slack-github-action/compare/v3.0.2...v3.0.3">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
64 lines
2.3 KiB
YAML
64 lines
2.3 KiB
YAML
name: Notify Slack on stale PRs
|
|
permissions:
|
|
contents: read
|
|
on:
|
|
schedule:
|
|
- cron: "0 11 * * *" # everyday at 11AM
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
notify:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Get PRs older than 7 days
|
|
uses: actions/github-script@v9
|
|
id: stale-prs
|
|
with:
|
|
script: |
|
|
const sevenDaysAgo = new Date();
|
|
sevenDaysAgo.setDate(sevenDaysAgo.getDate() - 7);
|
|
const dateString = sevenDaysAgo.toISOString().split('T')[0];
|
|
|
|
const resp = await github.rest.search.issuesAndPullRequests({
|
|
q: `repo:${{ github.repository }} is:pr is:open created:<${dateString}`,
|
|
sort: 'created',
|
|
order: 'asc',
|
|
per_page: 100
|
|
});
|
|
|
|
const prs = resp.data.items.map(pr => {
|
|
const createdDate = new Date(pr.created_at);
|
|
const daysOld = Math.floor((new Date() - createdDate) / (1000 * 60 * 60 * 24));
|
|
return {
|
|
number: pr.number,
|
|
title: pr.title,
|
|
user: pr.user.login,
|
|
daysOld: daysOld
|
|
};
|
|
});
|
|
|
|
core.setOutput("prs", JSON.stringify(prs));
|
|
|
|
- name: Build Slack message
|
|
id: slack-msg
|
|
run: |
|
|
PRS=$(echo '${{ steps.stale-prs.outputs.prs }}' | jq -r '.[] | "- <https://github.com/${{ github.repository }}/pull/\(.number)|#\(.number) \(.title)> — @\(.user) (_\(.daysOld) days old_)"')
|
|
PR_COUNT=$(echo '${{ steps.stale-prs.outputs.prs }}' | jq '. | length')
|
|
if [ "$PR_COUNT" -eq 0 ]; then
|
|
MESSAGE="✅ *No stale PRs in ${{ github.repository }}*\n\nAll PRs are less than 7 days old!"
|
|
else
|
|
MESSAGE="🔔 *Pull Requests older than 7 days in ${{ github.repository }}*\n\n$PRS"
|
|
fi
|
|
# Escape for JSON and create the payload
|
|
PAYLOAD=$(jq -n --arg msg "$MESSAGE" '{text: $msg}')
|
|
echo "payload<<EOF" >> $GITHUB_OUTPUT
|
|
echo "$PAYLOAD" >> $GITHUB_OUTPUT
|
|
echo "EOF" >> $GITHUB_OUTPUT
|
|
|
|
- name: Send Slack notification
|
|
uses: slackapi/slack-github-action@v3.0.3
|
|
with:
|
|
webhook: ${{ secrets.STALE_PR_SLACK_NOTIFICATION }}
|
|
webhook-type: incoming-webhook
|
|
payload: ${{ steps.slack-msg.outputs.payload }} |