mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-04-28 03:30:06 +00:00
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Failing after 3s
CodeQL Advanced / Analyze (python) (push) Failing after 2s
Test / Run Python Tests (push) Successful in 3m4s
CodeQL Advanced / Analyze (javascript-typescript) (push) Failing after 3s
Pre-commit / pre-commit (push) Failing after 25s
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: bytecii <994513625@qq.com>
54 lines
2.4 KiB
YAML
54 lines
2.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request_target:
|
|
branches:
|
|
- main
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
check-files:
|
|
name: Check Not Allowed File Changes
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# Note: dorny/paths-filter fetches file info via GitHub API, no checkout needed
|
|
- name: Check Not Allowed File Changes
|
|
uses: dorny/paths-filter@v4
|
|
id: filter_not_allowed
|
|
with:
|
|
list-files: json
|
|
filters: |
|
|
change:
|
|
- 'package-lock.json'
|
|
- 'yarn.lock'
|
|
- 'pnpm-lock.yaml'
|
|
|
|
# ref: https://github.com/github/docs/blob/main/.github/workflows/triage-unallowed-contributions.yml
|
|
- name: Comment About Changes We Can't Accept
|
|
if: ${{ steps.filter_not_allowed.outputs.change == 'true' }}
|
|
uses: actions/github-script@v8
|
|
with:
|
|
script: |
|
|
let workflowFailMessage = "It looks like you've modified some files that we can't accept as contributions."
|
|
try {
|
|
const badFilesArr = [
|
|
'package-lock.json',
|
|
'yarn.lock',
|
|
'pnpm-lock.yaml',
|
|
]
|
|
const badFiles = badFilesArr.join('\n- ')
|
|
const reviewMessage = `👋 Hey there spelunker. It looks like you've modified some files that we can't accept as contributions. The complete list of files we can't accept are:\n- ${badFiles}\n\nYou'll need to revert all of the files you changed in that list using [GitHub Desktop](https://docs.github.com/en/free-pro-team@latest/desktop/contributing-and-collaborating-using-github-desktop/managing-commits/reverting-a-commit) or \`git checkout origin/main <file name>\`. Once you get those files reverted, we can continue with the review process. :octocat:\n\nMore discussion:\n- https://github.com/electron-vite/electron-vite-vue/issues/192`
|
|
createdComment = await github.rest.issues.createComment({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
issue_number: context.payload.number,
|
|
body: reviewMessage,
|
|
})
|
|
workflowFailMessage = `${workflowFailMessage} Please see ${createdComment.data.html_url} for details.`
|
|
} catch(err) {
|
|
console.log("Error creating comment.", err)
|
|
}
|
|
core.setFailed(workflowFailMessage)
|