Skip to content

Commit 33055b8

Browse files
committed
chore: janhq to menloresearch
1 parent 39e5649 commit 33055b8

File tree

62 files changed

+2260
-2411
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+2260
-2411
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ blank_issues_enabled: true
33

44
contact_links:
55
- name: "\1F4AC Jan Discussions"
6-
url: "https://github.com/orgs/janhq/discussions/categories/q-a"
6+
url: "https://github.com/orgs/menloresearch/discussions/categories/q-a"
77
about: "Get help, discuss features & roadmap, and share your projects"

.github/workflows/nightly-integrate-cortex-cpp.yml

Lines changed: 92 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -18,67 +18,67 @@ jobs:
1818
pr_created: ${{ steps.check-update.outputs.pr_created }}
1919

2020
steps:
21-
- name: Checkout repository
22-
uses: actions/checkout@v3
23-
with:
24-
submodules: recursive
25-
ref: dev
26-
fetch-depth: 0
27-
token: ${{ secrets.PAT_SERVICE_ACCOUNT }}
28-
29-
- name: Configure Git
30-
run: |
31-
git config --global user.name 'github-actions[bot]'
32-
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
33-
34-
- name: Update submodule to latest release
35-
id: check-update
36-
env:
37-
GITHUB_TOKEN: ${{ secrets.PAT_SERVICE_ACCOUNT }}
38-
run: |
39-
curl -s https://api.github.com/repos/janhq/cortex/releases > /tmp/github_api_releases.json
40-
latest_prerelease_name=$(cat /tmp/github_api_releases.json | jq -r '.[] | select(.prerelease) | .name' | head -n 1)
41-
42-
get_asset_count() {
43-
local version_name=$1
44-
cat /tmp/github_api_releases.json | jq -r --arg version_name "$version_name" '.[] | select(.name == $version_name) | .assets | length'
45-
}
46-
47-
cortex_cpp_version_file_path="extensions/inference-nitro-extension/bin/version.txt"
48-
current_version_name=$(cat "$cortex_cpp_version_file_path" | head -n 1)
49-
50-
current_version_asset_count=$(get_asset_count "$current_version_name")
51-
latest_prerelease_asset_count=$(get_asset_count "$latest_prerelease_name")
52-
53-
if [ "$current_version_name" = "$latest_prerelease_name" ]; then
54-
echo "cortex cpp remote repo doesn't have update today, skip update cortex.cpp for today nightly build"
55-
echo "::set-output name=pr_created::false"
56-
exit 0
57-
fi
58-
59-
if [ "$current_version_asset_count" != "$latest_prerelease_asset_count" ]; then
60-
echo "Latest prerelease version has different number of assets, somethink went wrong, skip update cortex.cpp for today nightly build"
61-
echo "::set-output name=pr_created::false"
62-
exit 1
63-
fi
64-
65-
echo $latest_prerelease_name > $cortex_cpp_version_file_path
66-
echo "Updated version from $current_version_name to $latest_prerelease_name."
67-
echo "::set-output name=pr_created::true"
68-
69-
git add -f $cortex_cpp_version_file_path
70-
git commit -m "Update cortex cpp nightly to version $latest_prerelease_name"
71-
branch_name="update-nightly-$(date +'%Y-%m-%d-%H-%M')"
72-
git checkout -b $branch_name
73-
git push origin $branch_name
74-
75-
pr_title="Update cortex cpp nightly to version $latest_prerelease_name"
76-
pr_body="This PR updates the Update cortex cpp nightly to version $latest_prerelease_name"
77-
78-
gh pr create --title "$pr_title" --body "$pr_body" --head $branch_name --base dev --reviewer Van-QA
79-
80-
pr_number=$(gh pr list --head $branch_name --json number --jq '.[0].number')
81-
echo "::set-output name=pr_number::$pr_number"
21+
- name: Checkout repository
22+
uses: actions/checkout@v3
23+
with:
24+
submodules: recursive
25+
ref: dev
26+
fetch-depth: 0
27+
token: ${{ secrets.PAT_SERVICE_ACCOUNT }}
28+
29+
- name: Configure Git
30+
run: |
31+
git config --global user.name 'github-actions[bot]'
32+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
33+
34+
- name: Update submodule to latest release
35+
id: check-update
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.PAT_SERVICE_ACCOUNT }}
38+
run: |
39+
curl -s https://api.github.com/repos/menloresearch/cortex/releases > /tmp/github_api_releases.json
40+
latest_prerelease_name=$(cat /tmp/github_api_releases.json | jq -r '.[] | select(.prerelease) | .name' | head -n 1)
41+
42+
get_asset_count() {
43+
local version_name=$1
44+
cat /tmp/github_api_releases.json | jq -r --arg version_name "$version_name" '.[] | select(.name == $version_name) | .assets | length'
45+
}
46+
47+
cortex_cpp_version_file_path="extensions/inference-nitro-extension/bin/version.txt"
48+
current_version_name=$(cat "$cortex_cpp_version_file_path" | head -n 1)
49+
50+
current_version_asset_count=$(get_asset_count "$current_version_name")
51+
latest_prerelease_asset_count=$(get_asset_count "$latest_prerelease_name")
52+
53+
if [ "$current_version_name" = "$latest_prerelease_name" ]; then
54+
echo "cortex cpp remote repo doesn't have update today, skip update cortex.cpp for today nightly build"
55+
echo "::set-output name=pr_created::false"
56+
exit 0
57+
fi
58+
59+
if [ "$current_version_asset_count" != "$latest_prerelease_asset_count" ]; then
60+
echo "Latest prerelease version has different number of assets, somethink went wrong, skip update cortex.cpp for today nightly build"
61+
echo "::set-output name=pr_created::false"
62+
exit 1
63+
fi
64+
65+
echo $latest_prerelease_name > $cortex_cpp_version_file_path
66+
echo "Updated version from $current_version_name to $latest_prerelease_name."
67+
echo "::set-output name=pr_created::true"
68+
69+
git add -f $cortex_cpp_version_file_path
70+
git commit -m "Update cortex cpp nightly to version $latest_prerelease_name"
71+
branch_name="update-nightly-$(date +'%Y-%m-%d-%H-%M')"
72+
git checkout -b $branch_name
73+
git push origin $branch_name
74+
75+
pr_title="Update cortex cpp nightly to version $latest_prerelease_name"
76+
pr_body="This PR updates the Update cortex cpp nightly to version $latest_prerelease_name"
77+
78+
gh pr create --title "$pr_title" --body "$pr_body" --head $branch_name --base dev --reviewer Van-QA
79+
80+
pr_number=$(gh pr list --head $branch_name --json number --jq '.[0].number')
81+
echo "::set-output name=pr_number::$pr_number"
8282
8383
check-and-merge-pr:
8484
needs: update-submodule
@@ -89,39 +89,39 @@ jobs:
8989
pull-requests: write
9090

