-
Notifications
You must be signed in to change notification settings - Fork 0
feat(ci): implement comprehensive autonomous repository management workflows #94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
NITISH-R-G
wants to merge
2
commits into
main
Choose a base branch
from
repo-automation-workflows-12067048760885712427
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| * @NITISH-R-G |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| --- | ||
| name: Bug report | ||
| about: Create a report to help us improve | ||
| title: '' | ||
| labels: bug | ||
| assignees: '' | ||
| --- | ||
|
|
||
| **Describe the bug** | ||
| A clear and concise description of what the bug is. | ||
|
|
||
| **To Reproduce** | ||
| Steps to reproduce the behavior. | ||
|
|
||
| **Expected behavior** | ||
| A clear and concise description of what you expected to happen. | ||
|
|
||
| **Screenshots** | ||
| If applicable, add screenshots to help explain your problem. | ||
|
|
||
| **Environment (please complete the following information):** | ||
| - OS: [e.g. Ubuntu] | ||
| - Python Version: [e.g. 3.10] | ||
| - Browser [e.g. chrome] | ||
|
|
||
| **Additional context** | ||
| Add any other context about the problem here. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,19 @@ | ||||||
| --- | ||||||
| name: Feature request | ||||||
| about: Suggest an idea for this project | ||||||
| title: '' | ||||||
| labels: enhancement | ||||||
| assignees: '' | ||||||
| --- | ||||||
|
|
||||||
| **Is your feature request related to a problem? Please describe.** | ||||||
| A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nitpick (typo): Consider replacing "Ex." with a more standard expression like "e.g." or "For example,". The current phrasing is slightly nonstandard and could confuse readers; using a more conventional form will improve clarity of the template text.
Suggested change
|
||||||
|
|
||||||
| **Describe the solution you'd like** | ||||||
| A clear and concise description of what you want to happen. | ||||||
|
|
||||||
| **Describe alternatives you've considered** | ||||||
| A clear and concise description of any alternative solutions or features you've considered. | ||||||
|
|
||||||
| **Additional context** | ||||||
| Add any other context or screenshots about the feature request here. | ||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| ## Description | ||
| Provide a brief description of the changes in this PR. | ||
|
|
||
| ## Related Issues | ||
| Fixes # (issue) | ||
|
|
||
| ## Checklist | ||
| - [ ] I have followed the contributing guidelines. | ||
| - [ ] I have run `./validate-submission.sh` locally and it passes. | ||
| - [ ] I have added tests that prove my fix is effective or that my feature works. | ||
| - [ ] I have updated the documentation accordingly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| python: | ||
| - any: | ||
| - '*.py' | ||
| - 'requirements.txt' | ||
| - 'pyproject.toml' | ||
| - 'uv.lock' | ||
|
|
||
| frontend: | ||
| - any: | ||
| - 'web/**/*' | ||
|
|
||
| documentation: | ||
| - any: | ||
| - '*.md' | ||
| - 'docs/**/*' | ||
|
|
||
| github-actions: | ||
| - any: | ||
| - '.github/workflows/*' | ||
| - '.github/*' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| name: AI PR Reviewer | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
| pull_request_review_comment: | ||
| types: [created] | ||
| issue_comment: | ||
| types: [created] | ||
|
|
||
| permissions: | ||
| pull-requests: write | ||
| contents: read | ||
|
|
||
| jobs: | ||
| review: | ||
| runs-on: ubuntu-latest | ||
| if: ${{ github.event.sender.type != 'Bot' }} | ||
| steps: | ||
| - uses: coderabbitai/openai-pr-reviewer@latest | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
| with: | ||
| debug: false | ||
| review_simple_changes: false | ||
| review_comment_lgtm: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main", "master" ] | ||
| pull_request: | ||
| branches: [ "main", "master" ] | ||
|
|
||
| jobs: | ||
| build-and-test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| lfs: true | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.12' | ||
|
|
||
| - name: Install uv | ||
| run: curl -LsSf https://astral.sh/uv/install.sh | sh | ||
|
|
||
| - name: Install dependencies | ||
| run: uv pip install --system -e ".[dev,demo]" | ||
|
|
||
| - name: Run Pytest | ||
| run: python -m pytest tests/ -v |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| name: Greetings | ||
|
|
||
| on: | ||
| pull_request_target: | ||
| types: [opened] | ||
| issues: | ||
| types: [opened] | ||
|
|
||
| permissions: | ||
| issues: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| greeting: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/first-interaction@v1 | ||
| with: | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
| issue-message: "Welcome to the EV Grid Oracle repository! Thank you for opening your first issue. A maintainer will triage it shortly." | ||
| pr-message: "Welcome and thank you for contributing to EV Grid Oracle! Your first pull request is greatly appreciated. Our autonomous review systems will evaluate it shortly." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| name: "Pull Request Labeler" | ||
| on: | ||
| pull_request_target: | ||
| types: [opened, synchronize, reopened] | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| triage: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/labeler@v5 | ||
| with: | ||
| repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
| sync-labels: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| name: GitHub Pages | ||
|
|
||
| on: | ||
| push: | ||
| branches: ["main", "master"] | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| concurrency: | ||
| group: "pages" | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| deploy: | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| lfs: true | ||
| - name: Setup Pages | ||
| uses: actions/configure-pages@v5 | ||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
| - name: Build frontend | ||
| run: | | ||
| cd web | ||
| npm ci | ||
| npm run build | ||
| - name: Upload artifact | ||
| uses: actions/upload-pages-artifact@v3 | ||
| with: | ||
| path: './web/dist' | ||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| name: Repository Maintenance & Autonomous Governance | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main", "master" ] | ||
| pull_request: | ||
| branches: [ "main", "master" ] | ||
| schedule: | ||
| - cron: '0 0 * * *' # Daily | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| maintenance: | ||
| # Only run if PR is not from a fork, to prevent 403 Forbidden errors | ||
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.head_ref || github.ref }} | ||
|
|
||
| - name: Install system dependencies (for pydeps) | ||
| run: sudo apt-get update && sudo apt-get install -y xdg-utils graphviz | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.12' | ||
| cache: 'pip' | ||
|
|
||
| - name: Install uv | ||
| run: curl -LsSf https://astral.sh/uv/install.sh | sh | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| uv pip install --system cyclonedx-bom pydeps | ||
| uv pip install --system -e ".[dev,demo]" | ||
|
|
||
| - name: Run autonomous tasks (knowledge-graph, docs-sync, architecture-diagrams, sbom) | ||
| run: | | ||
| python tools/generate_knowledge_graph.py | ||
| python tools/docs_sync.py | ||
|
|
||
| # Generate architecture diagrams | ||
| mkdir -p artifacts | ||
| pydeps ev_grid_oracle --noshow -o artifacts/architecture.svg || true | ||
|
|
||
| # Generate SBOM | ||
| cyclonedx-py environment -o artifacts/bom.json | ||
|
|
||
| - name: Commit and Push Changes | ||
| run: | | ||
| git config --global user.name 'github-actions[bot]' | ||
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
| git add artifacts/ docs/ || true | ||
| git diff --staged --quiet || git commit -m "chore(auto): Update repository artifacts and documentation" | ||
| git push origin HEAD:${{ github.head_ref || github.ref }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| name: Mark stale issues and pull requests | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: '0 0 * * *' | ||
|
|
||
| permissions: | ||
| issues: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| stale: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/stale@v9 | ||
| with: | ||
| stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.' | ||
| stale-pr-message: 'This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.' | ||
| days-before-stale: 30 | ||
| days-before-close: 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # Contributor Covenant Code of Conduct | ||
|
|
||
| ## Our Pledge | ||
|
|
||
| We as members, contributors, and leaders pledge to make participation in our | ||
| community a harassment-free experience for everyone, regardless of age, body | ||
| size, visible or invisible disability, ethnicity, sex characteristics, gender | ||
| identity and expression, level of experience, education, socio-economic status, | ||
| nationality, personal appearance, race, religion, or sexual identity | ||
| and orientation. | ||
|
|
||
| We pledge to act and interact in ways that contribute to an open, welcoming, | ||
| diverse, inclusive, and healthy community. | ||
|
|
||
| ## Our Standards | ||
|
|
||
| Examples of behavior that contributes to a positive environment for our | ||
| community include: | ||
|
|
||
| * Demonstrating empathy and kindness toward other people | ||
| * Being respectful of differing opinions, viewpoints, and experiences | ||
| * Giving and gracefully accepting constructive feedback | ||
| * Accepting responsibility and apologizing to those affected by our mistakes, | ||
| and learning from the experience | ||
| * Focusing on what is best not just for us as individuals, but for the | ||
| overall community |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # Contributing to EV Grid Oracle | ||
|
|
||
| First off, thank you for considering contributing to EV Grid Oracle! | ||
|
|
||
| ## Code of Conduct | ||
|
|
||
| By participating in this project, you agree to abide by the [Code of Conduct](CODE_OF_CONDUCT.md). | ||
|
|
||
| ## How Can I Contribute? | ||
|
|
||
| ### Reporting Bugs | ||
|
|
||
| - Ensure the bug was not already reported by searching on GitHub under Issues. | ||
| - If you're unable to find an open issue addressing the problem, open a new one. | ||
|
|
||
| ### Submitting Pull Requests | ||
|
|
||
| 1. Fork the repo and create your branch from `main`. | ||
| 2. If you've added code that should be tested, add tests. | ||
| 3. If you've changed APIs, update the documentation. | ||
| 4. Ensure the test suite passes. | ||
| 5. Make sure your code lints. | ||
| 6. Issue that pull request! | ||
|
|
||
| ## Local Development | ||
|
|
||
| 1. Follow the setup instructions in the README. | ||
| 2. Run `./validate-submission.sh` before committing to make sure formatting and type checks pass. | ||
|
|
||
| Thank you! |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick (typo): Capitalize "Chrome" as a proper noun in the browser example.
This keeps the example consistent with proper noun capitalization elsewhere in the template.