Skip to content

Commit 0a1d9ef

Browse files
committed
Merge branch 'main' of github.com:openimsdk/docs into webh/fie
2 parents ec2285d + ea9cf25 commit 0a1d9ef

File tree

216 files changed

+2582
-2266
lines changed

Some content is hidden

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

216 files changed

+2582
-2266
lines changed

.github/workflows/auto-assign-issue.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,26 @@ on:
44
types: [created]
55
jobs:
66
assign-issue:
7-
if: contains(github.event.comment.body, '/assign') || contains(github.event.comment.body, '/accept')
7+
if: |
8+
contains(github.event.comment.body, '/assign') || contains(github.event.comment.body, '/accept') &&
9+
!contains(github.event.comment.user.login, 'openim-robot')
810
runs-on: ubuntu-latest
911
permissions:
1012
issues: write
1113
steps:
1214
- name: Checkout code
13-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1416

1517
- name: Assign the issue
1618
run: |
17-
export LETASE_MILESTONES=$(curl "https://api.github.com/repos/$OWNER/$REPO/milestones" | jq -r 'last(.[]).title')
19+
export LETASE_MILESTONES=$(curl 'https://api.github.com/repos/$OWNER/$PEPO/milestones' | jq -r 'last(.[]).title')
1820
gh issue edit ${{ github.event.issue.number }} --add-assignee "${{ github.event.comment.user.login }}"
19-
gh issue edit ${{ github.event.issue.number }} --add-label "triage/accepted"
20-
gh issue edit ${{ github.event.issue.number }} --milestone "$LETASE_MILESTONES"
21-
gh issue comment $ISSUE --body "@${{ github.event.comment.user.login }} Glad to see you accepted this issue🤲, this issue has been assigned to you. <br>I set the milestones for this issue to $LETASE_MILESTONES, we are looking forward to your PR!"
21+
gh issue edit ${{ github.event.issue.number }} --add-label "accepted"
22+
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!"
23+
24+
# gh issue edit ${{ github.event.issue.number }} --milestone "$LETASE_MILESTONES"
2225
env:
23-
GH_TOKEN: ${{ secrets.REDBOT_GITHUB_TOKEN }}
26+
GH_TOKEN: ${{ secrets.BOT_TOKEN }}
2427
ISSUE: ${{ github.event.issue.html_url }}
2528
OWNER: ${{ github.repository_owner }}
26-
REPO: ${{ github.event.repository.name }}
29+
REPO: ${{ github.event.repository.name }}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CLA Assistant
2+
on:
3+
issue_comment:
4+
types: [created]
5+
pull_request_target:
6+
types: [opened,closed,synchronize]
7+
8+
# explicitly configure permissions, in case your GITHUB_TOKEN workflow permissions are set to read-only in repository settings
9+
permissions:
10+
actions: write
11+
contents: write # this can be 'read' if the signatures are in remote repository
12+
pull-requests: write
13+
statuses: write
14+
15+
jobs:
16+
CLA-Assistant:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: "CLA Assistant"
20+
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
21+
uses: contributor-assistant/[email protected]
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
PERSONAL_ACCESS_TOKEN: ${{ secrets.BOT_TOKEN }}
25+
with:
26+
path-to-signatures: 'signatures/cla.json'
27+
path-to-document: 'https://github.com/OpenIM-Robot/cla/blob/main/README.md' # e.g. a CLA or a DCO document
28+
branch: 'main'
29+
allowlist: 'bot*,*bot,OpenIM-Robot'
30+
31+
# the followings are the optional inputs - If the optional inputs are not given, then default values will be taken
32+
remote-organization-name: OpenIM-Robot
33+
remote-repository-name: cla
34+
create-file-commit-message: 'Creating file for storing CLA Signatures'
35+
# signed-commit-message: '$contributorName has signed the CLA in $owner/$repo#$pullRequestNo'
36+
custom-notsigned-prcomment: '💕 Thank you for your contribution and please kindly read and sign our CLA. [CLA Docs](https://github.com/OpenIM-Robot/cla/blob/main/README.md)'
37+
custom-pr-sign-comment: 'I have read the CLA Document and I hereby sign the CLA'
38+
custom-allsigned-prcomment: '🤖 All Contributors have signed the [CLA](https://github.com/OpenIM-Robot/cla/blob/main/README.md).<br> The signed information is recorded [**here**](https://github.com/OpenIM-Robot/cla/blob/main/signatures/cla.json)'
39+
#lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true)
40+
#use-dco-flag: true - If you are using DCO instead of CLA

