Skip to content

GitLab Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab FOSS
GitLab FOSS
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 0
    • Merge requests 0
  • Requirements
    • Requirements
    • List
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLab FOSSGitLab FOSS
  • Issues
  • #33047

Closed (moved)
Open
Created May 30, 2017 by Mike Purvis@mikepurvis

Plugin hooks for annotating source view

Description

I have a number of source-related pages and apps and on my server, for example:

  • Generated API docs, eg doxygen/sphinx/swagger
  • Pages rendered from package metadata, eg setup.py/PKG-INFO
  • Issue/feature trackers other than the one built into GitLab.
  • Cross-reference management (Kythe)
  • Perf characterization info

Right now, these kinds of pages are capable linking to GitLab, but there isn't a great way for GitLab to link back. This prevents GitLab from being the kind of authoritative resource that it could be for us.

Proposal

A new kind of webhook can be registered which queries for file/hash and can retrieve annotation data. The hook fires asynchronously with the source code page load so as not to slow it down. When the hook returns, a client side JavaScript function annotates the source view accordingly, linking function definitions, ticket references, variables and other symbols to appropriate external docs as supplied

If the hook takes too long to return, it times out and no annotation occurs.

The motivation in the end is to allow a richer class of plugins; plugins which not only respond to GitLab events and mutate its state, but also that augment its own views.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None