mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-19 12:47:06 +08:00
Merge remote-tracking branch 'upstream/main'
This commit is contained in:
commit
79db8762af
13
.github/sync.yml
vendored
13
.github/sync.yml
vendored
@ -67,6 +67,10 @@ group:
|
|||||||
- repos: |
|
- repos: |
|
||||||
OpenIMSDK/OpenKF@main
|
OpenIMSDK/OpenKF@main
|
||||||
OpenIMSDK/openim-miniprogram-demo@main
|
OpenIMSDK/openim-miniprogram-demo@main
|
||||||
|
OpenIMSDK/docs
|
||||||
|
OpenIMSDK/chat
|
||||||
|
OpenIMSDK/community
|
||||||
|
OpenIMSDK/openim-charts
|
||||||
OpenIMSDK/openim-sdk-cpp@main
|
OpenIMSDK/openim-sdk-cpp@main
|
||||||
files:
|
files:
|
||||||
- source: LICENSE
|
- source: LICENSE
|
||||||
@ -87,6 +91,15 @@ group:
|
|||||||
- source: .github/.codecov.yml
|
- source: .github/.codecov.yml
|
||||||
dest: .github/.codecov.yml
|
dest: .github/.codecov.yml
|
||||||
replace: false
|
replace: false
|
||||||
|
- source: .github/workflows/cla.yml
|
||||||
|
dest: .github/workflows/cla.yml
|
||||||
|
replace: false
|
||||||
|
- source: .github/workflows/auto-assign-issue.yml
|
||||||
|
dest: .github/workflows/auto-assign-issue.yml
|
||||||
|
replace: false
|
||||||
|
- source: .github/workflows/release.yml
|
||||||
|
dest: .github/workflows/release.yml
|
||||||
|
replace: false
|
||||||
- source: ./scripts/githooks/
|
- source: ./scripts/githooks/
|
||||||
dest: ./scripts/githooks/
|
dest: ./scripts/githooks/
|
||||||
replace: true
|
replace: true
|
||||||
14
.github/workflows/auto-assign-issue.yml
vendored
14
.github/workflows/auto-assign-issue.yml
vendored
@ -2,24 +2,28 @@ name: Assign issue to comment author
|
|||||||
on:
|
on:
|
||||||
issue_comment:
|
issue_comment:
|
||||||
types: [created]
|
types: [created]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
assign-issue:
|
assign-issue:
|
||||||
if: contains(github.event.comment.body, '/assign') || contains(github.event.comment.body, '/accept')
|
if: |
|
||||||
|
contains(github.event.comment.body, '/assign') || contains(github.event.comment.body, '/accept') &&
|
||||||
|
!contains(github.event.comment.user.login, 'openimbot') &&
|
||||||
|
!contains(github.event.comment.user.login, 'kubbot')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
issues: write
|
issues: write
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Assign the issue
|
- name: Assign the issue
|
||||||
run: |
|
run: |
|
||||||
|
export LETASE_MILESTONES=$(curl 'https://api.github.com/repos/$OWNER/$PEPO/milestones' | jq -r 'last(.[]).title')
|
||||||
gh issue edit ${{ github.event.issue.number }} --add-assignee "${{ github.event.comment.user.login }}"
|
gh issue edit ${{ github.event.issue.number }} --add-assignee "${{ github.event.comment.user.login }}"
|
||||||
gh issue edit ${{ github.event.issue.number }} --add-label "triage/accepted"
|
gh issue edit ${{ github.event.issue.number }} --add-label "triage/accepted"
|
||||||
gh issue comment $ISSUE --body "@${{ github.event.comment.user.login }}, this issue has been assigned to you. We are looking forward to your PR!"
|
gh issue edit ${{ github.event.issue.number }} --milestone "$LETASE_MILESTONES"
|
||||||
|
gh issue comment $ISSUE --body "@${{ github.event.comment.user.login }} Glad to see you accepted this issue🤲, this issue has been assigned to you. I set the milestones for this issue to [$LETASE_MILESTONES](https://github.com/$OWNER/$PEPO/milestones), We are looking forward to your PR!"
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.REDBOT_GITHUB_TOKEN }}
|
||||||
ISSUE: ${{ github.event.issue.html_url }}
|
ISSUE: ${{ github.event.issue.html_url }}
|
||||||
OWNER: ${{ github.repository_owner }}
|
OWNER: ${{ github.repository_owner }}
|
||||||
REPO: ${{ github.event.repository.name }}
|
REPO: ${{ github.event.repository.name }}
|
||||||
57
.github/workflows/auto-gh-pr.yml
vendored
Normal file
57
.github/workflows/auto-gh-pr.yml
vendored
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
name: Auto PR to release
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
# types:
|
||||||
|
# - closed
|
||||||
|
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.REDBOT_GITHUB_TOKEN }}
|
||||||
|
ISSUE: ${{ github.event.issue.html_url }}
|
||||||
|
OWNER: ${{ github.repository_owner }}
|
||||||
|
REPO: ${{ github.event.repository.name }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
create-pr:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main'
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup GitHub CLI
|
||||||
|
run: |
|
||||||
|
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0
|
||||||
|
sudo apt-add-repository https://cli.github.com/packages
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install gh
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Configure GitHub CLI
|
||||||
|
run: |
|
||||||
|
git config --global user.email "3293172751ysy@gmail.com"
|
||||||
|
git config --global user.name "kubbot"
|
||||||
|
echo "${{ secrets.BOT_GITHUB_TOKEN }}" | gh auth login --with-token
|
||||||
|
- name: Create PR to release branch
|
||||||
|
run: |
|
||||||
|
ISSUEID=$(gh pr view 642 --repo $OWNER/$REPO | grep -oP 'Fixes #\K\d+')
|
||||||
|
echo "===========> $ISSUEID"
|
||||||
|
ISSUE=$(gh issue view $ISSUEID --repo $OWNER/$REPO --json labels,assignees,milestone,title)
|
||||||
|
echo "===========> $ISSUE"
|
||||||
|
|
||||||
|
LABELS=$(echo $ISSUE | jq -r '.labels[] | select(.name) | .name' | jq -R -r -s -c 'split("\n")[:-1] | join(",")')
|
||||||
|
ASSIGNEES=$(echo $ISSUE | jq -r '.assignees[] | select(.login) | .login' | jq -R -s -c 'split("\n")[:-1] | join(",")')
|
||||||
|
MILESTONE=$(echo $ISSUE | jq -r '.milestone | select(.title) | .title')
|
||||||
|
TITLE=$(echo $ISSUE | jq -r '.title')
|
||||||
|
|
||||||
|
echo $ISSUE | jq
|
||||||
|
|
||||||
|
gh pr edit ${{ github.event.pull_request.number }} --repo $OWNER/$REPO --add-label "$LABELS" --add-assignee "$ASSIGNEES" --milestone "$MILESTONE"
|
||||||
|
|
||||||
|
git checkout -b bot/merge-to-release-$ISSUEID
|
||||||
|
git push origin bot/merge-to-release-$ISSUEID
|
||||||
|
gh pr create --base release --head bot/merge-to-release-$ISSUEID --title "Merge main to release" --body ""
|
||||||
|
|
||||||
|
# gh pr create --base main --head feat/auto-release-pr-624 --title "The bug is fixed" --body "$x" --repo OpenIMSDK/Open-IM-Server --reviewer "cubxxw"
|
||||||
26
.github/workflows/auto-release.yml
vendored
26
.github/workflows/auto-release.yml
vendored
@ -1,26 +0,0 @@
|
|||||||
name: Automatic Rebase
|
|
||||||
on:
|
|
||||||
issue_comment:
|
|
||||||
types: [created]
|
|
||||||
jobs:
|
|
||||||
rebase:
|
|
||||||
name: Rebase
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: >-
|
|
||||||
github.event.issue.pull_request != '' &&
|
|
||||||
(
|
|
||||||
contains(github.event.comment.body, '/rebase') ||
|
|
||||||
contains(github.event.comment.body, '/autosquash')
|
|
||||||
)
|
|
||||||
steps:
|
|
||||||
- name: Checkout the latest code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
|
||||||
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
|
|
||||||
- name: Automatic Rebase
|
|
||||||
uses: cirrus-actions/rebase@1.8
|
|
||||||
with:
|
|
||||||
autosquash: ${{ contains(github.event.comment.body, '/autosquash') || contains(github.event.comment.body, '/rebase-autosquash') }}
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
|
|
||||||
78
.github/workflows/check-coverage.yml
vendored
78
.github/workflows/check-coverage.yml
vendored
@ -1,45 +1,45 @@
|
|||||||
# name: Check-Coverage
|
name: Check-Coverage
|
||||||
|
|
||||||
# on:
|
on:
|
||||||
# workflow_dispatch:
|
workflow_dispatch:
|
||||||
# push:
|
push:
|
||||||
# branches: [ "main" ]
|
branches: [ "main" ]
|
||||||
# paths-ignore:
|
paths-ignore:
|
||||||
# - "docs/**"
|
- "docs/**"
|
||||||
# - "**/*.md"
|
- "**/*.md"
|
||||||
# - "**/*.yaml"
|
- "**/*.yaml"
|
||||||
# - "CONTRIBUTORS"
|
- "CONTRIBUTORS"
|
||||||
# - "CHANGELOG/**"
|
- "CHANGELOG/**"
|
||||||
# pull_request:
|
pull_request:
|
||||||
# branches: [ "*" ]
|
branches: [ "*" ]
|
||||||
# paths-ignore:
|
paths-ignore:
|
||||||
# - "docs/**"
|
- "docs/**"
|
||||||
# - "**/*.md"
|
- "**/*.md"
|
||||||
# - "**/*.yaml"
|
- "**/*.yaml"
|
||||||
# - "CONTRIBUTORS"
|
- "CONTRIBUTORS"
|
||||||
# - "CHANGELOG/**"
|
- "CHANGELOG/**"
|
||||||
# env:
|
env:
|
||||||
# # Common versions
|
# Common versions
|
||||||
# GO_VERSION: "1.20"
|
GO_VERSION: "1.20"
|
||||||
|
|
||||||
# jobs:
|
jobs:
|
||||||
# coverage:
|
coverage:
|
||||||
# runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
# steps:
|
steps:
|
||||||
# - name: Checkout
|
- name: Checkout
|
||||||
# uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
# - name: Setup Golang with cache
|
- name: Setup Golang with cache
|
||||||
# uses: magnetikonline/action-golang-cache@v3
|
uses: magnetikonline/action-golang-cache@v3
|
||||||
# with:
|
with:
|
||||||
# go-version: ${{ env.GO_VERSION }}
|
go-version: ${{ env.GO_VERSION }}
|
||||||
# token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
# - name: Install Dependencies
|
- name: Install Dependencies
|
||||||
# run: sudo apt update && sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev
|
run: sudo apt update && sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev
|
||||||
|
|
||||||
# - name: Run Cover
|
- name: Run Cover
|
||||||
# run: make cover
|
run: make cover
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
# - name: Upload Coverage to Codecov
|
- name: Upload Coverage to Codecov
|
||||||
# uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@v3
|
||||||
|
|||||||
18
.github/workflows/cla.yml
vendored
18
.github/workflows/cla.yml
vendored
@ -14,13 +14,12 @@ permissions:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
# Define Open-IM-Server variables here
|
# Define Open-IM-Server variables here
|
||||||
REMOTE_ORGANIZATION: open-im-server
|
|
||||||
REMOTE_REPOSITORY: cla
|
|
||||||
|
|
||||||
OPEN_IM_SERVER_CLA_DOCUMENT: https://github.com/openim-sigs/cla/blob/main/README.md
|
|
||||||
OPEN_IM_SERVER_SIGNATURES_PATH: signatures/openim-server/cla.json
|
|
||||||
OPEN_IM_SERVER_ALLOWLIST: kubbot,bot*
|
|
||||||
OPEN_IM_SERVER_REMOTE_ORGANIZATION: openim-sigs
|
OPEN_IM_SERVER_REMOTE_ORGANIZATION: openim-sigs
|
||||||
|
REMOTE_REPOSITORY: cla
|
||||||
|
OPEN_IM_SERVER_CLA_DOCUMENT: https://github.com/openim-sigs/cla/blob/main/README.md
|
||||||
|
OPEN_IM_SERVER_SIGNATURES_PATH: signatures/${{ github.event.repository.name }}/cla.json
|
||||||
|
|
||||||
|
OPEN_IM_SERVER_ALLOWLIST: kubbot,bot*
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
CLAAssistant:
|
CLAAssistant:
|
||||||
@ -40,9 +39,10 @@ jobs:
|
|||||||
|
|
||||||
remote-organization-name: ${{ env.OPEN_IM_SERVER_REMOTE_ORGANIZATION }}
|
remote-organization-name: ${{ env.OPEN_IM_SERVER_REMOTE_ORGANIZATION }}
|
||||||
remote-repository-name: ${{ env.REMOTE_REPOSITORY }}
|
remote-repository-name: ${{ env.REMOTE_REPOSITORY }}
|
||||||
create-file-commit-message: '📚 Docs: Creating file for storing ${{ env.REMOTE_ORGANIZATION }} CLA Signatures'
|
|
||||||
custom-notsigned-prcomment: '💕 Thank you for your contribution and please kindly read and sign our [🎯https://github.com/openim-sigs/cla/blob/main/README.md](https://github.com/openim-sigs/cla/blob/main/README.md)'
|
create-file-commit-message: '📚 Docs: Creating file for storing ${{ github.event.repository.name }} CLA Signatures'
|
||||||
|
custom-notsigned-prcomment: '💕 Thank you for your contribution and please kindly read and sign our [🎯https://github.com/openim-sigs/cla/blob/main/README.md](https://github.com/openim-sigs/cla/blob/main/README.md). <br> If you wish to sign the CRA, **Please copy and comment on the following sentence:**'
|
||||||
custom-pr-sign-comment: 'I have read the CLA Document and I hereby sign the CLA'
|
custom-pr-sign-comment: 'I have read the CLA Document and I hereby sign the CLA'
|
||||||
custom-allsigned-prcomment: '🤖 All Contributors have signed the ${{ env.REMOTE_ORGANIZATION }} [CLA](https://github.com/openim-sigs/cla/blob/main/README.md).'
|
custom-allsigned-prcomment: '🤖 All Contributors have signed the [${{ github.event.repository.name }} CLA](https://github.com/openim-sigs/cla/blob/main/README.md).<br> The signed information is recorded [🤖here](https://github.com/openim-sigs/cla/tree/main/signatures/${{ github.event.repository.name }}/cla.json)'
|
||||||
# lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true)
|
# lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true)
|
||||||
# use-dco-flag: true - If you are using DCO instead of CLA
|
# use-dco-flag: true - If you are using DCO instead of CLA
|
||||||
|
|||||||
2
.github/workflows/e2e-test.yml
vendored
2
.github/workflows/e2e-test.yml
vendored
@ -1,2 +1,2 @@
|
|||||||
|
|
||||||
# name: OpenIM e2e Test
|
# name: OpenIM e2e Test
|
||||||
|
|
||||||
|
|||||||
3
.github/workflows/link-pr.yml
vendored
3
.github/workflows/link-pr.yml
vendored
@ -4,6 +4,9 @@ name: Github Rebot for Link check error
|
|||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '30 12 * * 1'
|
- cron: '30 12 * * 1'
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
linkChecker:
|
linkChecker:
|
||||||
|
|||||||
8
.github/workflows/openimci.yml
vendored
8
.github/workflows/openimci.yml
vendored
@ -90,11 +90,19 @@ jobs:
|
|||||||
echo "Run unit test and get test coverage successfully"
|
echo "Run unit test and get test coverage successfully"
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v2
|
||||||
|
with:
|
||||||
|
languages: go
|
||||||
|
|
||||||
- name: Build source code for host platform
|
- name: Build source code for host platform
|
||||||
run: |
|
run: |
|
||||||
sudo make build
|
sudo make build
|
||||||
echo "Build source code for host platform successfully"
|
echo "Build source code for host platform successfully"
|
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@v2
|
||||||
|
|
||||||
- name: OpenIM verify copyright
|
- name: OpenIM verify copyright
|
||||||
run: |
|
run: |
|
||||||
sudo make verify-copyright
|
sudo make verify-copyright
|
||||||
|
|||||||
4
.github/workflows/project-progress.yml
vendored
4
.github/workflows/project-progress.yml
vendored
@ -31,6 +31,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: alex-page/github-project-automation-plus@v0.8.3
|
- uses: alex-page/github-project-automation-plus@v0.8.3
|
||||||
with:
|
with:
|
||||||
project: OpenIM 2023 Sprint 🔥
|
project: OpenIM-V3.1
|
||||||
column: In Progress
|
column: In Progress
|
||||||
repo-token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
39
.github/workflows/pull-request.yml
vendored
Normal file
39
.github/workflows/pull-request.yml
vendored
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
name: Github Pull Request
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
paths-ignore:
|
||||||
|
- 'README.md'
|
||||||
|
- 'CONTRIBUTING.md'
|
||||||
|
|
||||||
|
- 'docs/**'
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
paths-ignore:
|
||||||
|
- 'README.md'
|
||||||
|
- 'CONTRIBUTING.md'
|
||||||
|
- 'docs/**'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
- name: Create Pull Request
|
||||||
|
uses: peter-evans/create-pull-request@v5
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||||
|
commit-message: 'build: update distribution'
|
||||||
|
title: 'build: update distribution'
|
||||||
|
body: |
|
||||||
|
- Updates the distribution for changes on `main`
|
||||||
|
|
||||||
|
Auto-generated by [create-pull-request][1]
|
||||||
|
|
||||||
|
[1]: https://github.com/OpenIMSDK/Open-IM-Sever
|
||||||
|
branch: 'bot/update-distribution'
|
||||||
@ -58,6 +58,7 @@ run:
|
|||||||
skip-files:
|
skip-files:
|
||||||
- ".*\\.my\\.go$"
|
- ".*\\.my\\.go$"
|
||||||
- _test.go
|
- _test.go
|
||||||
|
- ".*\\.pb\\.go"
|
||||||
|
|
||||||
# by default isn't set. If set we pass it to "go list -mod={option}". From "go help modules":
|
# by default isn't set. If set we pass it to "go list -mod={option}". From "go help modules":
|
||||||
# If invoked with -mod=readonly, the go command is disallowed from the implicit
|
# If invoked with -mod=readonly, the go command is disallowed from the implicit
|
||||||
|
|||||||
@ -2,28 +2,28 @@
|
|||||||
# Each line is a file pattern followed by one or more owners.
|
# Each line is a file pattern followed by one or more owners.
|
||||||
|
|
||||||
# README files
|
# README files
|
||||||
README.md @cubxxw @kubbot @Bloomingg @FGadvancer @hrxiang @Oliver-WJ @skiffer-git @std-s @wangchuxiao-dev @withchao
|
README.md @openimsdk/openim @cubxxw @openimsdk/bot @Bloomingg @FGadvancer @skiffer-git @wangchuxiao-dev @withchao
|
||||||
|
|
||||||
# Contributing guidelines
|
# Contributing guidelines
|
||||||
CONTRIBUTING.md @cubxxw @kubbot @Bloomingg @FGadvancer @hrxiang @Oliver-WJ @skiffer-git @std-s @wangchuxiao-dev @withchao
|
CONTRIBUTING.md @cubxxw @openimsdk/bot @Bloomingg @FGadvancer @skiffer-git @wangchuxiao-dev @withchao
|
||||||
|
|
||||||
# License files
|
# License files
|
||||||
LICENSE @cubxxw @kubbot @Bloomingg @FGadvancer @hrxiang @Oliver-WJ @skiffer-git @std-s @wangchuxiao-dev @withchao
|
LICENSE @cubxxw @openimsdk/bot @Bloomingg @FGadvancer @skiffer-git @wangchuxiao-dev @withchao
|
||||||
|
|
||||||
# Makefile
|
# Makefile
|
||||||
Makefile @cubxxw @kubbot @Bloomingg @FGadvancer @hrxiang @Oliver-WJ @skiffer-git @std-s @wangchuxiao-dev @withchao
|
Makefile @cubxxw @openimsdk/bot @Bloomingg @FGadvancer @skiffer-git @wangchuxiao-dev @withchao
|
||||||
|
|
||||||
# These owners will be the default owners for everything in
|
# These owners will be the default owners for everything in
|
||||||
# the repo. Unless a later match takes precedence,
|
# the repo. Unless a later match takes precedence,
|
||||||
# @cubxxw and @kubbot will be requested for
|
# @cubxxw and @openimsdk/bot will be requested for
|
||||||
# review when someone opens a pull request.
|
# review when someone opens a pull request.
|
||||||
* @cubxxw @kubbot @Bloomingg @FGadvancer @hrxiang @Oliver-WJ @skiffer-git @std-s @wangchuxiao-dev @withchao
|
* @openimsdk/openim @cubxxw @openimsdk/bot @Bloomingg @FGadvancer @skiffer-git @wangchuxiao-dev @withchao
|
||||||
|
|
||||||
# Order is important; the last matching pattern takes the most
|
# Order is important; the last matching pattern takes the most
|
||||||
# precedence. When someone opens a pull request that only
|
# precedence. When someone opens a pull request that only
|
||||||
# modifies JS files, only @js-owner and not the global
|
# modifies JS files, only @js-owner and not the global
|
||||||
# owner(s) will be requested for a review.
|
# owner(s) will be requested for a review.
|
||||||
*.js @cubxxw @kubbot @Bloomingg @FGadvancer @hrxiang @Oliver-WJ @skiffer-git @std-s @wangchuxiao-dev @withchao
|
*.js @cubxxw @openimsdk/bot @Bloomingg @FGadvancer @skiffer-git @wangchuxiao-dev @withchao
|
||||||
|
|
||||||
# You can also use email addresses if you prefer. They'll be
|
# You can also use email addresses if you prefer. They'll be
|
||||||
# used to look up users just like we do for commit author
|
# used to look up users just like we do for commit author
|
||||||
@ -35,16 +35,16 @@ Makefile @cubxxw @kubbot @Bloomingg @FGadvancer @hrxiang @Oliver-WJ @skiffer-
|
|||||||
# be identified in the format @org/team-name. Teams must have
|
# be identified in the format @org/team-name. Teams must have
|
||||||
# explicit write access to the repository. In this example,
|
# explicit write access to the repository. In this example,
|
||||||
# the OpenIMSDK team in the github organization owns all .txt files.
|
# the OpenIMSDK team in the github organization owns all .txt files.
|
||||||
*.txt @cubxxw @kubbot @Bloomingg @FGadvancer @hrxiang @Oliver-WJ @skiffer-git @std-s @wangchuxiao-dev @withchao
|
*.txt @cubxxw @openimsdk/bot @Bloomingg @FGadvancer @skiffer-git @wangchuxiao-dev @withchao
|
||||||
|
|
||||||
# The `docs/*` pattern will match files like
|
# The `docs/*` pattern will match files like
|
||||||
# `docs/getting-started.md` but not further nested files like
|
# `docs/getting-started.md` but not further nested files like
|
||||||
# `docs/build-app/troubleshooting.md`.
|
# `docs/build-app/troubleshooting.md`.
|
||||||
docs/* 3293172751nss@gmail.com @kubbot @skiffer-git
|
docs/* 3293172751nss@gmail.com @openimsdk/bot @skiffer-git
|
||||||
|
|
||||||
# In this example, @octocat owns any file in an apps directory
|
# In this example, @octocat owns any file in an apps directory
|
||||||
# anywhere in your repository.
|
# anywhere in your repository.
|
||||||
api/ @cubxxw @IRONICBo @skiffer-git
|
api/ @openimsdk/openim @cubxxw @skiffer-git
|
||||||
|
|
||||||
# This is a comment.
|
# This is a comment.
|
||||||
# Each line is a file pattern followed by one or more owners.
|
# Each line is a file pattern followed by one or more owners.
|
||||||
@ -65,24 +65,24 @@ cmd/*
|
|||||||
config/* @skiffer-git
|
config/* @skiffer-git
|
||||||
|
|
||||||
# db directory
|
# db directory
|
||||||
db/sdk @77caleb @BanTanger @cubxxw @Gordon
|
db/sdk @BanTanger @cubxxw @Gordon
|
||||||
|
|
||||||
# internal directory
|
# internal directory
|
||||||
internal/ @skiffer-git @FGadvancer
|
internal/ @openimsdk/openim @skiffer-git @FGadvancer
|
||||||
|
|
||||||
# logs directory
|
# logs directory
|
||||||
logs/* @skiffer-git @FGadvancer
|
logs/* @skiffer-git @FGadvancer
|
||||||
|
|
||||||
# pkg directory
|
# pkg directory
|
||||||
pkg/a2r @skiffer-git
|
pkg/a2r @openimsdk/openim @skiffer-git @cubxxw @openimsdk/bot
|
||||||
|
|
||||||
# scripts directory
|
# scripts directory
|
||||||
scripts/LICENSE/* @cubxxw @skiffer-git @FGadvancer
|
scripts/LICENSE/* @openimsdk/openim @cubxxw @skiffer-git @FGadvancer
|
||||||
scripts/enterprise/* @FGadvancer @cubxxw @skiffer-git @kubbot
|
scripts/enterprise/* @openimsdk/openim @FGadvancer @cubxxw @skiffer-git @openimsdk/bot
|
||||||
scripts/githooks/* @cubxxw @skiffer-git @FGadvancer
|
scripts/githooks/* @openimsdk/openim @cubxxw @skiffer-git @FGadvancer
|
||||||
scripts/lib/* @FGadvancer @cubxxw @skiffer-git @kubbot
|
scripts/lib/* @openimsdk/openim @FGadvancer @cubxxw @skiffer-git @openimsdk/bot
|
||||||
scripts/make-rules/* @FGadvancer @cubxxw @skiffer-git @kubbot
|
scripts/make-rules/* @openimsdk/openim @FGadvancer @cubxxw @skiffer-git @openimsdk/bot
|
||||||
|
|
||||||
# test directory
|
# test directory
|
||||||
test/mongo @FGadvancer @cubxxw @skiffer-git @kubbot
|
test/mongo @FGadvancer @cubxxw @skiffer-git @openimsdk/bot
|
||||||
test/mysql @FGadvancer @cubxxw @skiffer-git @kubbot
|
test/mysql @FGadvancer @cubxxw @skiffer-git @openimsdk/bot
|
||||||
|
|||||||
@ -18,12 +18,12 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
)
|
)
|
||||||
|
|
||||||
// OfflinePusher Offline Pusher
|
// OfflinePusher Offline Pusher.
|
||||||
type OfflinePusher interface {
|
type OfflinePusher interface {
|
||||||
Push(ctx context.Context, userIDs []string, title, content string, opts *Opts) error
|
Push(ctx context.Context, userIDs []string, title, content string, opts *Opts) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// Opts opts
|
// Opts opts.
|
||||||
type Opts struct {
|
type Opts struct {
|
||||||
Signal *Signal
|
Signal *Signal
|
||||||
IOSPushSound string
|
IOSPushSound string
|
||||||
@ -31,7 +31,7 @@ type Opts struct {
|
|||||||
Ex string
|
Ex string
|
||||||
}
|
}
|
||||||
|
|
||||||
// Signal message id
|
// Signal message id.
|
||||||
type Signal struct {
|
type Signal struct {
|
||||||
ClientMsgID string
|
ClientMsgID string
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,6 +16,7 @@ package wrapperspb
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
@ -211,15 +212,11 @@ func (m *BoolValue) MarshalJSON() ([]byte, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *StringValue) UnmarshalJSON(p []byte) error {
|
func (m *StringValue) UnmarshalJSON(p []byte) error {
|
||||||
if len(p) < 2 || p[0] != '"' || p[len(p)-1] != '"' {
|
return json.Unmarshal(p, &m.Value)
|
||||||
return errors.New("invalid string value")
|
|
||||||
}
|
|
||||||
m.Value = string(p[1 : len(p)-1])
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *StringValue) MarshalJSON() ([]byte, error) {
|
func (m *StringValue) MarshalJSON() ([]byte, error) {
|
||||||
return []byte(`"` + m.Value + `"`), nil
|
return json.Marshal(m.Value)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *BytesValue) UnmarshalJSON(p []byte) error {
|
func (m *BytesValue) UnmarshalJSON(p []byte) error {
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
go build -o api.exe ../cmd/openim-api/main.go
|
set output_dir=%~dp0..\_output\bin\platforms\windows
|
||||||
go build -o auth.exe ../cmd/openim-rpc/openim-rpc-auth/main.go
|
go build -o %output_dir%\api.exe ../cmd/openim-api/main.go
|
||||||
go build -o conversation.exe ../cmd/openim-rpc/openim-rpc-conversation/main.go
|
go build -o %output_dir%\auth.exe ../cmd/openim-rpc/openim-rpc-auth/main.go
|
||||||
go build -o friend.exe ../cmd/openim-rpc/openim-rpc-friend/main.go
|
go build -o %output_dir%\conversation.exe ../cmd/openim-rpc/openim-rpc-conversation/main.go
|
||||||
go build -o group.exe ../cmd/openim-rpc/openim-rpc-group/main.go
|
go build -o %output_dir%\friend.exe ../cmd/openim-rpc/openim-rpc-friend/main.go
|
||||||
go build -o msg.exe ../cmd/openim-rpc/openim-rpc-msg/main.go
|
go build -o %output_dir%\group.exe ../cmd/openim-rpc/openim-rpc-group/main.go
|
||||||
go build -o third.exe ../cmd/openim-rpc/openim-rpc-third/main.go
|
go build -o %output_dir%\msg.exe ../cmd/openim-rpc/openim-rpc-msg/main.go
|
||||||
go build -o user.exe ../cmd/openim-rpc/openim-rpc-user/main.go
|
go build -o %output_dir%\third.exe ../cmd/openim-rpc/openim-rpc-third/main.go
|
||||||
go build -o push.exe ../cmd/openim-push/main.go
|
go build -o %output_dir%\user.exe ../cmd/openim-rpc/openim-rpc-user/main.go
|
||||||
go build -o msgtransfer.exe ../cmd/openim-msgtransfer/main.go
|
go build -o %output_dir%\push.exe ../cmd/openim-push/main.go
|
||||||
go build -o msggateway.exe ../cmd/openim-msggateway/main.go
|
go build -o %output_dir%\msgtransfer.exe ../cmd/openim-msgtransfer/main.go
|
||||||
|
go build -o %output_dir%\msggateway.exe ../cmd/openim-msggateway/main.go
|
||||||
@ -61,7 +61,7 @@ GITLINT_DIR="$OPENIM_ROOT/_output/tools/go-gitlint"
|
|||||||
|
|
||||||
$GITLINT_DIR \
|
$GITLINT_DIR \
|
||||||
--msg-file=$1 \
|
--msg-file=$1 \
|
||||||
--subject-regex="^(build|chore|ci|docs|feat|feature|fix|perf|refactor|revert|style|test)(.*)?:\s?.*" \
|
--subject-regex="^(build|chore|ci|docs|feat|feature|fix|perf|refactor|revert|style|bot|test)(.*)?:\s?.*" \
|
||||||
--subject-maxlen=150 \
|
--subject-maxlen=150 \
|
||||||
--subject-minlen=10 \
|
--subject-minlen=10 \
|
||||||
--body-regex=".*" \
|
--body-regex=".*" \
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
|
|
||||||
local_branch="$(git rev-parse --abbrev-ref HEAD)"
|
local_branch="$(git rev-parse --abbrev-ref HEAD)"
|
||||||
valid_branch_regex="^(main|master|develop|release(-[a-zA-Z0-9._-]+)?)$|(feature|feat|openim|hotfix|test|bug|ci|cicd|style|)\/[a-z0-9._-]+$|^HEAD$"
|
valid_branch_regex="^(main|master|develop|release(-[a-zA-Z0-9._-]+)?)$|(feature|feat|openim|hotfix|test|bug|bot|ci|cicd|style|)\/[a-z0-9._-]+$|^HEAD$"
|
||||||
|
|
||||||
YELLOW="\e[93m"
|
YELLOW="\e[93m"
|
||||||
GREEN="\e[32m"
|
GREEN="\e[32m"
|
||||||
|
|||||||
@ -36,7 +36,7 @@ echo -e "${YELLOW_PREFIX}=======>SCRIPTS_ROOT=$SCRIPTS_ROOT${COLOR_SUFFIX}"
|
|||||||
echo -e "${YELLOW_PREFIX}=======>OPENIM_ROOT=$OPENIM_ROOT${COLOR_SUFFIX}"
|
echo -e "${YELLOW_PREFIX}=======>OPENIM_ROOT=$OPENIM_ROOT${COLOR_SUFFIX}"
|
||||||
echo -e "${YELLOW_PREFIX}=======>pwd=$PWD${COLOR_SUFFIX}"
|
echo -e "${YELLOW_PREFIX}=======>pwd=$PWD${COLOR_SUFFIX}"
|
||||||
|
|
||||||
bin_dir="$BIN_DIR"
|
bin_dir="$OPENIM_ROOT/_output/bin"
|
||||||
logs_dir="$OPENIM_ROOT/logs"
|
logs_dir="$OPENIM_ROOT/logs"
|
||||||
sdk_db_dir="$OPENIM_ROOT/sdk/db/"
|
sdk_db_dir="$OPENIM_ROOT/sdk/db/"
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user