forked from Mirror/ollama4j
Enhance GitHub workflows and templates
- Updated dependabot configuration to include Maven, GitHub Actions, and npm with weekly update schedules and limits on open pull requests. - Added a pull request template to standardize contributions and ensure necessary information is provided. - Introduced issue templates for bug reports and feature requests to streamline issue tracking and enhance user experience. - Created workflows for CodeQL analysis, pre-commit checks, and stale issue management to improve code quality and maintainability.
This commit is contained in:
44
.github/workflows/codeql.yml
vendored
Normal file
44
.github/workflows/codeql.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
name: CodeQL
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
schedule:
|
||||
- cron: '0 3 * * 1'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'java', 'javascript' ]
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK
|
||||
if: matrix.language == 'java'
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '11'
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v3
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
|
||||
30
.github/workflows/pre-commit.yml
vendored
Normal file
30
.github/workflows/pre-commit.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Pre-commit Check on PR
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize]
|
||||
branches:
|
||||
- main
|
||||
|
||||
#on:
|
||||
# pull_request:
|
||||
# branches: [ main ]
|
||||
# push:
|
||||
# branches: [ main ]
|
||||
|
||||
jobs:
|
||||
run:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install pre-commit
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install pre-commit
|
||||
- name: Run pre-commit
|
||||
run: |
|
||||
pre-commit run --all-files --show-diff-on-failure
|
||||
|
||||
33
.github/workflows/stale.yml
vendored
Normal file
33
.github/workflows/stale.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
name: Mark stale issues and PRs
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 2 * * *'
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
days-before-stale: 60
|
||||
days-before-close: 14
|
||||
stale-issue-label: 'stale'
|
||||
stale-pr-label: 'stale'
|
||||
exempt-issue-labels: 'pinned,security'
|
||||
exempt-pr-labels: 'pinned,security'
|
||||
stale-issue-message: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
recent activity. It will be closed if no further activity occurs.
|
||||
close-issue-message: >
|
||||
Closing this stale issue. Feel free to reopen if this is still relevant.
|
||||
stale-pr-message: >
|
||||
This pull request has been automatically marked as stale due to inactivity.
|
||||
It will be closed if no further activity occurs.
|
||||
close-pr-message: >
|
||||
Closing this stale pull request. Please reopen when you're ready to continue.
|
||||
|
||||
Reference in New Issue
Block a user