-
Notifications
You must be signed in to change notification settings - Fork 0
Merge 'development' into 'main' #15
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
evilmooncake
wants to merge
34
commits into
main
Choose a base branch
from
development
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
Show all changes
34 commits
Select commit
Hold shift + click to select a range
e763ce0
build(requirements.txt): add initial requirements.txt
YazanShannak 5a50078
feat(Nuha): implement Nuha model inference
YazanShannak 93ed42f
feat(main.py): integrate Nuha in the predict endpoint
YazanShannak bc5fd2a
fix(main.py): login to huggingface hub
YazanShannak 63791cd
build(Dockerfile): write initial Dockerfile
YazanShannak c091c72
docs(README.md): Update README.md
YazanShannak 32ce490
feat: added original post and comments to the response
mbaraa 1f0de5d
chore: removed unnecessary async from the request handler
mbaraa 353327f
Merge pull request #2 from jordanopensource/feat/map-post-and-comment…
thamudi f1a1197
perf(requirements.txt): remove CUDA dependencies
YazanShannak 490b839
refactor(src/model.py): remove unnecessary print
YazanShannak 49402fe
build(Dockerfile): Fix some issues in the Dockerfile
YazanShannak 3d72b66
refactor(main.py-src/model.py): Refactor model output and response to…
YazanShannak 957a882
Merge pull request #3 from jordanopensource/fix/reduce-deps
thamudi 8ee9353
Merge pull request #4 from jordanopensource/fix/cleanup-print
thamudi 66ef60c
Merge pull request #5 from jordanopensource/fix/Dockerfile
thamudi 59eebd4
Merge branch 'development' into refactor/model-response
thamudi 1968f9b
Merge pull request #6 from jordanopensource/refactor/model-response
thamudi 5709268
build(requirements.txt): Add extra index for torch-cpu
YazanShannak ef6cbeb
refactor: optimize docker image from 3G to 1.4G
thamudi 778a977
build: add drone file
thamudi 19d67b1
feat: add healthcheck endpoint
thamudi 2f0776c
update critical dependencies
mbaraa a62d9e2
update less critical dependencies
mbaraa 4795379
Add Multiclass api capabilities
YazanShannak 781af62
Merge pull request #9 from jordanopensource/feature/multi-class
thamudi 5e872e8
ci(.drone.yml): use the container jsonnet template
itsmohmans 0947688
Merge pull request #12 from jordanopensource/ci/update-drone-template
itsmohmans e251f65
Add GitHub Actions workflow to schedule milestones weekly (#14)
thamudi fcce9c9
Merge branch 'main' into development
evilmooncake c55790d
chore: remove old drone file
thamudi 6b01771
builds: add new wp builds file
thamudi 6cd971e
ci: update pipeline build args
thamudi 4a0acc8
add missing CI_PIPELINE_NUMBER
thamudi 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 was deleted.
Oops, something went wrong.
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,24 @@ | ||
name: schedule-milestones | ||
|
||
on: | ||
schedule: | ||
- cron: 0 0 * * SUN # Run every Sunday at midnight | ||
|
||
jobs: | ||
generate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Schedule Milestones | ||
uses: readmeio/[email protected] | ||
id: scheduled | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
title: 'S-' | ||
days: Thursday | ||
count: 4 | ||
format: YYYY-MM-DD | ||
|
||
- name: Created Milestones | ||
run: echo ${{ steps.scheduled.outputs.milestones }} | ||
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,96 @@ | ||
when: | ||
- event: [push, manual] | ||
branch: | ||
exclude: [main] | ||
- event: [pull_request] | ||
# Only run when PR targets development or other branches (not main) | ||
evaluate: 'CI_COMMIT_TARGET_BRANCH != "main"' | ||
|
||
variables: | ||
- &docker_repo "josaorg/nuha-api" | ||
- &slack_channel "builds" | ||
# Success message template | ||
- &success_message > | ||
✅ *SUCCESS* - Latest Build #{{ build.number }} | ||
|
||
📁 *Repository:* {{ repo.name }} | ||
🌿 *Branch:* {{ build.branch }} | ||
📝 *Commit:* {{ truncate build.commit 8 }} | ||
👤 *Author:* {{ build.author }} | ||
|
||
🔗 *Links:* | ||
• <{{ build.link }}|View Build> | ||
# Failure message template | ||
- &failure_message > | ||
❌ *FAILED* - Latest Build #{{ build.number }} | ||
|
||
📁 *Repository:* {{ repo.name }} | ||
🌿 *Branch:* {{ build.branch }} | ||
📝 *Commit:* {{ truncate build.commit 8 }} | ||
👤 *Author:* {{ build.author }} | ||
|
||
🔗 *Links:* | ||
• <{{ build.link }}|View Build> | ||
|
||
steps: | ||
# Security check - scan for secrets/credentials | ||
- name: run-pre-commit-hooks | ||
image: josaorg/pre-commit-runner | ||
settings: | ||
args: "--all-files" | ||
skip: "end-of-file-fixer, yamllint" | ||
|
||
# Build latest image (development and other branches) | ||
- name: build-latest-image | ||
image: woodpeckerci/plugin-docker-buildx | ||
settings: | ||
repo: *docker_repo | ||
dockerfile: ./Dockerfile | ||
tags: | ||
- ${CI_COMMIT_SHA:-latest} | ||
- latest | ||
username: | ||
from_secret: DOCKER_HUB_USERNAME | ||
password: | ||
from_secret: DOCKER_HUB_PASSWORD | ||
build_args: | ||
CI_REPO: "${CI_REPO}" | ||
CI_REPO_NAME: "${CI_REPO_NAME}" | ||
CI_REPO_URL: "${CI_REPO_URL}" | ||
CI_COMMIT_SHA: "${CI_COMMIT_SHA}" | ||
CI_COMMIT_REF: "${CI_COMMIT_REF}" | ||
CI_PIPELINE_URL: "${CI_PIPELINE_URL}" | ||
CI_PIPELINE_CREATED: "${CI_PIPELINE_CREATED}" | ||
CI_PREV_PIPELINE_URL: "${CI_PREV_PIPELINE_URL}" | ||
CI_PIPELINE_NUMBER: "${CI_PIPELINE_NUMBER}" | ||
|
||
depends_on: | ||
- run-pre-commit-hooks | ||
|
||
# Slack notification for latest build success | ||
- name: notify-slack-latest-success | ||
image: plugins/slack | ||
settings: | ||
webhook: | ||
from_secret: SLACK_WEBHOOK | ||
channel: *slack_channel | ||
template: *success_message | ||
when: | ||
- status: success | ||
depends_on: | ||
- run-pre-commit-hooks | ||
- build-latest-image | ||
|
||
# Slack notification for latest build failure | ||
- name: notify-slack-latest-failure | ||
image: plugins/slack | ||
settings: | ||
webhook: | ||
from_secret: SLACK_WEBHOOK | ||
channel: *slack_channel | ||
template: *failure_message | ||
when: | ||
- status: failure | ||
depends_on: | ||
- run-pre-commit-hooks | ||
- build-latest-image |
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,96 @@ | ||
when: | ||
- event: [push, manual] | ||
branch: [main] | ||
- event: [pull_request] | ||
# Only run when PR targets main branch | ||
evaluate: 'CI_COMMIT_TARGET_BRANCH == "main"' | ||
# Build the source branch (not main) | ||
branch: | ||
exclude: [main] | ||
|
||
variables: | ||
- &docker_repo "josaorg/nuha-api" | ||
- &slack_channel "builds" | ||
# Success message template | ||
- &success_message > | ||
✅ *SUCCESS* - Stable Build #{{ build.number }} | ||
|
||
📁 *Repository:* {{ repo.name }} | ||
🌿 *Branch:* {{ build.branch }} | ||
📝 *Commit:* {{ truncate build.commit 8 }} | ||
👤 *Author:* {{ build.author }} | ||
|
||
🔗 *Links:* | ||
• <{{ build.link }}|View Build> | ||
# Failure message template | ||
- &failure_message > | ||
❌ *FAILED* - Stable Build #{{ build.number }} | ||
|
||
📁 *Repository:* {{ repo.name }} | ||
🌿 *Branch:* {{ build.branch }} | ||
📝 *Commit:* {{ truncate build.commit 8 }} | ||
👤 *Author:* {{ build.author }} | ||
|
||
🔗 *Links:* | ||
• <{{ build.link }}|View Build> | ||
|
||
steps: | ||
- name: run-pre-commit-hooks | ||
image: josaorg/pre-commit-runner | ||
settings: | ||
args: "--all-files" | ||
skip: "end-of-file-fixer, yamllint" | ||
|
||
# Build stable image (main branch only) | ||
- name: build-stable-image | ||
image: woodpeckerci/plugin-docker-buildx | ||
settings: | ||
repo: *docker_repo | ||
dockerfile: ./Dockerfile | ||
tags: | ||
- ${CI_COMMIT_SHA:-latest} | ||
- stable | ||
username: | ||
from_secret: DOCKER_HUB_USERNAME | ||
password: | ||
from_secret: DOCKER_HUB_PASSWORD | ||
build_args: | ||
CI_REPO: "${CI_REPO}" | ||
CI_REPO_NAME: "${CI_REPO_NAME}" | ||
CI_REPO_URL: "${CI_REPO_URL}" | ||
CI_COMMIT_SHA: "${CI_COMMIT_SHA}" | ||
CI_COMMIT_REF: "${CI_COMMIT_REF}" | ||
CI_PIPELINE_URL: "${CI_PIPELINE_URL}" | ||
CI_PIPELINE_CREATED: "${CI_PIPELINE_CREATED}" | ||
CI_PREV_PIPELINE_URL: "${CI_PREV_PIPELINE_URL}" | ||
CI_PIPELINE_NUMBER: "${CI_PIPELINE_NUMBER}" | ||
depends_on: | ||
- run-pre-commit-hooks | ||
|
||
# Slack notification for stable build success | ||
- name: notify-slack-stable-success | ||
image: plugins/slack | ||
settings: | ||
webhook: | ||
from_secret: SLACK_WEBHOOK | ||
channel: *slack_channel | ||
template: *success_message | ||
when: | ||
- status: success | ||
depends_on: | ||
- run-pre-commit-hooks | ||
- build-stable-image | ||
|
||
# Slack notification for stable build failure | ||
- name: notify-slack-stable-failure | ||
image: plugins/slack | ||
settings: | ||
webhook: | ||
from_secret: SLACK_WEBHOOK | ||
channel: *slack_channel | ||
template: *failure_message | ||
when: | ||
- status: failure | ||
depends_on: | ||
- run-pre-commit-hooks | ||
- build-stable-image |
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.
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI 5 months ago
To fix the issue, we need to add a
permissions
block to the workflow. Since the workflow uses theGITHUB_TOKEN
to create milestones, it requirescontents: read
(to read repository contents) andissues: write
(to create milestones). These permissions should be explicitly defined at the job level to ensure the workflow has only the necessary access.The
permissions
block will be added under thegenerate
job, specifyingcontents: read
andissues: write
.