Skip to content

Commit

Permalink
test5
Browse files Browse the repository at this point in the history
  • Loading branch information
AnirudhVIyer committed Jun 26, 2023
1 parent b678e2c commit aeeb97e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/binder-badge.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
name: Binder Badge
on:
pull_request:
types: [opened, synchronize]
pull_request_target:
types: [opened, synchronize]

jobs:
binder:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: comment on PR with Binder link
uses: actions/github-script@v5
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
console.log("Context:", JSON.stringify(context, null, 2)); // For debugging
var PR_HEAD_REF = github.context.payload.pull_request.head.ref;
var PR_HEAD_USERREPO = github.context.payload.pull_request.head.repo.full_name;
var issue_number = github.context.payload.pull_request.number;
var owner = github.context.payload.pull_request.base.repo.owner.login;
var repo = github.context.payload.pull_request.base.repo.name;
var PR_HEAD_REF = context.payload.pull_request.head.ref;
var PR_HEAD_USERREPO = context.payload.pull_request.head.repo.full_name;
var issue_number = context.payload.pull_request.number;
var owner = context.payload.pull_request.base.repo.owner.login;
var repo = context.payload.pull_request.base.repo.name;
github.rest.issues.createComment({
issue_number: issue_number,
owner: owner,
repo: repo,
body: `[![Binder](https://mybinder.org/badge_logo.svg)](https://binder.ploomber.io/v2/gh/${PR_HEAD_USERREPO}/${PR_HEAD_REF}) :point_left: Launch a binder notebook on branch _${PR_HEAD_USERREPO}/${PR_HEAD_REF}_`
});
});
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# CHANGELOG

## 0.1.39dev
testbinber 2

## 0.1.38 (2023-03-30)

Expand Down

0 comments on commit aeeb97e

Please sign in to comment.