9191
steps:
92-
- name: Checkout repository
93-
uses: actions/checkout@v3
94-
with:
95-
submodules: recursive
96-
fetch-depth: 0
97-
token: ${{ secrets.PAT_SERVICE_ACCOUNT }}
98-
99-
- name: Wait for CI to pass
100-
env:
92+
- name: Checkout repository
93+
uses: actions/checkout@v3
94+
with:
95+
submodules: recursive
96+
fetch-depth: 0
97+
token: ${{ secrets.PAT_SERVICE_ACCOUNT }}
98+
99+
- name: Wait for CI to pass
100+
env:
101101
GITHUB_TOKEN: ${{ secrets.PAT_SERVICE_ACCOUNT }}
102-
run: |
103-
pr_number=${{ needs.update-submodule.outputs.pr_number }}
104-
while true; do
105-
ci_completed=$(gh pr checks $pr_number --json completedAt --jq '.[].completedAt')
106-
if echo "$ci_completed" | grep -q "0001-01-01T00:00:00Z"; then
107-
echo "CI is still running, waiting..."
108-
sleep 60
109-
else
110-
echo "CI has completed, checking states..."
111-
ci_states=$(gh pr checks $pr_number --json state --jq '.[].state')
112-
if echo "$ci_states" | grep -vqE "SUCCESS|SKIPPED"; then
113-
echo "CI failed, exiting..."
114-
exit 1
102+
run: |
103+
pr_number=${{ needs.update-submodule.outputs.pr_number }}
104+
while true; do
105+
ci_completed=$(gh pr checks $pr_number --json completedAt --jq '.[].completedAt')
106+
if echo "$ci_completed" | grep -q "0001-01-01T00:00:00Z"; then
107+
echo "CI is still running, waiting..."
108+
sleep 60
115109
else
116-
echo "CI passed, merging PR..."
117-
break
110+
echo "CI has completed, checking states..."
111+
ci_states=$(gh pr checks $pr_number --json state --jq '.[].state')
112+
if echo "$ci_states" | grep -vqE "SUCCESS|SKIPPED"; then
113+
echo "CI failed, exiting..."
114+
exit 1
115+
else
116+
echo "CI passed, merging PR..."
117+
break
118+
fi
118119
fi
119-
fi
120-
done
120+
done
121121
122-
- name: Merge the PR
123-
env:
122+
- name: Merge the PR
123+
env:
124124
GITHUB_TOKEN: ${{ secrets.PAT_SERVICE_ACCOUNT }}
125-
run: |
126-
pr_number=${{ needs.update-submodule.outputs.pr_number }}
127-
gh pr merge $pr_number --merge --admin
125+
run: |
126+
pr_number=${{ needs.update-submodule.outputs.pr_number }}
127+
gh pr merge $pr_number --merge --admin

