jupyterhub / mybinder.org-user-guide

Turn a Git repo into a collection of interactive notebooks. This is Binder's user documentation repository.
https://mybinder.readthedocs.io
BSD 3-Clause "New" or "Revised" License
151 stars 103 forks source link

Quietening the mybinder badge github action #212

Open manics opened 4 years ago

manics commented 4 years ago

Proposed change

This is a follow-up from https://github.com/manics/jupyter-offlinenotebook/pull/54#issuecomment-674766041

I think bots that update their comment is the way to go instead of posting a new comment each time.

I've been using the mybinder badge github action from https://github.com/jupyterhub/binder/pull/203 (and https://github.com/jupyterhub/binder/pull/206 https://github.com/jupyterhub/binder/pull/208) on some of my repos.. As @betatim pointed out above the action is a bit too chatty as it comments on every push to the PR :smile:

I've written a typescript action that comments once and updates it: https://github.com/manics/action-binderbadge

Alternative options

Do nothing

Who would use this feature?

People who want a badge on PRs without repeated notifications of new comments.

(Optional): Suggest a solution

https://github.com/manics/action-binderbadge Maybe people could try it out, then later decide whether to recommend it instead of the current action?

@hamelsmu

welcome[bot] commented 4 years ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively. welcome You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

manics commented 4 years ago

E.g. https://github.com/manics/action-binderbadge/pull/9#issuecomment-687364839 image

hamelsmu commented 4 years ago

Wow this is so cool @manics !!!

hamelsmu commented 4 years ago

@choldgraf @betatim check it out ☝️ I think this is a big improvement!

choldgraf commented 4 years ago

oh nice! I feel like if this is an improvement to our current action, the best path forward would be to upstream these improvements to it. What do you think?

hamelsmu commented 4 years ago

Dumb question : I don’t think there is a “current” action anywhere to upstream to, right? Am I missing something? Sorry for being slow

On Fri, Sep 4, 2020 at 2:33 PM Chris Holdgraf notifications@github.com wrote:

oh nice! I feel like if this is an improvement to our current action, the best path forward would be to upstream these improvements to it. What do you think?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jupyterhub/binder/issues/212#issuecomment-687398917, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALKJEQJG6YJWRTXGT3T4DLSEFMMHANCNFSM4QZMD7LA .

hamelsmu commented 4 years ago

More clarity - I think what @manics made is a new Action, whereas all we have for binder badges are example GitHub workflow examples? Perhaps, it could be worthwhile after testing etc to adopt this Action, too into JupyterHub?

manics commented 4 years ago

Exactly! The current action is a GitHub script that uses actions/github-script@v1, whereas this is a standalone action, so upstreaming effectively means transferring the action repo to the jupyterhub org. That's why I thought people should try it out first before we commit to supporting it.

choldgraf commented 4 years ago

ahh I see - OK cool I think I had thought we already had an action for some reason , but was mistaken 👍

manics commented 4 years ago

@choldgraf Maybe you're thinking of https://github.com/jupyterhub/repo2docker-action ?

choldgraf commented 4 years ago

mostly I am just sleep deprived because I've got a 16 day old infant on my hands :-)

hamelsmu commented 4 years ago

No worries. Seems like you are the most productive new father I know! Also congrats!🎈

betatim commented 4 years ago

I like it when bots update their comments instead of spamming a PR with comments :)

But I know nothing about GH Actions vs workflows so I defer to someone else.

On the "trying it out" front: can we enable this for the https://github.com/binder-examples/ repositories?

manics commented 4 years ago

I've opened PRs for the 4 pinned binder-example repositories.

I've also got a script that can be used to add it (or any other config file) to other repos... https://github.com/manics/github-batch-updater for r in conda r-conda r requirements; do GITHUB_TOKEN=<secret> ./main.js addfile binder-badge.yml --base binder-examples/$r --dest .github/workflows/binder-badge.yml --branch add-binder-badge --title 'Automatically add mybinder badge on PRs' --body $'Add workflow to create a binder badge comment on PRs\n\nSee https://github.com/jupyterhub/binder/issues/212#issuecomment-687706341' --force; done