Skip to content
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

feat: Refactoring component base #2

Merged
merged 2 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
23 changes: 23 additions & 0 deletions .github/.codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright © 2023 OpenIM. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

coverage:
status:
project:
default: false # disable the default status that measures entire project
pkg: # declare a new status context "pkg"
paths:
- pkg/* # only include coverage in "pkg/" folder
informational: true # Always pass check
patch: off # disable the commit only checks
59 changes: 59 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Copyright © 2023 OpenIM. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
time: "08:00"
labels:
- "dependencies"
commit-message:
prefix: "feat"
include: "scope"
groups:
gomod-deps:
patterns:
- "*"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
time: "08:00"
labels:
- "dependencies"
commit-message:
prefix: "chore"
include: "scope"
groups:
github-actions:
patterns:
- "*"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
time: "08:00"
labels:
- "dependencies"
commit-message:
prefix: "feat"
include: "scope"
43 changes: 43 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Copyright © 2023 OpenIM. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Refer to Kubernetes for size/* Settings
# https://github.com/Kubernetes/Kubernetes
XS:
name: size/XS
lines: 0
color: 3CBF00
S:
name: size/S
lines: 10
color: 5D9801
M:
name: size/M
lines: 30
color: 7F7203
L:
name: size/L
lines: 100
color: A14C05
XL:
name: size/XL
lines: 500
color: C32607
XXL:
name: size/XXL
lines: 1000
color: E50009
comment: |
# Whoa! Easy there, Partner!
This PR is too big. Please break it up into smaller PRs.
51 changes: 51 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Copyright © 2023 OpenIM. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'kind/fix'
- 'kind/feature'
- 'enhancement'
- 'kind/documentation'
- 'good first issue'
- title: '🧰 Maintenance'
label: 'chore'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
## Changes $PREVIOUS_TAG

$CHANGES

## Contributors to this $REPOSITORY release

$CONTRIBUTORS
130 changes: 130 additions & 0 deletions .github/sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# Copyright © 2023 OpenIM. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# https://github.com/BetaHuhn/repo-file-sync-action
# Synchronization for the.github repository
OpenIMSDK/.github:
- source: LICENSE
dest: LICENSE
- source: scripts/LICENSE/
dest: scripts/LICENSE/
replace: false

OpenIMSDK/community:
- source: LICENSE
dest: LICENSE
- source: scripts/LICENSE/
dest: scripts/LICENSE/
replace: false
- source: .github/workflows/
dest: .github/workflows/

OpenIMSDK/openim-sdk-core:
- source: LICENSE
dest: LICENSE
- source: scripts/LICENSE/
dest: scripts/LICENSE/
replace: false
- source: .github/workflows/issue-robot.yml
dest: .github/workflows/issue-robot.yml
replace: false
- source: .github/workflows/stale.yml
dest: .github/workflows/stale.yml
replace: false
- source: .github/.codecov.yml
dest: .github/.codecov.yml
replace: false

OpenIMSDK/OpenIM-Docs:
- source: .github/workflows/
dest: .github/workflows/
exclude: |
e2e-test.yml
sync.yml
- source: scripts/githooks/
dest: scripts/githooks/
replace: true
- source: .github/.codecov.yml
dest: .github/.codecov.yml
replace: false

OpenIMSDK/OpenKF:
- source: LICENSE
dest: LICENSE
- source: scripts/LICENSE/
dest: scripts/LICENSE/
replace: false
- source: .github/workflows/issue-robot.yml
dest: .github/workflows/issue-robot.yml
replace: false
- source: .github/workflows/stale.yml
dest: .github/workflows/stale.yml
replace: false
- source: .github/.codecov.yml
dest: .github/.codecov.yml
replace: false

openim-docker/openim-docker:
- source: ./config
dest: ./openim-server/main/config
replace: true
- source: ./docs
dest: ./openim-server/main/docs
replace: true
- source: ./scripts
dest: ./openim-server/main/scripts
replace: true

group:
# first group:common to all warehouses
# TODO: add the required warehouse here
- repos: |
OpenIMSDK/OpenKF@main
OpenIMSDK/openim-miniprogram-demo@main
OpenIMSDK/docs
OpenIMSDK/chat
OpenIMSDK/community
OpenIMSDK/openim-charts
OpenIMSDK/openim-sdk-cpp@main
files:
- source: LICENSE
dest: LICENSE
replace: false
- source: .github/workflows/issue-robot.yml
dest: .github/workflows/issue-robot.yml
replace: false
- source: .github/workflows/stale.yml
dest: .github/workflows/stale.yml
replace: false
- source: .github/workflows/project-progress.yml
dest: .github/workflows/project-progress.yml
replace: false
- source: .github/workflows/help-comment-issue.yml
dest: .github/workflows/help-comment-issue.yml
replace: false
- source: .github/.codecov.yml
dest: .github/.codecov.yml
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/
dest: ./scripts/githooks/
replace: true
21 changes: 21 additions & 0 deletions .github/weekly-digest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright © 2023 OpenIM. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# https://github.com/apps/weekly-digest/installations/new
publishDay: sun
canPublishIssues: true
canPublishPullRequests: true
canPublishContributors: true
canPublishStargazers: true
canPublishCommits: true
43 changes: 43 additions & 0 deletions .github/workflows/auto-assign-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Copyright © 2023 OpenIM open source community. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Assign issue to comment author
on:
issue_comment:
types: [created]
jobs:
assign-issue:
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
permissions:
issues: write
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Assign the issue
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-label "triage/accepted"
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:
GH_TOKEN: ${{ secrets.REDBOT_GITHUB_TOKEN }}
ISSUE: ${{ github.event.issue.html_url }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
Loading