Skip to content
Open
Show file tree
Hide file tree
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 Jul 30, 2023
5a50078
feat(Nuha): implement Nuha model inference
YazanShannak Jul 30, 2023
93ed42f
feat(main.py): integrate Nuha in the predict endpoint
YazanShannak Jul 30, 2023
bc5fd2a
fix(main.py): login to huggingface hub
YazanShannak Jul 30, 2023
63791cd
build(Dockerfile): write initial Dockerfile
YazanShannak Jul 30, 2023
c091c72
docs(README.md): Update README.md
YazanShannak Jul 30, 2023
32ce490
feat: added original post and comments to the response
mbaraa Aug 7, 2023
1f0de5d
chore: removed unnecessary async from the request handler
mbaraa Aug 7, 2023
353327f
Merge pull request #2 from jordanopensource/feat/map-post-and-comment…
thamudi Aug 7, 2023
f1a1197
perf(requirements.txt): remove CUDA dependencies
YazanShannak Aug 9, 2023
490b839
refactor(src/model.py): remove unnecessary print
YazanShannak Aug 9, 2023
49402fe
build(Dockerfile): Fix some issues in the Dockerfile
YazanShannak Aug 9, 2023
3d72b66
refactor(main.py-src/model.py): Refactor model output and response to…
YazanShannak Aug 9, 2023
957a882
Merge pull request #3 from jordanopensource/fix/reduce-deps
thamudi Aug 9, 2023
8ee9353
Merge pull request #4 from jordanopensource/fix/cleanup-print
thamudi Aug 9, 2023
66ef60c
Merge pull request #5 from jordanopensource/fix/Dockerfile
thamudi Aug 9, 2023
59eebd4
Merge branch 'development' into refactor/model-response
thamudi Aug 9, 2023
1968f9b
Merge pull request #6 from jordanopensource/refactor/model-response
thamudi Aug 9, 2023
5709268
build(requirements.txt): Add extra index for torch-cpu
YazanShannak Aug 9, 2023
ef6cbeb
refactor: optimize docker image from 3G to 1.4G
thamudi Aug 13, 2023
778a977
build: add drone file
thamudi Aug 13, 2023
19d67b1
feat: add healthcheck endpoint
thamudi Aug 13, 2023
2f0776c
update critical dependencies
mbaraa Nov 30, 2023
a62d9e2
update less critical dependencies
mbaraa Nov 30, 2023
4795379
Add Multiclass api capabilities
YazanShannak Jan 21, 2024
781af62
Merge pull request #9 from jordanopensource/feature/multi-class
thamudi Jan 21, 2024
5e872e8
ci(.drone.yml): use the container jsonnet template
itsmohmans Sep 2, 2024
0947688
Merge pull request #12 from jordanopensource/ci/update-drone-template
itsmohmans Sep 3, 2024
e251f65
Add GitHub Actions workflow to schedule milestones weekly (#14)
thamudi Mar 9, 2025
fcce9c9
Merge branch 'main' into development
evilmooncake May 11, 2025
c55790d
chore: remove old drone file
thamudi Jul 31, 2025
6b01771
builds: add new wp builds file
thamudi Jul 31, 2025
6cd971e
ci: update pipeline build args
thamudi Sep 30, 2025
4a0acc8
add missing CI_PIPELINE_NUMBER
thamudi Sep 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions .drone.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/schedule-milestones.yaml
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 }}
Comment on lines +9 to +24

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 5 months ago

To fix the issue, we need to add a permissions block to the workflow. Since the workflow uses the GITHUB_TOKEN to create milestones, it requires contents: read (to read repository contents) and issues: 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 the generate job, specifying contents: read and issues: write.


Suggested changeset 1
.github/workflows/schedule-milestones.yaml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/schedule-milestones.yaml b/.github/workflows/schedule-milestones.yaml
--- a/.github/workflows/schedule-milestones.yaml
+++ b/.github/workflows/schedule-milestones.yaml
@@ -8,2 +8,5 @@
   generate:
+    permissions:
+      contents: read
+      issues: write
     runs-on: ubuntu-latest
EOF
@@ -8,2 +8,5 @@
generate:
permissions:
contents: read
issues: write
runs-on: ubuntu-latest
Copilot is powered by AI and may make mistakes. Always verify output.
96 changes: 96 additions & 0 deletions .woodpecker/build-latest-image.yaml
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
96 changes: 96 additions & 0 deletions .woodpecker/build-stable-image.yaml
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