diff --git a/doc/howto/binder-badge-permissions.yaml b/doc/howto/binder-badge-permissions.yaml index 857d182..174b723 100644 --- a/doc/howto/binder-badge-permissions.yaml +++ b/doc/howto/binder-badge-permissions.yaml @@ -16,12 +16,12 @@ jobs: pull-requests: write steps: - name: comment on PR with Binder link - uses: actions/github-script@v3 + uses: actions/github-script@v6 with: github-token: ${{secrets.GITHUB_TOKEN}} script: | var BRANCH_NAME = process.env.BRANCH_NAME; - github.issues.createComment({ + github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, diff --git a/doc/howto/binder-badge.yaml b/doc/howto/binder-badge.yaml index 3d8d210..29cbccf 100644 --- a/doc/howto/binder-badge.yaml +++ b/doc/howto/binder-badge.yaml @@ -1,6 +1,6 @@ #./.github/workflows/binder-badge.yaml name: Binder Badge -on: +on: pull_request_target: types: [opened] @@ -11,13 +11,13 @@ jobs: pull-requests: write steps: - name: comment on PR with Binder link - uses: actions/github-script@v3 + uses: actions/github-script@v6 with: github-token: ${{secrets.GITHUB_TOKEN}} script: | var PR_HEAD_USERREPO = process.env.PR_HEAD_USERREPO; var PR_HEAD_REF = process.env.PR_HEAD_REF; - github.issues.createComment({ + github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, diff --git a/doc/howto/chatops-binder.yaml b/doc/howto/chatops-binder.yaml index 950a22f..5dc414b 100644 --- a/doc/howto/chatops-binder.yaml +++ b/doc/howto/chatops-binder.yaml @@ -5,19 +5,19 @@ on: [issue_comment] # issues and PRs are equivalent in terms of comments for the jobs: trigger-chatops: # Make sure the comment is on a PR, and contains the command "/binder" - if: (github.event.issue.pull_request != null) && contains(github.event.comment.body, '/binder') + if: (github.event.issue.pull_request != null) && contains(github.event.comment.body, '/binder') runs-on: ubuntu-latest steps: # Use the GitHub API to: # (1) Get the branch name of the PR that has been commented on with "/binder" # (2) make a comment on the PR with the binder badge - name: comment on PR with Binder link - uses: actions/github-script@v3 + uses: actions/github-script@v6 with: github-token: ${{secrets.GITHUB_TOKEN}} script: | // Get the branch name - github.pulls.get({ + github.rest.pulls.get({ owner: context.repo.owner, repo: context.repo.repo, pull_number: context.payload.issue.number @@ -25,7 +25,7 @@ jobs: // use the branch name to make a comment on the PR with a Binder badge var BRANCH_NAME = pr.data.head.ref - github.issues.createComment({ + github.rest.issues.createComment({ issue_number: context.payload.issue.number, owner: context.repo.owner, repo: context.repo.repo,