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

[Feature Request] Open CI URL #146

Open
arunvelsriram opened this issue Jul 21, 2019 · 4 comments
Open

[Feature Request] Open CI URL #146

arunvelsriram opened this issue Jul 21, 2019 · 4 comments

Comments

@arunvelsriram
Copy link
Contributor

Add a flag to open CI/CD tool URL:

git open --cx

Based on the contents of the repo we could identify the CI URLs. However, there are a lot of limitations. For travis, circleci etc. we could identify the URL easily but for self-hosted CI/CD tools like GoCD, Jenkins it will be difficult.

Adding this idea here so that someone could come up with a better way to do it. Let me know if this feature makes sense.

@ffes
Copy link
Collaborator

ffes commented Aug 14, 2019

Since GitLab has CI/CD build in adding /pipelines to the base url of the repo gets the job done.

For travis, circleci etc. we could identify the URL easily...

How?

@jormaechea
Copy link

jormaechea commented Aug 21, 2020

This would be really nice.
Now Github has Github Actions (adding /actions to the base url)
And Bitbucket has Bitbucket Pipelines (adding /addon/pipelines/home to the base url).

Would you consider a PR for this? 😄

Edit: If .travis.yml file is present, ir could open https://travis-ci.org/{username}/{repo}
I guess that CircleCI and other SaaS CI providers have similar behaviours.

@ffes
Copy link
Collaborator

ffes commented Aug 23, 2020

If .travis.yml file is present, ir could open https://travis-ci.org/{username}/{repo}

Not sure is there is an easy way for the batch script to check if the file exists in the root of the project. You can be a couple of subdirectories deep. As far as I know git ls-files doesn't help you with that either.

@jormaechea
Copy link

jormaechea commented Aug 23, 2020

I made some googling and git rev-parse --show-toplevel should do the trick to get the root dir of the repo.

Edit: typo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants