mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-05 16:10:43 +00:00
Bumps [slackapi/slack-github-action](https://github.com/slackapi/slack-github-action) from 3.0.5 to 4.0.0. <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 v4.0.0</h2> <h3>Major Changes</h3> <ul> <li> <p>b1974f0: build: parse yaml with more strict multiline indentation rules</p> <p>Internal dependencies of <a href="https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md#500---2026-06-20"><code>js-yaml@v5</code></a> make YAML parsing more strict and compliant with the YAML specification. Indentation is now required for values that span multiple lines against the base value.</p> <p>See the YAML <a href="https://yaml.org/spec/1.2.2/#63-line-prefixes">line prefixes</a> spec for the expected indentation rule:</p> <pre lang="diff"><code> channel: "C0123" text: "first line <ul> <li>second line"</li> </ul> <ul> <li>second line"<br /> </code></pre></li> </ul> </li> </ul> <h3>Patch Changes</h3> <ul> <li>654bb72: chore: provide global fetch proxied configurations with updates to web api and webhook packages</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>4.0.0</h2> <h3>Major Changes</h3> <ul> <li> <p>b1974f0: build: parse yaml with more strict multiline indentation rules</p> <p>Internal dependencies of <a href="https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md#500---2026-06-20"><code>js-yaml@v5</code></a> make YAML parsing more strict and compliant with the YAML specification. Indentation is now required for values that span multiple lines against the base value.</p> <p>See the YAML <a href="https://yaml.org/spec/1.2.2/#63-line-prefixes">line prefixes</a> spec for the expected indentation rule:</p> <pre lang="diff"><code> channel: "C0123" text: "first line <ul> <li>second line"</li> </ul> <ul> <li>second line"<br /> </code></pre></li> </ul> </li> </ul> <h3>Patch Changes</h3> <ul> <li>654bb72: chore: provide global fetch proxied configurations with updates to web api and webhook packages</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/slackapi/slack-github-action/commit/dcb1066f776dd043e64d0e8ba94ca15cc7e1875d"><code>dcb1066</code></a> chore: release</li> <li><a href="https://github.com/slackapi/slack-github-action/commit/53861e0291660faf57ba686eabf046d5a47fa304"><code>53861e0</code></a> chore: release (<a href="https://redirect.github.com/slackapi/slack-github-action/issues/645">#645</a>)</li> <li><a href="https://github.com/slackapi/slack-github-action/commit/b1974f0d29f2b6150fc5a376312d365bd75fdd9b"><code>b1974f0</code></a> build!: parse yaml with more strict multiline indentation rules (<a href="https://redirect.github.com/slackapi/slack-github-action/issues/640">#640</a>)</li> <li><a href="https://github.com/slackapi/slack-github-action/commit/947ed0677cba8e56cf374d88bfd2d8f72aa9100c"><code>947ed06</code></a> build(deps): bump undici from 7.28.0 to 8.7.0 (<a href="https://redirect.github.com/slackapi/slack-github-action/issues/653">#653</a>)</li> <li><a href="https://github.com/slackapi/slack-github-action/commit/03922a90c917c4d3d3b1c0f35984c2ac23955560"><code>03922a9</code></a> chore: track undici-types to the resolved undici version (<a href="https://redirect.github.com/slackapi/slack-github-action/issues/652">#652</a>)</li> <li><a href="https://github.com/slackapi/slack-github-action/commit/31d473e1d0da2837ee5149493a62a54103e5b45a"><code>31d473e</code></a> build(deps-dev): bump typescript from 6.0.3 to 7.0.2 (<a href="https://redirect.github.com/slackapi/slack-github-action/issues/651">#651</a>)</li> <li><a href="https://github.com/slackapi/slack-github-action/commit/3ca6997fb72e86b0babe7037ff2ca4a5908b6148"><code>3ca6997</code></a> build(deps-dev): bump sinon and <code>@types/sinon</code> (<a href="https://redirect.github.com/slackapi/slack-github-action/issues/649">#649</a>)</li> <li><a href="https://github.com/slackapi/slack-github-action/commit/26a5ad3c5af9cde63a5bb0667fc9e40accce2710"><code>26a5ad3</code></a> build(deps): bump actions/setup-node from 6.4.0 to 7.0.0 (<a href="https://redirect.github.com/slackapi/slack-github-action/issues/647">#647</a>)</li> <li><a href="https://github.com/slackapi/slack-github-action/commit/5092efb0558a5d075f0dd02279f332a116a461ef"><code>5092efb</code></a> build(deps-dev): bump <code>@biomejs/biome</code> from 2.5.3 to 2.5.4 (<a href="https://redirect.github.com/slackapi/slack-github-action/issues/650">#650</a>)</li> <li><a href="https://github.com/slackapi/slack-github-action/commit/3548c3e9500515cd56aa64222b12088f5e6bd6fe"><code>3548c3e</code></a> build(deps): bump slackapi/slack-github-action from 3.0.3 to 3.0.5 (<a href="https://redirect.github.com/slackapi/slack-github-action/issues/646">#646</a>)</li> <li>Additional commits viewable in <a href="https://github.com/slackapi/slack-github-action/compare/v3.0.5...v4.0.0">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> Co-authored-by: Hengfei Yang <hengfei.yang@gmail.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@v4.0.0
|
|
with:
|
|
webhook: ${{ secrets.STALE_PR_SLACK_NOTIFICATION }}
|
|
webhook-type: incoming-webhook
|
|
payload: ${{ steps.slack-msg.outputs.payload }} |