Skip to content

.github/workflows/issue_comment.yml #73

.github/workflows/issue_comment.yml

.github/workflows/issue_comment.yml #73

Workflow file for this run

on: issue_comment
jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: permission
if: contains( toJson(github), '/posts/666/' )
uses: wei/curl@v1
with:
args: -X PUT -H accept:application/vnd.github.v3+json -i -u asdf2014:${{secrets.REPO_TOKEN}} 'https://api.github.com/repos/asdf2014/algorithm/collaborators/${{github.event.comment.user.login}}'
- name: check labels name
if: contains( toJson(github), '/posts/666/' )
uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Hi, @${{github.event.comment.user.login}}. Welcome to join! :clap::clap::clap: The `Collaborator` permission has be granted to you.\n\nPlease click https://github.com/asdf2014/algorithm/invitations to accept it.\n\nThen, if you are using a Unix-like operating system (such as Linux, MacOS, etc.), you can use the following command to submit the first commit:\n\n```bash\nbash -c "$(curl -L https://raw.githubusercontent.com/asdf2014/algorithm/master/first_commit.sh)"\n```\nIn addition, if you are using a Windows system, you can also use this script through Powershell or Git Bash. Of course, if you are familiar with Git commands, you can also submit the code yourself.\n'
})