awesome-notebooks icon indicating copy to clipboard operation
awesome-notebooks copied to clipboard

1235 generate contribution certificate when pr is merged

Open SuhasBRao opened this issue 2 years ago • 18 comments

Creating a PR to generate a contribution certificate. A contribution certificate is generated when a PR is merged with the master branch.

SuhasBRao avatar Oct 14 '22 16:10 SuhasBRao

If everything works well, a certificate should be generated after this PR is merged to master branch.

SuhasBRao avatar Oct 14 '22 16:10 SuhasBRao

Hi @jravenel and @Dr0p42 , can you review the changes in this PR

SuhasBRao avatar Oct 17 '22 15:10 SuhasBRao

Hey @SuhasBRao just a doubt. Where is the certificate generated? Is it pushed as a comment in the issue? in the PR?

jravenel avatar Oct 17 '22 15:10 jravenel

Python script generates the certificate in ** .github/Contributor_certificates/ ** This is then shown in the comments section of the PR

SuhasBRao avatar Oct 17 '22 16:10 SuhasBRao

After python script generates the certificate it is pushed as a commit using .yaml

SuhasBRao avatar Oct 17 '22 16:10 SuhasBRao

as a commit where? Not clear to meet where the actual file is generated

jravenel avatar Oct 17 '22 16:10 jravenel

Inside .gitHub folder a new folder will be created with the name Contributor_certificates inside which will be the certificates

SuhasBRao avatar Oct 17 '22 16:10 SuhasBRao

Inside .gitHub folder a new folder will be created with the name Contributor_certificates inside which will be the certificates

Oh, ok, I'm sorry, this is badly scoped maybe by me, I was hoping to see this as a comment in the Issue or the PR associated. .. is it possible?

Otherwise we will just overload the repo with certificates, that will grow the size of the repo and we try to keep it as small as possible.

jravenel avatar Oct 17 '22 16:10 jravenel

Oh, sorry my bad, I thought of creating a separate folder for it. Yes you are right this will overload the repo. I will try to create a certificate just as a PR comment. I think we can do it.👍

SuhasBRao avatar Oct 17 '22 16:10 SuhasBRao

Will it be fine if I just host the image elsewhere and link it as image. I'll explore more about this.

SuhasBRao avatar Oct 17 '22 16:10 SuhasBRao

Will it be fine if I just host the image elsewhere and link it as image. I'll explore more about this.

Hello @SuhasBRao, I don't know if it's possible to use the assets upload mechanism of Github, that would be awesome.

Worst case scenario then we may need to provide an s3 location for this.

Dr0p42 avatar Oct 17 '22 17:10 Dr0p42

I actually tried using GitHub artifacts but I wasn't able to get links for those artifacts. Is there any way we can get links for those.

SuhasBRao avatar Oct 17 '22 17:10 SuhasBRao

@SuhasBRao @Dr0p42 it it's too complicated, and if we have the email of the contributors (we should), is it more simple to send email to the contributor?

jravenel avatar Oct 17 '22 17:10 jravenel

@SuhasBRao @Dr0p42 it it's too complicated, and if we have the email of the contributors (we should), is it more simple to send email to the contributor?

I think the upload on the pull request would be a nice touch.

I actually tried using GitHub artifacts but I wasn't able to get links for those artifacts. Is there any way we can get links for those.

@SuhasBRao can you point me to some code you have already please? Just so I can see it?

Thank you

Dr0p42 avatar Oct 17 '22 17:10 Dr0p42

@Dr0p42 Yeah, I'll share it just a minute

SuhasBRao avatar Oct 17 '22 17:10 SuhasBRao

@Dr0p42 , This is an old version I was trying with, here. Its kind of messy. Ignore those comments.

SuhasBRao avatar Oct 17 '22 17:10 SuhasBRao

Guys @jravenel and @Dr0p42, I found a free image hosting website called imgbb. Using this I modified generate_certificate.yaml a bit, now we can put the certificate in PR without the need to store it on github. Here's the snapshot of the same,

