Skip to content

Commit

Permalink
Merge pull request #37 from michaellatman/devin/1733897818-enhance-pr…
Browse files Browse the repository at this point in the history
…-validation
  • Loading branch information
michaellatman authored Dec 11, 2024
2 parents f433fb4 + 731c688 commit 244d9e8
Show file tree
Hide file tree
Showing 4 changed files with 356 additions and 21 deletions.
29 changes: 28 additions & 1 deletion .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,55 @@ on:
branches:
- main

permissions:
pull-requests: write
contents: read

jobs:
pr-check:
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'

- name: Configure pip for uvx
run: |
pip config set global.index-url https://uvx.org/pypi/simple/
pip config set global.trusted-host uvx.org
- name: Install dependencies
run: npm ci

- name: Run PR check script
run: npm run pr-check
env:
DEBUG: 'true'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }}
GITHUB_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}

- name: Provide feedback
if: always()
run: |
COMMENT="PR check completed. Please review the results."
if [ ${{ job.status }} == 'success' ]; then
COMMENT="✅ PR validation passed successfully!"
else
COMMENT="❌ PR validation failed. Please check the workflow logs for details."
fi
gh pr comment ${{ github.event.pull_request.number }} --body "$COMMENT"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
206 changes: 203 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
},
"dependencies": {
"@iarna/toml": "^2.2.5",
"@octokit/rest": "^18.12.0",
"@types/iarna__toml": "^2.0.5",
"chalk": "^4.1.2",
"cli-table3": "^0.6.5",
Expand Down
Loading

0 comments on commit 244d9e8

Please sign in to comment.