mirror of
https://github.com/langgenius/dify.git
synced 2026-07-14 17:07:03 +08:00
Bumps the github-actions-dependencies group with 16 updates in the / directory: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `6.0.2` | `7.0.0` | | [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) | `8.1.0` | `8.3.0` | | [hoverkraft-tech/compose-action](https://github.com/hoverkraft-tech/compose-action) | `2.6.0` | `3.0.0` | | [codecov/codecov-action](https://github.com/codecov/codecov-action) | `6.0.0` | `7.0.0` | | [actions/setup-python](https://github.com/actions/setup-python) | `6.2.0` | `6.3.0` | | [docker/login-action](https://github.com/docker/login-action) | `4.1.0` | `4.4.0` | | [docker/metadata-action](https://github.com/docker/metadata-action) | `6.0.0` | `6.2.0` | | [depot/build-push-action](https://github.com/depot/build-push-action) | `1.17.0` | `1.18.0` | | [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `4.0.0` | `4.2.0` | | [docker/build-push-action](https://github.com/docker/build-push-action) | `7.1.0` | `7.3.0` | | [dorny/paths-filter](https://github.com/dorny/paths-filter) | `4.0.1` | `4.0.2` | | [actions/stale](https://github.com/actions/stale) | `10.2.0` | `10.3.0` | | [actions/cache/restore](https://github.com/actions/cache) | `5.0.5` | `6.1.0` | | [actions/cache/save](https://github.com/actions/cache) | `5.0.5` | `6.1.0` | | [super-linter/super-linter/slim](https://github.com/super-linter/super-linter) | `8.6.0` | `8.7.0` | | [anthropics/claude-code-action](https://github.com/anthropics/claude-code-action) | `1.0.119` | `1.0.165` | Updates `actions/checkout` from 6.0.2 to 7.0.0 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](de0fac2e45...9c091bb21b) Updates `astral-sh/setup-uv` from 8.1.0 to 8.3.0 - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](08807647e7...d31148d669) Updates `hoverkraft-tech/compose-action` from 2.6.0 to 3.0.0 - [Release notes](https://github.com/hoverkraft-tech/compose-action/releases) - [Commits](d2bee4f07e...11beaa1c2d) Updates `codecov/codecov-action` from 6.0.0 to 7.0.0 - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](57e3a136b7...fb8b3582c8) Updates `actions/setup-python` from 6.2.0 to 6.3.0 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](a309ff8b42...ece7cb06ca) Updates `docker/login-action` from 4.1.0 to 4.4.0 - [Release notes](https://github.com/docker/login-action/releases) - [Commits](4907a6ddec...af1e73f918) Updates `docker/metadata-action` from 6.0.0 to 6.2.0 - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](030e881283...dc80280410) Updates `depot/build-push-action` from 1.17.0 to 1.18.0 - [Release notes](https://github.com/depot/build-push-action/releases) - [Commits](5f3b3c2e5a...98e78adca7) Updates `docker/setup-buildx-action` from 4.0.0 to 4.2.0 - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](4d04d5d948...bb05f3f551) Updates `docker/build-push-action` from 7.1.0 to 7.3.0 - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](bcafcacb16...53b7df96c9) Updates `dorny/paths-filter` from 4.0.1 to 4.0.2 - [Release notes](https://github.com/dorny/paths-filter/releases) - [Changelog](https://github.com/dorny/paths-filter/blob/master/CHANGELOG.md) - [Commits](fbd0ab8f3e...7b450fff21) Updates `actions/stale` from 10.2.0 to 10.3.0 - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](b5d41d4e1d...eb5cf3af3a) Updates `actions/cache/restore` from 5.0.5 to 6.1.0 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](27d5ce7f10...55cc834586) Updates `actions/cache/save` from 5.0.5 to 6.1.0 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](27d5ce7f10...55cc834586) Updates `super-linter/super-linter/slim` from 8.6.0 to 8.7.0 - [Release notes](https://github.com/super-linter/super-linter/releases) - [Changelog](https://github.com/super-linter/super-linter/blob/main/CHANGELOG.md) - [Commits](9e863354e3...4ce20838b8) Updates `anthropics/claude-code-action` from 1.0.119 to 1.0.165 - [Release notes](https://github.com/anthropics/claude-code-action/releases) - [Commits](476e359e62...558b1d6cab) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions-dependencies - dependency-name: astral-sh/setup-uv dependency-version: 8.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-dependencies - dependency-name: hoverkraft-tech/compose-action dependency-version: 3.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions-dependencies - dependency-name: codecov/codecov-action dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions-dependencies - dependency-name: actions/setup-python dependency-version: 6.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-dependencies - dependency-name: docker/login-action dependency-version: 4.4.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-dependencies - dependency-name: docker/metadata-action dependency-version: 6.2.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-dependencies - dependency-name: depot/build-push-action dependency-version: 1.18.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-dependencies - dependency-name: docker/setup-buildx-action dependency-version: 4.2.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-dependencies - dependency-name: docker/build-push-action dependency-version: 7.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-dependencies - dependency-name: dorny/paths-filter dependency-version: 4.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions-dependencies - dependency-name: actions/stale dependency-version: 10.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-dependencies - dependency-name: actions/cache/restore dependency-version: 6.1.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions-dependencies - dependency-name: actions/cache/save dependency-version: 6.1.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions-dependencies - dependency-name: super-linter/super-linter/slim dependency-version: 8.7.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-dependencies - dependency-name: anthropics/claude-code-action dependency-version: 1.0.165 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions-dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
129 lines
4.1 KiB
YAML
129 lines
4.1 KiB
YAML
name: Pyrefly Diff Check
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'api/**/*.py'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
pyrefly-diff:
|
|
runs-on: depot-ubuntu-24.04
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
pull-requests: write
|
|
steps:
|
|
- name: Checkout PR branch
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Python & UV
|
|
uses: astral-sh/setup-uv@d31148d669074a8d0a63714ba94f3201e7020bc3 # v8.3.0
|
|
with:
|
|
enable-cache: true
|
|
|
|
- name: Install dependencies
|
|
run: uv sync --project api --dev
|
|
|
|
- name: Prepare diagnostics extractor
|
|
run: |
|
|
git show ${{ github.event.pull_request.head.sha }}:api/libs/pyrefly_diagnostics.py > /tmp/pyrefly_diagnostics.py
|
|
|
|
- name: Run pyrefly on PR branch
|
|
run: |
|
|
uv run --directory api --dev pyrefly check 2>&1 \
|
|
| uv run --directory api python /tmp/pyrefly_diagnostics.py > /tmp/pyrefly_pr.txt || true
|
|
|
|
- name: Checkout base branch
|
|
run: git checkout ${{ github.base_ref }}
|
|
|
|
- name: Run pyrefly on base branch
|
|
run: |
|
|
uv run --directory api --dev pyrefly check 2>&1 \
|
|
| uv run --directory api python /tmp/pyrefly_diagnostics.py > /tmp/pyrefly_base.txt || true
|
|
|
|
- name: Compute diff
|
|
run: |
|
|
diff -u /tmp/pyrefly_base.txt /tmp/pyrefly_pr.txt > pyrefly_diff.txt || true
|
|
|
|
- name: Check if line counts match
|
|
id: line_count_check
|
|
run: |
|
|
base_lines=$(wc -l < /tmp/pyrefly_base.txt)
|
|
pr_lines=$(wc -l < /tmp/pyrefly_pr.txt)
|
|
if [ "$base_lines" -eq "$pr_lines" ]; then
|
|
echo "same=true" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "same=false" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
- name: Save PR number
|
|
run: |
|
|
echo ${{ github.event.pull_request.number }} > pr_number.txt
|
|
|
|
- name: Upload pyrefly diff
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: pyrefly_diff
|
|
path: |
|
|
pyrefly_diff.txt
|
|
pr_number.txt
|
|
|
|
- name: Comment PR with pyrefly diff
|
|
if: ${{ github.event.pull_request.head.repo.full_name == github.repository && steps.line_count_check.outputs.same == 'false' }}
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
script: |
|
|
const fs = require('fs');
|
|
let diff = fs.readFileSync('pyrefly_diff.txt', { encoding: 'utf8' });
|
|
const prNumber = context.payload.pull_request.number;
|
|
|
|
const MAX_CHARS = 65000;
|
|
if (diff.length > MAX_CHARS) {
|
|
diff = diff.slice(0, MAX_CHARS);
|
|
diff = diff.slice(0, diff.lastIndexOf('\n'));
|
|
diff += '\n\n... (truncated) ...';
|
|
}
|
|
|
|
const body = diff.trim()
|
|
? [
|
|
'### Pyrefly Diff',
|
|
'<details>',
|
|
'<summary>base → PR</summary>',
|
|
'',
|
|
'```diff',
|
|
diff,
|
|
'```',
|
|
'</details>',
|
|
].join('\n')
|
|
: '### Pyrefly Diff\nNo changes detected.';
|
|
|
|
const marker = '### Pyrefly Diff';
|
|
const { data: comments } = await github.rest.issues.listComments({
|
|
issue_number: prNumber,
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
});
|
|
const existing = comments.find((comment) => comment.body.startsWith(marker));
|
|
|
|
if (existing) {
|
|
await github.rest.issues.updateComment({
|
|
comment_id: existing.id,
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
body,
|
|
});
|
|
} else {
|
|
await github.rest.issues.createComment({
|
|
issue_number: prNumber,
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
body,
|
|
});
|
|
}
|