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

chore(deps-dev): Bump marked from 1.2.3 to 4.0.10 in /src/web/toSearchMd #14

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
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
30 changes: 30 additions & 0 deletions .github/workflows/backup-to-gitlab.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: backup to gitlab
on: [push]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
backup-to-gitlab:
if: github.repository_owner == 'linuxdeepin'
name: backup-to-gitlab
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
repository: "linuxdeepin/jenkins-bridge-client"
path: jenkins-bridge-client

- name: Install Client
run: |
cd $GITHUB_WORKSPACE/jenkins-bridge-client
go build .
sudo install -Dvm755 jenkins-bridge-client -t /usr/bin/
- name: Trigger sync
id: generate-runid
run: |
echo "::set-output name=RUN_ID::$(jenkins-bridge-client -triggerSync -token '${{ secrets.BRIDGETOKEN }}')"
- name: Print log
run: |
jenkins-bridge-client -printlog -token "${{ secrets.BRIDGETOKEN }}" -runid "${{ steps.generate-runid.outputs.RUN_ID }}"
8 changes: 8 additions & 0 deletions .github/workflows/call-chatOps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: chatOps
on:
issue_comment:
types: [created]

jobs:
chatopt:
uses: linuxdeepin/.github/.github/workflows/chatOps.yml@master
11 changes: 11 additions & 0 deletions .github/workflows/call-commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Call commitlint
on:
pull_request_target:

concurrency:
group: ${{ github.workflow }}-pull/${{ github.event.number }}
cancel-in-progress: true

jobs:
check_job:
uses: linuxdeepin/.github/.github/workflows/commitlint.yml@master
14 changes: 14 additions & 0 deletions .github/workflows/call-jenkins-bridge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Call jenkins-bridge
on:
pull_request_target:
types: [opened, synchronize]

concurrency:
group: ${{ github.workflow }}-pull/${{ github.event.number }}
cancel-in-progress: true

jobs:
check_job:
uses: linuxdeepin/.github/.github/workflows/jenkins-bridge.yml@master
secrets:
BridgeToken: ${{ secrets.BridgeToken }}
126 changes: 126 additions & 0 deletions .github/workflows/chatOps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: chatOps
on:
issue_comment:
types: [created]

jobs:
chatopt:
if: contains(github.event.comment.html_url, '/pull/')
runs-on: [ubuntu-latest]
steps:
- run: export
- uses: actions/github-script@v5
with:
script: |
console.log(context)
console.log(context.payload.issue.user)
console.log(context.payload.issue.labels)
console.log(context.payload.issue.pull_request)

- name: assign
uses: actions/github-script@v5
if: contains(github.event.comment.body, '/assign')
env:
COMMENT_BODY: ${{ github.event.comment.body }}
with:
script: |
const { COMMENT_BODY } = process.env
const groups = COMMENT_BODY.match(/\/assign \@(\S+)/)
groups && await github.rest.issues.addAssignees({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
assignees: groups[1]
})

- name: review
uses: actions/github-script@v5
if: contains(github.event.comment.body, '/review')
env:
COMMENT_BODY: ${{ github.event.comment.body }}
with:
script: |
const { COMMENT_BODY } = process.env
const command = COMMENT_BODY.match(/\/review (\@\w+ )+/)
if ( !command || !command[0] ){
return
}
const users = command[0].match(/\@\w+/g)
if( !user ){
return
}
await github.rest.pulls.requestReviewers({
pull_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
reviewers: users.map(a=>a.slice(1))
});

- name: "approve"
uses: actions/github-script@v5
if: contains(github.event.comment.body, '/+1') || contains(github.event.comment.body, '/approe')
with:
script: |
if(context.payload.sender.id == context.payload.issue.user.id){
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Permission denied'
})
return
}
await github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['approve']
})

- name: merge
uses: actions/github-script@v5
if: contains(github.event.comment.body, '/merge')
env:
REF: ${{ github.event.pull_request.head.ref }}
with:
script: |
if(context.payload.sender.id != context.payload.issue.user.id){
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Permission denied'
})
return
}

const pull = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
})

if( pull.data.mergeable_state != "clean" ){
if(context.payload.sender.id != context.payload.issue.user.id){
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: pull.data.mergeable_state
})
return
}
}

await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'merged'
})
await github.rest.pulls.merge({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
merge_method: 'rebase'
});
25 changes: 25 additions & 0 deletions .github/workflows/cppcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: cppcheck
on:
pull_request_target:
types: [opened, reopened, synchronize, closed]

concurrency:
group: ${{ github.workflow }}-pull/${{ github.event.number }}
cancel-in-progress: true

jobs:
cppchceck:
name: cppcheck
runs-on: ubuntu-latest
steps:
- run: export
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false
- uses: linuxdeepin/action-cppcheck@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
pull_request_id: ${{ github.event.pull_request.number }}
allow_approve: false
Loading