PaulRBerg / foundry-template

Foundry-based template for developing Solidity smart contracts
MIT License
561 stars 110 forks source link

Add rename script and GitPod badge #5

Closed ahmedali8 closed 2 years ago

ahmedali8 commented 2 years ago

create.yml github action auto updates README badges and package.json metadata when clicking "Use this template" to spin up your project from the template.

Hi @paulrberg, please do share your feedback, Thanks!

PaulRBerg commented 2 years ago

LGTM. Thanks @ahmedali8!

  1. Does GitHub expose any environment variables for the source repository's name and owner? If it does, we might be able to use those env vars rather than writing paulrberg/foundry-template in the rename.sh script. I see that GitHub already exposes something via the github.event.repository.is_template boolean.
  2. I wonder whether it would be worth it to turn the rename.sh script into a standalone GitHub Action, which we would then simply call from create.yml?
ahmedali8 commented 2 years ago

Hi @paulrberg,

  1. I could not find any env variable for fetching the original template's owner and repo.
  2. Yeah it's a great idea I'll try to create a POC in the upcoming days.
PaulRBerg commented 2 years ago
  1. Argh. Thanks for taking a look.
  2. that's awesome, thanks, I'll take a look. Maybe we could collaborate on writing the GitHub Action.
ahmedali8 commented 2 years ago

Yeah, would love to collaborate for sure.

When and how could we get started?

PaulRBerg commented 2 years ago

Sorry, what I meant is, if you are able to write the first version of the GA, I would take a look and review it!

I don't have availability to write the GA from scratch. If you don't have either (which is totally cool, I mean, this is my repo after all!), we can just merge in your PR as is.

ahmedali8 commented 2 years ago

I'll start with the GA soon (could take some time), meanwhile I guess if it's okay you can merge this and once the GA is finalised and all looks great then we can add it in the template. what do you think?

PaulRBerg commented 2 years ago

Just merged it in.

Thanks for your contribution!