Fetch dependencies from a project in Github using CLI - github

I would like to know -
Are there any commands for GitHub, allowing me to fetch the dependencies of a project in github?
At Github, under 'Insights' tab, I may look for the dependencies, by pressing the 'Dependencies Graph' button, and that displays all the dependencies for this project.
My qustion is -
Can I write a scrypt, to fetch these dependencies?
I tried to navigate in postam and make a GET request to the url
'https://github.com/-User-/-Project-/network/dependencies'
and I recive an 404 response.
But when I put the same url in chrome, I can see the Dependencies Graph for that project.

You can’t. There are now API calls available for this information at the moment. I’ve been wanting to get that information myself as well 😕.

Related

Jira integration in Backstage giving 404 error

I'm currently testing Backstage for my company, and I tried various continuous integration pipelines like Github, Jira, Jenkins, and more. But I'm facing an issue with the Jira plugin. Maybe it's just a bad setup.
In my component, I can see the Jira entity, but every time, it says:
failed to fetch data, status 404: Not Found
When I look in the browser's console (network), I can see this 404, and this is the query used:
http://localhost:7007/api/proxy/jira/api/rest/api/latest/project/undefined
Why do I have undefined? Is it because the jira/project-key variable is not at the right place? Actually, it's in the catalog-info.yaml under metadata.
I followed all documentation I could find, but one section is not enough clear for me. It's about the annotations thing. It says `Add annotation to the yaml config file of a component. I created a component yesterday, but I don't see any file for it.
Thanks in advance.
Ok, I found the solution.
In the documentation, the file, called catalog-info.yaml, is not the one at the Backstage repository's root, but to a file in a different repository that will be used as component template in Backstage.
If you create a new repository (ex a fork from Symfony), you will have to add the file catalog-info.yaml with various informations if you want to use this repository as template for your projects.

Get repository content with sbt

I guess, the following is a basic question. However, I have failed to google it.
There is an URL list of repositories in the file .sbt\repositories. Is there a common approach to explore these repos, to get list of libraries in them.

Teamcity build badge on github

I wanted to add a teamcity build badge on my github page.My repository is a private github repository.
I started of by including the code below as the link said.
<a href="http://teamcity/viewType.html?buildTypeId=myID&guest=1">
<img src="http://teamcity/app/rest/builds/buildType(id:myID)/statusIcon"/>
</a>
The problem I got stuck at then,was that the image was being blocked.I suspected that this was because my teamcity server was on http while my github repo used https.
In my case it is not possible to change teamcity to use https and so this was not an option.
Any workarounds/suggestions for how to get my build badges on github?
Make sure to check "enable status widget" checkbox on the General Setting page:
For anyone looking for the markdown link syntax of the TeamCity build badge, here it is:
[![Build Status](http://teamcity/app/rest/builds/buildType:(id:myID)/statusIcon)](http://teamcity/viewType.html?buildTypeId=myID&guest=1)
For the user pages displayed, GitHub retrieves the images from the server side and replaces the original image with the one cached. That is why, the TeamCity instance should be accessible externally and the status icon should be available to any user: the easiest way to ensure that is to check "enable status widget" as Boris suggested.
The image is also cached quite aggressively by GitHub, so the badge shown can be outdated. Use at least TeamCity 10.0.2 which has added HTTP headers trying to prevent that caching.

Create new vendor application for YII2 in GitHub

I created a very simple plugin for yii2 and added it to Github.
https://github.com/harlangray/languageswitcher
When I add "harlangray/languageswitcher": "*" to the require section and run composer update on my project, it gives me an error.
Problem 1
- The requested package xxxxx could not be found in any version, there may be a typo in the package name.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see https:xxxxx for more details.
Read http:yyyyy for further common problems.
I am really new to github and composer. Can someone give me the steps to create a plugin and make it uninstallable via composer?
Thank you
Composer has no idea about github packages, unless you add them as under the repositories as a package.
If you want to be able to install it via the require section you'll need to add your package to Packagist. This is the site composers gets the package meta information from.
Only thing you have to do is register, click the big "Submit Package" button and point it to your github project. Optionally (but advised) you could setup a hook in github to update packagist every time you commit something to github so that you don't have to do it manually.

How to make GitHub correctly show the build status image of the Jenkins Build Status plugin

Here's an example of a project:
https://github.com/storm-enroute/macrogl
The README.md of this project contains a build status image from a Jenkins running on a server somewhere else:
[![Build Status](https://ci.storm-enroute.com:8080/job/public-macrogl/badge/icon)](https://ci.storm-enroute.com:8080/job/public-macrogl/)
This image is rendered perfectly in Stackoverflow and Github static pages, but on the Github website it is cached to the content delivery network called Fastly. Opening the image URL shows "Not found".
Why is this happening?
How do I have the Github web interface render a markdown with such an image correctly?
How do I have the Github web interface render a markdown with such an image correctly?
The syntax is correct.
Some other project leverage such feature (see LibGit2Sharp Readme or libgit2 Readme for instance).
Why is this happening?
Few seconds ago, https://ci.storm-enroute.com:8080/job/public-macrogl/badge/icon was returning a 404 for me. It looks now fixed.
However, there's a possibility that when the CI server is offline/can't be reached, the 404 is temporarily cached by Camo and served until the cache expires.
install jenkins plugin for embeddable-build-status from: https://plugins.jenkins.io/embeddable-build-status
add to your README.md the tags you want:
Plain Link (with view)
http://URL:8080/buildStatus/icon?job=JOB_NAME
Plain Link (without view)
http://URL:8080/buildStatus/icon?job=JOB_NAME
Markdown (with view)
Build Status http://URL:8080/buildStatus/icon?job=JOB_NAME
Markdown (without view)
Build Status http://URL:8080/buildStatus/icon?job=JOB_NAME
3.Configure jenkins security to allow the status view:
Manage Jenkins -> Configure Security -> Authorization -> choose matrix-based security and check the "ViewStatus" box for the Anonymous user.
if admin user is not there, add it and give it permission to all the boxes.
For anyone else spending way more time than intended on this and wanting a little clarity on what link(s) to use after installing the Emeddable Build Status plugin:
If you navigate to the job in the Jenkins (jenkins_home >> repo >> project >> branch), there's a "Emeddable Build Status" widget you can click on the left pane, and it'll show list exactly what links you can use for your specific jobs.
The following URL structure might also get you to the embeddable build status page:
https://<jenkins_host>/job/<github_owner_or_org>/job/<github_repo_name>/job/master/badge/
Update: I had a similar issue. It turned that the cache server requires the image to be hosted behind a HTTPS, with a fully valid SSL certificate chain (CA(s) + cert). Once your server provides the full cert chain, github will display your badge.