File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -16,12 +16,12 @@ jobs:
16
16
pull-requests : write
17
17
steps :
18
18
- name : comment on PR with Binder link
19
- uses : actions/github-script@v3
19
+ uses : actions/github-script@v6
20
20
with :
21
21
github-token : ${{secrets.GITHUB_TOKEN}}
22
22
script : |
23
23
var BRANCH_NAME = process.env.BRANCH_NAME;
24
- github.issues.createComment({
24
+ github.rest. issues.createComment({
25
25
issue_number: context.issue.number,
26
26
owner: context.repo.owner,
27
27
repo: context.repo.repo,
Original file line number Diff line number Diff line change 1
1
# ./.github/workflows/binder-badge.yaml
2
2
name : Binder Badge
3
- on :
3
+ on :
4
4
pull_request_target :
5
5
types : [opened]
6
6
@@ -11,13 +11,13 @@ jobs:
11
11
pull-requests : write
12
12
steps :
13
13
- name : comment on PR with Binder link
14
- uses : actions/github-script@v3
14
+ uses : actions/github-script@v6
15
15
with :
16
16
github-token : ${{secrets.GITHUB_TOKEN}}
17
17
script : |
18
18
var PR_HEAD_USERREPO = process.env.PR_HEAD_USERREPO;
19
19
var PR_HEAD_REF = process.env.PR_HEAD_REF;
20
- github.issues.createComment({
20
+ github.rest. issues.createComment({
21
21
issue_number: context.issue.number,
22
22
owner: context.repo.owner,
23
23
repo: context.repo.repo,
Original file line number Diff line number Diff line change @@ -5,27 +5,27 @@ on: [issue_comment] # issues and PRs are equivalent in terms of comments for the
5
5
jobs :
6
6
trigger-chatops :
7
7
# Make sure the comment is on a PR, and contains the command "/binder"
8
- if : (github.event.issue.pull_request != null) && contains(github.event.comment.body, '/binder')
8
+ if : (github.event.issue.pull_request != null) && contains(github.event.comment.body, '/binder')
9
9
runs-on : ubuntu-latest
10
10
steps :
11
11
# Use the GitHub API to:
12
12
# (1) Get the branch name of the PR that has been commented on with "/binder"
13
13
# (2) make a comment on the PR with the binder badge
14
14
- name : comment on PR with Binder link
15
- uses : actions/github-script@v3
15
+ uses : actions/github-script@v6
16
16
with :
17
17
github-token : ${{secrets.GITHUB_TOKEN}}
18
18
script : |
19
19
// Get the branch name
20
- github.pulls.get({
20
+ github.rest. pulls.get({
21
21
owner: context.repo.owner,
22
22
repo: context.repo.repo,
23
23
pull_number: context.payload.issue.number
24
24
}).then( (pr) => {
25
25
26
26
// use the branch name to make a comment on the PR with a Binder badge
27
27
var BRANCH_NAME = pr.data.head.ref
28
- github.issues.createComment({
28
+ github.rest. issues.createComment({
29
29
issue_number: context.payload.issue.number,
30
30
owner: context.repo.owner,
31
31
repo: context.repo.repo,
You can’t perform that action at this time.
0 commit comments