-
Notifications
You must be signed in to change notification settings - Fork 0
Import YAML helpers for repository governance #1
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| name: Bug Report | ||
| description: Create a report to help us reproduce and fix a bug. | ||
| title: "fix: [Short description of the bug]" | ||
| labels: ["bug"] | ||
| body: | ||
| - type: markdown | ||
| attributes: | ||
| value: | | ||
| Thank you for taking the time to report a bug. Please ensure you have read the `CONTRIBUTING.md` and checked for existing duplicate issues before proceeding. | ||
|
|
||
| - type: checkboxes | ||
| id: pre-flight | ||
| attributes: | ||
| label: Pre-flight checks | ||
| options: | ||
| - label: I have checked existing open and closed issues for duplicates. | ||
| required: true | ||
| - label: I am using the latest version of the action/script. | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: environment | ||
| attributes: | ||
| label: Environment Details | ||
| description: OS version, Python version, and execution context (local vs GitHub Actions). | ||
| placeholder: e.g., Ubuntu-latest (GitHub Actions), Python 3.11 | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: steps-to-reproduce | ||
| attributes: | ||
| label: Steps to Reproduce | ||
| description: Provide a clear, step-by-step algorithm to trigger the bug. | ||
| placeholder: | | ||
| 1. Push commit with the following payload... | ||
| 2. Action triggers process_event.py... | ||
| 3. Fails with error... | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: expected-behavior | ||
| attributes: | ||
| label: Expected Behavior | ||
| description: What did you expect the script/action to do? | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: actual-behavior | ||
| attributes: | ||
| label: Actual Behavior / Traceback | ||
| description: What actually occurred? Paste stack traces or logs here. | ||
| render: shell | ||
| validations: | ||
| required: true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| name: Feature Request | ||
| description: Suggest an enhancement or a new feature for the LLM pipeline. | ||
| title: "feat: [Short description of the feature]" | ||
| labels: ["enhancement"] | ||
| body: | ||
| - type: markdown | ||
| attributes: | ||
| value: | | ||
| Thank you for suggesting an improvement! Please provide detailed context so we can understand the value of this feature. | ||
|
|
||
| - type: textarea | ||
| id: problem-context | ||
| attributes: | ||
| label: Problem Context | ||
| description: Explain the problem your proposed enhancement solves. Is your feature request related to a specific frustration? | ||
| placeholder: I'm always frustrated when... | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: proposed-solution | ||
| attributes: | ||
| label: Proposed Solution & Use Cases | ||
| description: Describe your ideal solution and real-world scenarios where this feature would be beneficial. | ||
| placeholder: It would be great if the action could automatically... | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: alternatives | ||
| attributes: | ||
| label: Alternatives Considered | ||
| description: Have you considered any alternative solutions or workarounds? | ||
| validations: | ||
| required: false |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: "pip" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| labels: | ||
| - "dependencies" | ||
| - "python" | ||
|
|
||
| - package-ecosystem: "github-actions" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| labels: | ||
| - "dependencies" | ||
| - "actions" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| # Severity labels — used by trigger_action.py (7-level scale) | ||
| - name: "severity: critical" | ||
| color: "B60205" | ||
| description: "Production-breaking, security vulnerabilities, data loss risk" | ||
|
|
||
| - name: "severity: high" | ||
| color: "D93F0B" | ||
| description: "Core logic changes, API modifications, breaking changes" | ||
|
|
||
| - name: "severity: elevated" | ||
| color: "E36209" | ||
| description: "New features or modules, large refactors, external integrations" | ||
|
|
||
| - name: "severity: medium" | ||
| color: "E4E669" | ||
| description: "New helpers, CI/CD changes, config changes, dependency updates" | ||
|
|
||
| - name: "severity: moderate" | ||
| color: "B4D455" | ||
| description: "Minor feature additions, validation improvements, small behavioral changes" | ||
|
|
||
| - name: "severity: low" | ||
| color: "0E8A16" | ||
| description: "Documentation updates, cosmetic changes, formatting fixes" | ||
|
|
||
| - name: "severity: informational" | ||
| color: "C5DEF5" | ||
| description: "Trivial changes — typos, whitespace, comment rewording" | ||
|
|
||
| # Type labels — standard issue/PR classification | ||
| - name: "bug" | ||
| color: "D73A4A" | ||
| description: "Something isn't working" | ||
|
|
||
| - name: "enhancement" | ||
| color: "A2EEEF" | ||
| description: "New feature or request" | ||
|
|
||
| - name: "documentation" | ||
| color: "0075CA" | ||
| description: "Improvements or additions to documentation" | ||
|
|
||
| - name: "security" | ||
| color: "E11D48" | ||
| description: "Security vulnerability or audit finding" | ||
|
|
||
| - name: "performance" | ||
| color: "F9D0C4" | ||
| description: "Performance or optimization issue" | ||
|
|
||
| - name: "refactor" | ||
| color: "D4C5F9" | ||
| description: "Code quality or structural improvement" | ||
|
|
||
| - name: "dependencies" | ||
| color: "0366D6" | ||
| description: "Dependency update (Dependabot or manual)" | ||
|
|
||
| # Workflow labels | ||
| - name: "ai-generated" | ||
| color: "6F42C1" | ||
| description: "Automatically created by the AI Issue Generator" | ||
|
|
||
| - name: "needs triage" | ||
| color: "FBCA04" | ||
| description: "Awaiting first review and classification" | ||
|
|
||
| - name: "wontfix" | ||
| color: "FFFFFF" | ||
| description: "This will not be worked on" | ||
|
|
||
| - name: "duplicate" | ||
| color: "CFD3D7" | ||
| description: "This issue or pull request already exists" | ||
|
|
||
| - name: "good first issue" | ||
| color: "7057FF" | ||
| description: "Good for newcomers" | ||
|
|
||
| - name: "help wanted" | ||
| color: "008672" | ||
| description: "Extra attention is needed" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| ## Description | ||
| ## Related Issue(s) | ||
| Resolves # | ||
|
|
||
| ## Type of Change | ||
| - [ ] Bug fix (non-breaking change which fixes an issue) | ||
| - [ ] New feature (non-breaking change which adds functionality) | ||
| - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) | ||
| - [ ] Documentation update | ||
| - [ ] Refactoring / Technical Debt | ||
|
|
||
| ## Testing Performed | ||
| - [ ] Local execution of `process_event.py` | ||
| - [ ] Verified JSON output structure from Gemini API | ||
| - [ ] Tested GitHub Action workflow trigger (dry-run) | ||
| - [ ] Other: | ||
|
|
||
| ## Checklist | ||
| - [ ] My code follows the code style of this project (PEP-8). | ||
| - [ ] I have performed a self-review of my own code. | ||
| - [ ] I have commented my code, particularly in hard-to-understand areas. | ||
| - [ ] I have made corresponding changes to the documentation (README.md, etc.). | ||
| - [ ] My changes generate no new warnings or errors in the CI pipeline. |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,49 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: Llama Auto-Issue Generator | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| branches: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - main | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| types: [opened, synchronize, labeled] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| permissions: read-all | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| concurrency: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| group: ai-issue-${{ github.ref }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cancel-in-progress: false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| analyze_code: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| timeout-minutes: 15 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| contents: read | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| issues: write | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pull-requests: write | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Checkout code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/checkout@v6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fetch-depth: 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Set up Python | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/setup-python@v6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| python-version: '3.11' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Install dependencies | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pip install --no-cache-dir PyGithub==2.5.0 requests==2.32.3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Run AI Analysis | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| REPOSITORY: ${{ github.repository }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EVENT_NAME: ${{ github.event_name }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| COMMIT_SHA: ${{ github.sha }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PR_NUMBER: ${{ github.event.pull_request.number }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| GH_MODELS_TOKEN: ${{ secrets.GH_MODELS_TOKEN }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ALLOWED_USER: ${{ secrets.ALLOWED_USER }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: python "trigger action/trigger_action.py" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+26
to
+49
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. Do not run PR-head code with repository secrets. This job checks out the PR branch and then executes Suggested fix - name: Checkout code
uses: actions/checkout@v6
with:
- fetch-depth: 0
+ ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.sha }}
+ fetch-depth: 1📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| name: Dependabot Auto Merge | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, reopened, synchronize, ready_for_review] | ||
|
|
||
| permissions: read-all | ||
|
|
||
| concurrency: | ||
| group: dependabot-merge-${{ github.event.pull_request.number }} | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| automerge: | ||
| if: github.event.pull_request.user.login == 'dependabot[bot]' | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| steps: | ||
| - name: Fetch Dependabot metadata | ||
| id: metadata | ||
| uses: dependabot/fetch-metadata@v2 | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Approve safe non-breaking updates | ||
| if: | | ||
| github.event.pull_request.draft == false && | ||
| (steps.metadata.outputs.update-type == 'version-update:semver-patch' || | ||
| steps.metadata.outputs.update-type == 'version-update:semver-minor') | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: gh pr review "${{ github.event.pull_request.number }}" --approve | ||
|
|
||
| - name: Enable auto-merge for safe non-breaking updates | ||
| if: | | ||
| github.event.pull_request.draft == false && | ||
| (steps.metadata.outputs.update-type == 'version-update:semver-patch' || | ||
| steps.metadata.outputs.update-type == 'version-update:semver-minor') | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: gh pr merge "${{ github.event.pull_request.number }}" --auto --merge |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| name: Label Sync | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - '.github/labels.yml' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: read-all | ||
|
|
||
| jobs: | ||
| sync: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| permissions: | ||
| issues: write | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Sync labels | ||
| uses: EndBug/add-and-update-labels@v1 | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| config-file: .github/labels.yml |
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.
Missing label definitions for "python" and "actions".
The labels
python(line 9) andactions(line 17) are referenced here but are not defined in.github/labels.yml. Thedependencieslabel exists (line 55 of labels.yml), but the other two do not. This will result in Dependabot creating these labels with default styling, causing inconsistency with your managed label taxonomy.Add these labels to
.github/labels.yml:Also applies to: 15-17
🤖 Prompt for AI Agents