Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

soca card for private repo is not showing on portal #119

Open
debkantap opened this issue May 10, 2024 · 15 comments
Open

soca card for private repo is not showing on portal #119

debkantap opened this issue May 10, 2024 · 15 comments
Labels
bug Something isn't working

Comments

@debkantap
Copy link

Hi,
I created on private repo in my github user. I am unable to extract that private repo info in first generated csv file.
Then I manually edited the csv file and added my private repo link in the csv file.

  1. Then configured the somef with my git token
  2. Ran the "soca extract -i debkantap.csv -o debkantap-metadata"
    It created the extraction folder for my added private repo
  3. then ran the "soca portal -i debkantap-metadata -o debkantap-portal --title 'debkantap git repos'
    its output says that, it generated card for my private repo, but portal is not showing the private repo card.

Please help.

TR
Deb

@dgarijo
Copy link
Member

dgarijo commented May 10, 2024

Hello,
we don't support private repos so far, sorry :(

@debkantap
Copy link
Author

@dgarijo ..sure I understand..
In this case one can modify the portal generation code for their customize need . right?
Is this in your roadmap?

TR
Deb

@dgarijo
Copy link
Member

dgarijo commented May 11, 2024

@debkantap one can edit the JSON of the cards, or create their own program to expand it, indeed.

If you add an authentication token with access to the private repo, the program may work, but I have not tried it. If you try it please let us know how that works.

Private repos are not in the roadmap for now because soca is designed for creating public catalogs. If your repos are private, why would you want to create a public catalog to find the tool? I do not see the use case for now.

We are prioritizing other open issues on usability and tracking best practices.

@debkantap
Copy link
Author

@dgarijo ..thanks ..sure will post here if I crack the auth token.
From use case perspective, I wanted to have a extended internal devops dashboard where codes are hosted on private (on premise) gitlab, bit bucket or azure devops and I wanted to have a repo card portal internally hosted. Does this make sense?
TR
Deb

@dgarijo
Copy link
Member

dgarijo commented May 12, 2024

@debkantap yes it does make sense.
For the authentication token, when you do somef configure it will ask you for one (it is stored in a local file in your machine). That token should allow you to do requests of more repos and it may allow you accessing private ones.

@debkantap
Copy link
Author

Sure ..thanks @dgarijo!!

TR
Deb

@dgarijo
Copy link
Member

dgarijo commented May 13, 2024

I will leave this issue open until it's addressed and the solution proposed above tested

@dgarijo dgarijo reopened this May 13, 2024
@debkantap
Copy link
Author

@dgarijo.
I am able to generate card for private repo by editing the output files.
This what I did:

  1. Ran the "soca fetch -i debkantap --user -o debkantap.csv -na"
  2. then edited the debkantap.csv file to add one line at last for my private repo
  3. Configured the somef for github token
  4. then ran "soca extract -i debkantap.csv -o debkantap-metadata"
  5. then ran "soca portal -i debkantap-metadata -o debkantap-portal --title 'debkantap git repos'"
  6. then inside "debkantap-portal" folder edited the "cards_data.json" file
    "recently_updated": 0, to "recently_updated": 10,
    If "recently_updated" is zero then that card is not shown in portal. For private repo this "recently_updated" is always zero.

This is my observation. Now can you help me to modify the code so that private repo this comes as non zero.

TR
Deb

@dgarijo dgarijo added the bug Something isn't working label May 13, 2024
@dgarijo
Copy link
Member

dgarijo commented May 13, 2024

All right, this looks like a bug then. We'll have to look it up. Thanks for trying it out! Now we know it works with private repos too :)

@dgarijo
Copy link
Member

dgarijo commented May 13, 2024

Although the fetch should probably support configuring if you want private repos from an organization, which we don't do now

@debkantap
Copy link
Author

Hi @dgarijo
yes...I think there can be some parameters for private repo = yes/no.

In a different note can you pls explain the below parameters while configuring somef:

  1. Documentation classifier model file [/usr/local/lib/python3.10/site-packages/somef/models/description.p]:
  2. Invocation classifier model file [/usr/local/lib/python3.10/site-packages/somef/models/invocation.p]:
  3. Installation classifier model file [/usr/local/lib/python3.10/site-packages/somef/models/installation.p]:
  4. Citation classifier model file [/usr/local/lib/python3.10/site-packages/somef/models/citation.p]:
  5. Base URI for RDF generation [https://w3id.org/okn/i/]:

TR
Deb

@dgarijo
Copy link
Member

dgarijo commented May 14, 2024

  • The classifier URLs is where the model is available locally (you may change the model if you want).
  • The base URI is only used if you want RDF out of the tool.
    Both are optional.

@debkantap
Copy link
Author

thanks @dgarijo

Do you have any sample value for the 'Base URI' that I can try for. sorry I never did that!!

TR
deb

@dgarijo
Copy link
Member

dgarijo commented May 14, 2024

If you don't know very well what it means, I recommend not using it. In theory, you should add a namespace you own that you can use to redirect to your own resources. I own https://w3id.org/okn/i/ and that is why it's the default. But you can add any URI you wish.

@debkantap
Copy link
Author

thanks @dgarijo ..I think for generating the poral this can be used as default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants