community-plugins icon indicating copy to clipboard operation
community-plugins copied to clipboard

[Plugin] Sourcegraph

Open kissmikijr opened this issue 4 years ago • 8 comments

Summary

The basic idea is that if you or your company already uses sourcegraph this plugin would give the possibility to search a components source code through the sourcegraph API.

It should extend the component entity page with a new tab called sourcegraph. It should introduce an annotation to be able to enable this for the appropriate components ( the ones that are indexed by your sourcegraph ) I have 2 features in my mind currently.

  • Search in the current component(repository) sourcecode and it would list the results under it.
  • A notification if your component( repository) has an open batch change

Probably only a frontend component is needed if we can use the built in proxy. To access the sourcegraph api we need to provide an authorization header so a sourcegrpah specific config extension is needed in the app-config.yaml

kissmikijr avatar Jul 22 '21 12:07 kissmikijr

I plan to start working on this, but didn't figure it out how can I assigne it to myself :/

kissmikijr avatar Jul 22 '21 14:07 kissmikijr

I can assign you!

benjdlambert avatar Jul 22 '21 15:07 benjdlambert

@kissmikijr did you start working on this?

I've been collaborating with SourceGraph on a blog post on how to use Batch Changes to onboard projects Backstage. We've also been talking about creating an entity provider that would use SourceGraph Code Search to emit entities and Code Monitoring to get notifications when files change.

Could we combine efforts on this?

taras avatar Sep 14 '22 13:09 taras

I did start working on it, but put it on a side track for quiet sometime now! I can dig this up. I'm happy to combine efforts!

kissmikijr avatar Sep 14 '22 13:09 kissmikijr

I've been collaborating with SourceGraph on a blog post on how to use Batch Changes to onboard projects Backstage.

When I was at Prezi we used Batch Changes exactly for this, to rollout a bunch of catalog files to the services. For me the monitoring of these changes are the biggest value, I think rolling out could be also a scaffolder template with custom actions, but in that case no way to monitor the state of the PRs

kissmikijr avatar Sep 14 '22 13:09 kissmikijr

I am also interested in a plugin/component as described in the opening post, especially the integration of SourceGraph search into backstage in some form. @kissmikijr do you have any ongoing development that you can share?

langeno avatar Mar 24 '23 10:03 langeno

any updates on this issue? am also very interested !

nia-potato avatar May 30 '24 22:05 nia-potato

@nia-potato : I started some activitiy on this, but never really finished it (and it also was a big hack).

Instead of doing a "proper" implementation, I executed a search via the Sourcegraph GraphQL API and appended the results to the normal search results data structure somewhere between them beeing returned and them beeing displayed. I think this had limitations, e.g. proper pagination was broken.

If you want I can try to see if I still find that code, but I am somewhat convinced that this is no proper solution for upstream.

langeno avatar Jun 02 '24 06:06 langeno

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Sep 07 '24 18:09 github-actions[bot]