Skip to content

高并发情况下出现Connection reset 或者 Connection prematurely closed BEFORE response #17

高并发情况下出现Connection reset 或者 Connection prematurely closed BEFORE response

高并发情况下出现Connection reset 或者 Connection prematurely closed BEFORE response #17

Workflow file for this run

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.
# When issue opened, notify ShenYu active committers.
# And randomly select one from the list, not all.
# See .github/activie-committers.yml for the list of active committers.
name: Auto Notify
on:
issues:
types: [opened]
jobs:
notify-committers:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Read active committers list and select random one
id: read-committers
run: |
# Read committers from the YAML file and extract GitHub usernames
committers=$(grep -E "^@" .github/activie-committers.yml)
# Randomly select one committer
selected_committer=$(echo "$committers" | shuf -n 1)
echo "committer=$selected_committer" >> $GITHUB_OUTPUT
- name: Notify randomly selected committer
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const committer = '${{ steps.read-committers.outputs.committer }}';
const issueNumber = context.issue.number;
const issueTitle = context.payload.issue.title;
const issueAuthor = context.payload.issue.user.login;
const issueUrl = context.payload.issue.html_url;
const commentBody = [
`👋 Hello ${committer}`,
'',
`A new issue has been opened by @${issueAuthor}:`,
`- **Title**: ${issueTitle}`,
`- **Link**: ${issueUrl}`,
'',
'Please review when you have time. Thank you! 🙏'
].join('\n');
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issueNumber,
body: commentBody
});