mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 00:12:08 +08:00
Use github-script action for maintenance_bot job too
Also: - fix typo in filename - more explicit binding of argument values
This commit is contained in:
@@ -13,9 +13,13 @@ jobs:
|
||||
github.event.pull_request.merged == true &&
|
||||
! contains(join(github.event.pull_request.labels.*.name, ', '), 'kind/') &&
|
||||
! contains(github.event.pull_request.labels.*.name, 'merge')
|
||||
uses: actions/github-script@0.3.0
|
||||
uses: actions/github-script@v3
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const { issue: { number: issue_number }, repo: { owner, repo } } = context;
|
||||
github.issues.createComment({ issue_number, owner, repo, body: 'This PR was merged without a "kind/" label, please correct.' })
|
||||
github.issues.createComment({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.issue.number,
|
||||
body: 'This PR was merged without a "kind/" label, please correct.',
|
||||
})
|
||||
|
||||
@@ -19,8 +19,13 @@ jobs:
|
||||
! contains(github.event.pull_request.labels.*.name, 'status/WIP') &&
|
||||
! contains(github.event.pull_request.title, 'WIP') &&
|
||||
! github.event.pull_request.draft
|
||||
run: |
|
||||
curl --request PATCH \
|
||||
--url ${{ github.event.pull_request.issue_url }} \
|
||||
--header 'authorization: token ${{ secrets.GITHUB_TOKEN }}' \
|
||||
--data-raw '{"milestone": '$MILESTONE_NUMBER'}'
|
||||
uses: actions/github-script@v3
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
github.issues.update({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.issue.number,
|
||||
milestone: ${{ env.MILESTONE_NUMBER }},
|
||||
});
|
||||
Reference in New Issue
Block a user