.github/workflows/template-get-update-version.yml

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -13,46 +13,46 @@ jobs:
1313
outputs:
1414
new_version: ${{ steps.version_update.outputs.new_version }}
1515
steps:
16-
- name: Install jq
17-
uses: dcarbone/[email protected]
16+
- name: Install jq
17+
uses: dcarbone/[email protected]
1818

19-
- name: Get tag
20-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
21-
id: tag
22-
uses: dawidd6/action-get-tag@v1
19+
- name: Get tag
20+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
21+
id: tag
22+
uses: dawidd6/action-get-tag@v1
2323

24-
- name: Update app version based on latest release tag with build number
25-
id: version_update
26-
run: |
27-
# Function to get the latest release tag
28-
get_latest_tag() {
29-
local retries=0
30-
local max_retries=3
31-
local tag
32-
while [ $retries -lt $max_retries ]; do
33-
tag=$(curl -s https://api.github.com/repos/janhq/jan/releases/latest | jq -r .tag_name)
34-
if [ -n "$tag" ] && [ "$tag" != "null" ]; then
35-
echo $tag
36-
return
37-
else
38-
let retries++
39-
echo "Retrying... ($retries/$max_retries)"
40-
sleep 2
41-
fi
42-
done
43-
echo "Failed to fetch latest tag after $max_retries attempts."
44-
exit 1
45-
}
24+
- name: Update app version based on latest release tag with build number
25+
id: version_update
26+
run: |
27+
# Function to get the latest release tag
28+
get_latest_tag() {
29+
local retries=0
30+
local max_retries=3
31+
local tag
32+
while [ $retries -lt $max_retries ]; do
33+
tag=$(curl -s https://api.github.com/repos/menloresearch/jan/releases/latest | jq -r .tag_name)
34+
if [ -n "$tag" ] && [ "$tag" != "null" ]; then
35+
echo $tag
36+
return
37+
else
38+
let retries++
39+
echo "Retrying... ($retries/$max_retries)"
40+
sleep 2
41+
fi
42+
done
43+
echo "Failed to fetch latest tag after $max_retries attempts."
44+
exit 1
45+
}
4646
47-
if ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}; then
48-
echo "Tag detected, set output follow tag"
49-
echo "::set-output name=new_version::${{ steps.tag.outputs.tag }}"
50-
else
51-
# Get the latest release tag from GitHub API
52-
LATEST_TAG=$(get_latest_tag)
53-
54-
# Remove the 'v' and append the build number to the version
55-
new_version="${LATEST_TAG#v}-${GITHUB_RUN_NUMBER}"
56-
echo "New version: $new_version"
57-
echo "::set-output name=new_version::$new_version"
58-
fi
47+
if ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}; then
48+
echo "Tag detected, set output follow tag"
49+
echo "::set-output name=new_version::${{ steps.tag.outputs.tag }}"
50+
else
51+
# Get the latest release tag from GitHub API
52+
LATEST_TAG=$(get_latest_tag)
53+
54+
# Remove the 'v' and append the build number to the version
55+
new_version="${LATEST_TAG#v}-${GITHUB_RUN_NUMBER}"
56+
echo "New version: $new_version"
57+
echo "::set-output name=new_version::$new_version"
58+
fi

.github/workflows/template-noti-discord-and-update-url-readme.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Checkout code
3535
uses: actions/checkout@v3
3636
with:
37-
fetch-depth: "0"
37+
fetch-depth: '0'
3838
token: ${{ secrets.PAT_SERVICE_ACCOUNT }}
3939
ref: ${{ inputs.ref }}
4040

@@ -51,6 +51,6 @@ jobs:
5151
- macOS Universal: https://delta.jan.ai/nightly/jan-nightly-mac-universal-{{ VERSION }}.dmg
5252
- Linux Deb: https://delta.jan.ai/nightly/jan-nightly-linux-amd64-{{ VERSION }}.deb
5353
- Linux AppImage: https://delta.jan.ai/nightly/jan-nightly-linux-x86_64-{{ VERSION }}.AppImage
54-
- Github action run: https://github.com/janhq/jan/actions/runs/{{ GITHUB_RUN_ID }}
54+
- Github action run: https://github.com/menloresearch/jan/actions/runs/{{ GITHUB_RUN_ID }}
5555
env:
56-
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
56+
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ First off, thank you for considering contributing to jan. It's people like you t
66

77
### Reporting Bugs
88

9-
- **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/janhq/jan/issues).
10-
- If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/janhq/jan/issues/new).
9+
- **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/menloresearch/jan/issues).
10+
- If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/menloresearch/jan/issues/new).
1111

1212
### Suggesting Enhancements
1313

@@ -29,4 +29,4 @@ First off, thank you for considering contributing to jan. It's people like you t
2929

3030
## Additional Notes
3131

32-
Thank you for contributing to jan!
32+
Thank you for contributing to jan!

0 commit comments

Comments
 (0)