Screenshot from 2022-10-19 12-15-32

Here's the workflow run,

Screenshot from 2022-10-19 12-15-56

We just need to sign up for imgbb to get a free token, and store it as a github secret that will be accessed by .yaml. No need to overload the repository with certificates,

Let me know what you think ?

SuhasBRao avatar Oct 19 '22 06:10 SuhasBRao

@jravenel and @Dr0p42, can you review these changes? And let me know what you think about the certificate being hosted on imgbb.

SuhasBRao avatar Oct 21 '22 08:10 SuhasBRao

I think we should reopen this and add some suggestion of posts to be shared on social media using generative AI @SuhasBRao @FlorentLvr

jravenel avatar May 25 '23 14:05 jravenel

To close this PR, we discussed today about:

1/ Get all the files added and create a certificate for each file Let's cover all the edge cases.

2/ make a suggestion of post on Twitter and LinkedIn using OpenAI @FlorentLvr can suggest a prompts? → maybe in another issue this one

jravenel avatar May 25 '23 15:05 jravenel

Hey @FlorentLvr do i have to make it generate certificate for all the files modified in a PR, if that's the case won't this be too much lets say a person modifies 5 .ipynb files then, we would have to generate 5 certificates.

Also right now we are saving the cerficates in imgbb, a free image hosting platform. Shall i continue with the same.

SuhasBRao avatar May 27 '23 08:05 SuhasBRao

PR

Hi @SuhasBRao! You are right. It might be too much. Do you think you can add all files changed in one certificate? About the certificate in imgbb, to your opinion, are there any red flags using this?

FlorentLvr avatar May 29 '23 14:05 FlorentLvr

PR

Hi @SuhasBRao! You are right. It might be too much. Do you think you can add all files changed in one certificate? About the certificate in imgbb, to your opinion, are there any red flags using this?

Hi @SuhasBRao, just checking? Let me know if it is possible to do :)

FlorentLvr avatar Jun 10 '23 10:06 FlorentLvr

PR

Hi @SuhasBRao! You are right. It might be too much. Do you think you can add all files changed in one certificate? About the certificate in imgbb, to your opinion, are there any red flags using this?

Hi @SuhasBRao, just checking? Let me know if it is possible to do :)

Hey @FlorentLvr, yes its possible to add the files, I'm not able to figure out the part to make a suggestion to post it in linkedin or twitter using OpenAI

SuhasBRao avatar Jun 10 '23 11:06 SuhasBRao

@FlorentLvr , @jravenel let me know what you think of the certificate, it also contains details about the files modified, this checks for all the files. Do i have to change it to detect only the .ipynb files The certificate contains certain values for testing purposes.

image

SuhasBRao avatar Jun 10 '23 14:06 SuhasBRao

PR

Hi @SuhasBRao! You are right. It might be too much. Do you think you can add all files changed in one certificate? About the certificate in imgbb, to your opinion, are there any red flags using this?

Hi @SuhasBRao, just checking? Let me know if it is possible to do :)

Hey @FlorentLvr, yes its possible to add the files, I'm not able to figure out the part to make a suggestion to post it in linkedin or twitter using OpenAI

@SuhasBRao, great work! About the linkedin or twitter workflow, we will work it out in another issue :)

FlorentLvr avatar Jun 15 '23 09:06 FlorentLvr

@FlorentLvr , @jravenel let me know what you think of the certificate, it also contains details about the files modified, this checks for all the files. Do i have to change it to detect only the .ipynb files The certificate contains certain values for testing purposes.

image

@jravenel, sounds good to me! What do you think?

FlorentLvr avatar Jun 15 '23 09:06 FlorentLvr

I want my first certificate 😉

jravenel avatar Jun 19 '23 18:06 jravenel

Let all of us get a certificate and post it in social media 😊

SuhasBRao avatar Jun 20 '23 02:06 SuhasBRao

@FlorentLvr, we need to add a secret for the the action to work, also i'm making few more changes will create a new PR soon.

SuhasBRao avatar Jun 20 '23 05:06 SuhasBRao