Coder Social home page Coder Social logo

Comments (9)

eddiewebb avatar eddiewebb commented on June 28, 2024

Thank you for the awesomely detailed and thoughtful issue submission! I fully understand the need to properly detect origin in the case of multiple upstream repos (a relatively common pattern)

Would you be willing to submit this as PR @GuyPaddock ?

from circleci-config-generator.

woodardj avatar woodardj commented on June 28, 2024

Would be nice to get this fixed.

from circleci-config-generator.

eddiewebb avatar eddiewebb commented on June 28, 2024

@GuyPaddock, @woodardj , please try the referenced changes in https://github.com/CircleCI-Public/circleci-config-generator/blob/issue-5-issue-1/cci-config-generator.sh and confirm this works for multiple remotes (will always use origin).

from circleci-config-generator.

woodardj avatar woodardj commented on June 28, 2024

Negative.

Here's my remote -v list:

Rockhopper:<<project-name>> woodardj[master]$ git remote -v
heroku	https://git.heroku.com/<<project-name>>.git (fetch)
heroku	https://git.heroku.com/<<project-name>>.git (push)
origin	[email protected]:woodardj/<<project-name>>.git (fetch)
origin	[email protected]:woodardj/<<project-name>>.git (push)

Here's what I see when I run the new script:

Rockhopper:<<project-name>> woodardj[master]$ ./cci-config-generator.sh 
Gathering info please wait...

 !  Invalid path.
 !  Syntax is: [email protected]:<app>.git where <app> is your app's name.
 !  
 !  SSH Key Fingerprint: <<snip>>

fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
git origin references `` hosted by heroku, which will be used as source.
Paste your CircleCI API token here: ^C

from circleci-config-generator.

eddiewebb avatar eddiewebb commented on June 28, 2024

Just updated, what's the output for git remote get-url --push origin | perl -ne 'print $1 if /([^\/:]*\/[^\/]*?)(.git)?$/'

from circleci-config-generator.

woodardj avatar woodardj commented on June 28, 2024

woodardj/<<project-name>>

still seeing same behavior from script. will try again in a few hours.

from circleci-config-generator.

eddiewebb avatar eddiewebb commented on June 28, 2024

Hi @woodardj thanks for validating. Your comment above changed, so I just want to be clear. THe latest script (on the branch above) should now support multiple remotes, always choosing origin. The relevant portions are:

vcs_provider="$(git remote get-url --push origin | perl -ne 'print $1 if /([A-Za-z]*)\.(com|org)/')"
project="$(git remote get-url --push origin | perl -ne 'print $1 if /([^\/:]*\/[^\/]*?)(.git)?$/')"

So if the script doesn't run, please execute those and then grab their values (i.e. echo "$project at $vcs_provider")

I'm testing locally against various patterns noted in all 3 open issues, want to be sure I haven't omitted something!

from circleci-config-generator.

woodardj avatar woodardj commented on June 28, 2024

Looks like it's all good now — this script was super smooth and easy once it worked! Thanks for putting it together! Now I've just gotta figure out why one of my repos is failing.

from circleci-config-generator.

eddiewebb avatar eddiewebb commented on June 28, 2024

Fixed in #9

from circleci-config-generator.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.