atomist / sdm-pack-aspect

Uses Atomist Project API to visualize important data about your organization
Apache License 2.0
15 stars 4 forks source link

Analyze forked repositories #182

Closed jrday closed 5 years ago

jrday commented 5 years ago

atomist analyze github repositories isn't detecting forked repositories.

Test org: https://github.com/xylocarp-whelky 189 forked repos, 1 repo created directly in the org

$ atomist analyze github repositories
choose repositories to analyze, by owner or query
? GitHub owner of repositories to analyze xylocarp-whelky
? A GitHub search query to choose repositories 
# general 2019-08-24 15:03:28 Analysis result: {
    "repositoriesDetected": 1,
    "projectsDetected": 0,
    "failed": [
      {
        "repoUrl": "https://api.github.com/repos/xylocarp-whelky/blank-repo",
        "whileTryingTo": "clone",
        "message": "Child process 4822 exited with non-zero status 128: /var/folders/l1/h1rth491795_tvrrm8xd4v200000gn/T/atm-3913-3913o8pN9f2G4a3B ==> git 'fetch' '--unshallow'\nfatal: --unshallow on a complete repository does not make sense\n"
      }
    ],
    "keptExisting": [],
    "persistedAnalyses": []
  }
johnsonr commented 5 years ago

It should be possible to analyze forked repos without error, but I'm not sure it should be the default.

jessitron commented 5 years ago

It is possible now, this way:

atomist analyze github by query --query "org:xylocarp-whelky fork:true"

I can add fork:true by default, and then you can use the query syntax to do an org without it

I'm not in favor of making it an explicit option, and gradually building CLI parameters to abstract the GitHub query syntax :-/

ghost commented 5 years ago

That works well @jessitron and I agree @johnsonr this should not be the default, but possible.

slight tweak to make that command with query switch work:

atomist analyze github repositories by query --query "org:xylocarp-whelky fork:true"

jessitron commented 5 years ago

... if you update, the word "repositories" is gone from that command.

OK to close the issue?