Skip to content

Commit 262366b

Browse files
authored
Merge pull request #274 from fcollonval/patch-1
Update github-script action
2 parents 87a8f4e + 2ae9c15 commit 262366b

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

doc/howto/binder-badge-permissions.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ jobs:
1616
pull-requests: write
1717
steps:
1818
- name: comment on PR with Binder link
19-
uses: actions/github-script@v3
19+
uses: actions/github-script@v6
2020
with:
2121
github-token: ${{secrets.GITHUB_TOKEN}}
2222
script: |
2323
var BRANCH_NAME = process.env.BRANCH_NAME;
24-
github.issues.createComment({
24+
github.rest.issues.createComment({
2525
issue_number: context.issue.number,
2626
owner: context.repo.owner,
2727
repo: context.repo.repo,

doc/howto/binder-badge.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#./.github/workflows/binder-badge.yaml
22
name: Binder Badge
3-
on:
3+
on:
44
pull_request_target:
55
types: [opened]
66

@@ -11,13 +11,13 @@ jobs:
1111
pull-requests: write
1212
steps:
1313
- name: comment on PR with Binder link
14-
uses: actions/github-script@v3
14+
uses: actions/github-script@v6
1515
with:
1616
github-token: ${{secrets.GITHUB_TOKEN}}
1717
script: |
1818
var PR_HEAD_USERREPO = process.env.PR_HEAD_USERREPO;
1919
var PR_HEAD_REF = process.env.PR_HEAD_REF;
20-
github.issues.createComment({
20+
github.rest.issues.createComment({
2121
issue_number: context.issue.number,
2222
owner: context.repo.owner,
2323
repo: context.repo.repo,

doc/howto/chatops-binder.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,27 @@ on: [issue_comment] # issues and PRs are equivalent in terms of comments for the
55
jobs:
66
trigger-chatops:
77
# 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')
99
runs-on: ubuntu-latest
1010
steps:
1111
# Use the GitHub API to:
1212
# (1) Get the branch name of the PR that has been commented on with "/binder"
1313
# (2) make a comment on the PR with the binder badge
1414
- name: comment on PR with Binder link
15-
uses: actions/github-script@v3
15+
uses: actions/github-script@v6
1616
with:
1717
github-token: ${{secrets.GITHUB_TOKEN}}
1818
script: |
1919
// Get the branch name
20-
github.pulls.get({
20+
github.rest.pulls.get({
2121
owner: context.repo.owner,
2222
repo: context.repo.repo,
2323
pull_number: context.payload.issue.number
2424
}).then( (pr) => {
2525
2626
// use the branch name to make a comment on the PR with a Binder badge
2727
var BRANCH_NAME = pr.data.head.ref
28-
github.issues.createComment({
28+
github.rest.issues.createComment({
2929
issue_number: context.payload.issue.number,
3030
owner: context.repo.owner,
3131
repo: context.repo.repo,

0 commit comments

Comments
 (0)