-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from Zerohertz/dev-v0.1.10
[v0.1.10] π¨ Add: Before After, Grid, Scatter, Issue PR Labeler & π Fix: Pie Chart
- Loading branch information
Showing
32 changed files
with
579 additions
and
48 deletions.
There are no files selected for viewing
This file contains 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,77 @@ | ||
name: Issue Controller | ||
|
||
on: | ||
issues: | ||
types: [opened, edited] | ||
|
||
jobs: | ||
add-labels: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Assign Zerohertz to issue | ||
if: github.event_name == 'issues' && github.event.action == 'opened' | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{secrets.GH_TOKEN}} | ||
script: | | ||
github.rest.issues.addAssignees({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
assignees: ['Zerohertz'] | ||
}) | ||
- name: Add 'fix' label | ||
if: contains(github.event.issue.title, '[Bug]') | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{secrets.GH_TOKEN}} | ||
script: | | ||
github.rest.issues.addLabels({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
labels: ['fix'] | ||
}) | ||
- name: Add 'chore' label | ||
if: contains(github.event.issue.title, '[Chore]') | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{secrets.GH_TOKEN}} | ||
script: | | ||
github.rest.issues.addLabels({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
labels: ['chore'] | ||
}) | ||
- name: Add 'style' label | ||
if: contains(github.event.issue.title, '[Style]') | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{secrets.GH_TOKEN}} | ||
script: | | ||
github.rest.issues.addLabels({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
labels: ['style'] | ||
}) | ||
- name: Add 'docs' label | ||
if: contains(github.event.issue.title, '[Docs]') | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{secrets.GH_TOKEN}} | ||
script: | | ||
github.rest.issues.addLabels({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
labels: ['docs'] | ||
}) |
This file contains 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,94 @@ | ||
name: PR Controller | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
add-labels: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Assign Zerohertz to PR | ||
if: github.event_name == 'pull_request' && github.event.action == 'opened' | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{secrets.GH_TOKEN}} | ||
script: | | ||
github.rest.issues.addAssignees({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
assignees: ['Zerohertz'] | ||
}) | ||
- name: Add labels based on file path and branch | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{secrets.GH_TOKEN}} | ||
script: | | ||
const baseBranch = context.payload.pull_request.base.ref; | ||
const headBranch = context.payload.pull_request.head.ref; | ||
const issueNumber = context.issue.number; | ||
const owner = context.repo.owner; | ||
const repo = context.repo.repo; | ||
let labelsToAdd = []; | ||
// Check for PR from dev* to master | ||
if (baseBranch === 'master' && headBranch.startsWith('dev')) { | ||
const files = await github.rest.pulls.listFiles({ | ||
owner, | ||
repo, | ||
pull_number: issueNumber | ||
}); | ||
files.data.forEach(file => { | ||
if (file.filename.startsWith('Jenkins') || file.filename.startsWith('.github/workflows')) { | ||
labelsToAdd.push('chore'); | ||
} | ||
if (file.filename.startsWith('docs')) { | ||
labelsToAdd.push('docs'); | ||
} | ||
if (file.filename.startsWith('zerohertzLib/algorithm/')) { | ||
labelsToAdd.push('feat/algorithm'); | ||
} | ||
if (file.filename.startsWith('zerohertzLib/api/')) { | ||
labelsToAdd.push('feat/api'); | ||
} | ||
if (file.filename.startsWith('zerohertzLib/logging/')) { | ||
labelsToAdd.push('feat/logging'); | ||
} | ||
if (file.filename.startsWith('zerohertzLib/mlops/')) { | ||
labelsToAdd.push('feat/mlops'); | ||
} | ||
if (file.filename.startsWith('zerohertzLib/monitoring/')) { | ||
labelsToAdd.push('feat/monitoring'); | ||
} | ||
if (file.filename.startsWith('zerohertzLib/plot/')) { | ||
labelsToAdd.push('feat/plot'); | ||
} | ||
if (file.filename.startsWith('zerohertzLib/vision/')) { | ||
labelsToAdd.push('feat/vision'); | ||
} | ||
}); | ||
} | ||
// Check for PR from docs to dev* | ||
if (baseBranch.startsWith('dev') && headBranch === 'docs') { | ||
labelsToAdd.push('docs'); | ||
} | ||
// Remove duplicates | ||
labelsToAdd = [...new Set(labelsToAdd)]; | ||
if (labelsToAdd.length > 0) { | ||
await github.rest.issues.addLabels({ | ||
issue_number: issueNumber, | ||
owner, | ||
repo, | ||
labels: labelsToAdd | ||
}); | ||
} |
This file contains 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: b86311c7586fa57666c7690e5c70b7bc | ||
config: 6fbcbe72d420881baa277b9abae1647f | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
This file contains 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 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 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 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 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
Binary file not shown.
This file contains 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 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
Oops, something went wrong.