.github/workflows/cla.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/help-comment-issue.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
issues:
44
types:
55
- labeled
6+
67
jobs:
78
add-comment:
89
if: github.event.label.name == 'help wanted' || github.event.label.name == 'good first issue'
@@ -11,11 +12,11 @@ jobs:
1112
issues: write
1213
steps:
1314
- name: Add comment
14-
uses: peter-evans/create-or-update-comment@v3
15+
uses: peter-evans/create-or-update-comment@v4
1516
with:
1617
issue-number: ${{ github.event.issue.number }}
17-
token: ${{ secrets.BOT_GITHUB_TOKEN }}
18+
token: ${{ secrets.BOT_TOKEN }}
1819
body: |
1920
This issue is available for anyone to work on. **Make sure to reference this issue in your pull request.** :sparkles: Thank you for your contribution! :sparkles:
20-
[Join slack 🤖](https://join.slack.com/t/openimsdk/shared_invite/zt-2hljfom5u-9ZuzP3NfEKW~BJKbpLm0Hw) to connect and communicate with our developers.
21+
[Join slack 🤖](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) to connect and communicate with our developers.
2122
If you wish to accept this assignment, please leave a comment in the comments section: `/accept`.🎯

.github/workflows/issue-robot.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: 'issue-translator'
2+
on:
3+
issue_comment:
4+
types: [created]
5+
issues:
6+
types: [opened]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: usthe/[email protected]
13+
with:
14+
BOT_GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
15+
IS_MODIFY_TITLE: true
16+
# not require, default false, . Decide whether to modify the issue title
17+
# if true, the robot account @Issues-translate-bot must have modification permissions, invite @Issues-translate-bot to your project or use your custom bot.
18+
CUSTOM_BOT_NOTE: Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿
19+
# not require. Customize the translation robot prefix message.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Remove Unused Labels
2+
on:
3+
workflow_dispatch:
4+
5+
jobs:
6+
cleanup:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
issues: write
10+
pull-requests: write
11+
contents: read
12+
steps:
13+
- name: Checkout Repository
14+
uses: actions/checkout@v4
15+
16+
- name: Fetch All Issues and PRs
17+
id: fetch_issues_prs
18+
uses: actions/[email protected]
19+
with:
20+
github-token: ${{ secrets.GITHUB_TOKEN }}
21+
script: |
22+
const issues = await github.paginate(github.rest.issues.listForRepo, {
23+
owner: context.repo.owner,
24+
repo: context.repo.repo,
25+
state: 'all',
26+
per_page: 100
27+
});
28+
29+
const labelsInUse = new Set();
30+
issues.forEach(issue => {
31+
issue.labels.forEach(label => {
32+
labelsInUse.add(label.name);
33+
});
34+
});
35+
36+
return JSON.stringify(Array.from(labelsInUse));
37+
result-encoding: string
38+
39+
- name: Fetch All Labels
40+
id: fetch_labels
41+
uses: actions/[email protected]
42+
with:
43+
github-token: ${{ secrets.GITHUB_TOKEN }}
44+
script: |
45+
const labels = await github.paginate(github.rest.issues.listLabelsForRepo, {
46+
owner: context.repo.owner,
47+
repo: context.repo.repo,
48+
per_page: 100
49+
});
50+
51+
return JSON.stringify(labels.map(label => label.name));
52+
result-encoding: string
53+
54+
- name: Remove Unused Labels
55+
uses: actions/[email protected]
56+
with:
57+
github-token: ${{ secrets.GITHUB_TOKEN }}
58+
script: |
59+
const labelsInUse = new Set(JSON.parse(process.env.LABELS_IN_USE));
60+
const allLabels = JSON.parse(process.env.ALL_LABELS);
61+
62+
const unusedLabels = allLabels.filter(label => !labelsInUse.has(label));
63+
64+
for (const label of unusedLabels) {
65+
await github.rest.issues.deleteLabel({
66+
owner: context.repo.owner,
67+
repo: context.repo.repo,
68+
name: label
69+
});
70+
console.log(`Deleted label: ${label}`);
71+
}
72+
env:
73+
LABELS_IN_USE: ${{ steps.fetch_issues_prs.outputs.result }}
74+
ALL_LABELS: ${{ steps.fetch_labels.outputs.result }}

.github/workflows/reopen-issue.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Reopen and Update Stale Issues
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
reopen_stale_issues:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
issues: write
11+
contents: read
12+
13+
steps:
14+
- name: Checkout Repository
15+
uses: actions/checkout@v4
16+
17+
- name: Fetch Closed Issues with lifecycle/stale Label
18+
id: fetch_issues
19+
uses: actions/github-script@v7
20+
with:
21+
github-token: ${{ secrets.GITHUB_TOKEN }}
22+
script: |
23+
const issues = await github.paginate(github.rest.issues.listForRepo, {
24+
owner: context.repo.owner,
25+
repo: context.repo.repo,
26+
state: 'closed',
27+
labels: 'lifecycle/stale',
28+
per_page: 100
29+
});
30+
const issueNumbers = issues
31+
.filter(issue => !issue.pull_request) // exclude PR
32+
.map(issue => issue.number);
33+
console.log(`Fetched issues: ${issueNumbers}`);
34+
return issueNumbers;
35+
36+
- name: Set issue numbers
37+
id: set_issue_numbers
38+
run: |
39+
echo "ISSUE_NUMBERS=${{ steps.fetch_issues.outputs.result }}" >> $GITHUB_ENV
40+
echo "Issue numbers: ${{ steps.fetch_issues.outputs.result }}"
41+
42+
- name: Reopen Issues
43+
uses: actions/github-script@v7
44+
with:
45+
github-token: ${{ secrets.GITHUB_TOKEN }}
46+
script: |
47+
const issueNumbers = JSON.parse(process.env.ISSUE_NUMBERS);
48+
console.log(`Reopening issues: ${issueNumbers}`);
49+
50+
for (const issue_number of issueNumbers) {
51+
// Reopen the issue
52+
await github.rest.issues.update({
53+
owner: context.repo.owner,
54+
repo: context.repo.repo,
55+
issue_number: issue_number,
56+
state: 'open'
57+
});
58+
console.log(`Reopened issue #${issue_number}`);
59+
}
60+
61+
- name: Remove lifecycle/stale Label
62+
uses: actions/github-script@v7
63+
with:
64+
github-token: ${{ secrets.GITHUB_TOKEN }}
65+
script: |
66+
const issueNumbers = JSON.parse(process.env.ISSUE_NUMBERS);
67+
console.log(`Removing 'lifecycle/stale' label from issues: ${issueNumbers}`);
68+
69+
for (const issue_number of issueNumbers) {
70+
// Remove the lifecycle/stale label
71+
await github.rest.issues.removeLabel({
72+
owner: context.repo.owner,
73+
repo: context.repo.repo,
74+
issue_number: issue_number,
75+
name: 'lifecycle/stale'
76+
});
77+
console.log(`Removed label 'lifecycle/stale' from issue #${issue_number}`);
78+
}

.github/workflows/stale.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)