Skip to content

Commit

Permalink
feat: create workflows in electron repo. (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
mo3et authored Sep 3, 2024
1 parent ef8f030 commit a62f49a
Show file tree
Hide file tree
Showing 5 changed files with 171 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/auto-invite-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Invite users to join OpenIM Community.
on:
issue_comment:
types:
- created
jobs:
issue_comment:
name: Invite users to join OpenIM Community
if: ${{ github.event.comment.body == '/invite' || github.event.comment.body == '/close' || github.event.comment.body == '/comment' }}
runs-on: ubuntu-latest
permissions:
issues: write
steps:

- name: Invite user to join OpenIM Community
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
We value close connections with our users, developers, and contributors here at Open-IM-Server. With a large community and maintainer team, we're always here to help and support you. Whether you're looking to join our community or have any questions or suggestions, we welcome you to get in touch with us.
Our most recommended way to get in touch is through [Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q). Even if you're in China, Slack is usually not blocked by firewalls, making it an easy way to connect with us. Our Slack community is the ideal place to discuss and share ideas and suggestions with other users and developers of Open-IM-Server. You can ask technical questions, seek help, or share your experiences with other users of Open-IM-Server.
In addition to Slack, we also offer the following ways to get in touch:
+ <a href="https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q" target="_blank"><img src="https://img.shields.io/badge/Slack-OpenIM%2B-blueviolet?logo=slack&amp;logoColor=white"></a> We also have Slack channels for you to communicate and discuss. To join, visit https://slack.com/ and join our [πŸ‘€ Open-IM-Server slack](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) team channel.
+ <a href="https://mail.google.com/mail/u/0/?fs=1&tf=cm&[email protected]" target="_blank"><img src="https://img.shields.io/badge/gmail-%40OOpenIMSDKCore?style=social&logo=gmail"></a> Get in touch with us on [Gmail](https://mail.google.com/mail/u/0/?fs=1&tf=cm&[email protected]). If you have any questions or issues that need resolving, or any suggestions and feedback for our open source projects, please feel free to contact us via email.
+ <a href="https://doc.rentsoft.cn/" target="_blank"><img src="https://img.shields.io/badge/%E5%8D%9A%E5%AE%A2-%40OpenIMSDKCore-blue?style=social&logo=Octopus%20Deploy"></a> Read our [blog](https://doc.rentsoft.cn/). Our blog is a great place to stay up-to-date with Open-IM-Server projects and trends. On the blog, we share our latest developments, tech trends, and other interesting information.
+ <a href="https://github.com/OpenIMSDK/OpenIM-Docs/blob/main/docs/images/WechatIMG20.jpeg" target="_blank"><img src="https://img.shields.io/badge/%E5%BE%AE%E4%BF%A1-OpenIMSDKCore-brightgreen?logo=wechat&style=flat-square"></a> Add [Wechat](https://github.com/OpenIMSDK/OpenIM-Docs/blob/main/docs/images/WechatIMG20.jpeg) and indicate that you are a user or developer of Open-IM-Server. We will process your request as soon as possible.
# - name: Close Issue
# uses: peter-evans/close-issue@v3
# with:
# token: ${{ secrets.BOT_GITHUB_TOKEN }}
# issue-number: ${{ github.event.issue.number }}
# comment: πŸ€– Auto-closing issue, if you still need help please reopen the issue or ask for help in the community above
# labels: |
# accepted
40 changes: 40 additions & 0 deletions .github/workflows/cla-assistant.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CLA Assistant
on:
issue_comment:
types: [created]
pull_request_target:
types: [opened,closed,synchronize]

# explicitly configure permissions, in case your GITHUB_TOKEN workflow permissions are set to read-only in repository settings
permissions:
actions: write
contents: write # this can be 'read' if the signatures are in remote repository
pull-requests: write
statuses: write

jobs:
CLA-Assistant:
runs-on: ubuntu-latest
steps:
- name: "CLA Assistant"
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'
uses: contributor-assistant/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.BOT_TOKEN }}
with:
path-to-signatures: 'signatures/cla.json'
path-to-document: 'https://github.com/OpenIM-Robot/cla/blob/main/README.md' # e.g. a CLA or a DCO document
branch: 'main'
allowlist: 'bot*,*bot,OpenIM-Robot'

# the followings are the optional inputs - If the optional inputs are not given, then default values will be taken
remote-organization-name: OpenIM-Robot
remote-repository-name: cla
create-file-commit-message: 'Creating file for storing CLA Signatures'
# signed-commit-message: '$contributorName has signed the CLA in $owner/$repo#$pullRequestNo'
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)'
custom-pr-sign-comment: 'I have read the CLA Document and I hereby sign the CLA'
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)'
#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
51 changes: 51 additions & 0 deletions .github/workflows/comment-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Non-English Comments Check

on:
pull_request:
branches:
- main
workflow_dispatch:

jobs:
non-english-comments-check:
runs-on: ubuntu-latest

env:
# need ignore Dirs
EXCLUDE_DIRS: ".git docs tests scripts assets node_modules build"
# need ignore Files
EXCLUDE_FILES: "*.md *.txt *.html *.css *.min.js *.mdx"

steps:
- uses: actions/checkout@v4

- name: Search for Non-English comments
run: |
set -e
# Define the regex pattern to match Chinese characters
pattern='[\p{Han}]'
# Process the directories to be excluded
exclude_dirs=""
for dir in $EXCLUDE_DIRS; do
exclude_dirs="$exclude_dirs --exclude-dir=$dir"
done
# Process the file types to be excluded
exclude_files=""
for file in $EXCLUDE_FILES; do
exclude_files="$exclude_files --exclude=$file"
done
# Use grep to find all comments containing Non-English characters and save to file
grep -Pnr "$pattern" . $exclude_dirs $exclude_files > non_english_comments.txt || true
- name: Output non-English comments are found
run: |
if [ -s non_english_comments.txt ]; then
echo "Non-English comments found in the following locations:"
cat non_english_comments.txt
exit 1 # terminate the workflow
else
echo "No Non_English comments found."
fi
22 changes: 22 additions & 0 deletions .github/workflows/help-comment-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Good frist issue add comment
on:
issues:
types:
- labeled

jobs:
add-comment:
if: github.event.label.name == 'help wanted' || github.event.label.name == 'good first issue'
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Add comment
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.issue.number }}
token: ${{ secrets.BOT_TOKEN }}
body: |
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:
[Join slack πŸ€–](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) to connect and communicate with our developers.
If you wish to accept this assignment, please leave a comment in the comments section: `/accept`.🎯
19 changes: 19 additions & 0 deletions .github/workflows/issue-translator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'issue-translator'
on:
issue_comment:
types: [created]
issues:
types: [opened]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: usthe/[email protected]
with:
BOT_GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
IS_MODIFY_TITLE: true
# not require, default false, . Decide whether to modify the issue title
# if true, the robot account @Issues-translate-bot must have modification permissions, invite @Issues-translate-bot to your project or use your custom bot.
CUSTOM_BOT_NOTE: Bot detected the issue body's language is not English, translate it automatically. πŸ‘―πŸ‘­πŸ»πŸ§‘β€πŸ€β€πŸ§‘πŸ‘«πŸ§‘πŸΏβ€πŸ€β€πŸ§‘πŸ»πŸ‘©πŸΎβ€πŸ€β€πŸ‘¨πŸΏπŸ‘¬πŸΏ
# not require. Customize the translation robot prefix message.

0 comments on commit a62f49a

Please sign in to comment.