# Unified reference detection

**URL:** https://discourse.sourcecred.io/t/unified-reference-detection/301
**Category:** Initiatives
**Tags:** 🏗️in-progress
**Created:** [October 19, 2019, 4:57pm UTC](https://discourse.sourcecred.io/t/unified-reference-detection/301 "2019-10-19T16:57:36Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Beanow](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sourcecred.io/beanow/32/98_2.png) [@Beanow](https://discourse.sourcecred.io/u/Beanow)
#### Post date: [October 19, 2019, 4:57pm UTC](https://discourse.sourcecred.io/t/unified-reference-detection/301/1 "2019-10-19T16:57:36Z")

</div>

## Status: in progress

The core types and plumbing have been done. However existing plugins (discourse, github) have not migrated to use it yet. When they’re migrated this can be considered completed.

## Champion[?](https://discourse.sourcecred.io/t/about-champions-and-heroes/291):

![Avatar Beanow](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sourcecred.io/beanow/45/98_2.png "Beanow") @Beanow

## Description:

In a recent update Discourse reference detection was added. Where GitHub detection was already present. However currently the two don’t leave their own ecosystem. GitHub can’t link to Discourse and vice-versa.

This proposes a system where each plugin can instead define it’s “referencable” types and reference detection functions to SourceCred’s core, allowing the core to cross-reference between different plugins

## Benefits:

- Cross-plugin reference detection.
- Makes it easier for new plugins to add more reference detection.

## Implementation plan:

- Discuss the system requirements.
- Implement abstractions in SourceCred core.
- Move existing plugins (GitHub, Discourse) over to use it.

## Deliverables:

- Abstractions in SourceCred core.
- Compatible GitHub and Discourse plugins.

## Dependencies:

- [Refactoring the load system](https://discourse.sourcecred.io/t/refactoring-the-load-system/629)

## References:

- [Discourse reference detection](https://discourse.sourcecred.io/t/discourse-reference-mention-detection/270)
- GitHub reference detection

## Contributions:

- [Chat about API with decentralion](https://discourse.sourcecred.io/t/unified-reference-detection/301/4)
- [UniRef: declare ReferenceDetector interface](https://github.com/sourcecred/sourcecred/pull/1508)
- [UniRef: add MappedReferenceDetector implementation](https://github.com/sourcecred/sourcecred/pull/1509)
- [UniRef: add CascadingReferenceDetector implementation](https://github.com/sourcecred/sourcecred/pull/1510)
- [UniRef: adding TranslatingReferenceDetector implementation](https://github.com/sourcecred/sourcecred/pull/1511)
- [UniRef: implement DiscourseReferenceDetector](https://github.com/sourcecred/sourcecred/pull/1530)
- ~~[UniRef: implement Initiatives reference detector](https://github.com/sourcecred/sourcecred/pull/1531)~~
- [UniRef: add urlReferenceMap to RelationalView](https://github.com/sourcecred/sourcecred/pull/1542)
- [UniRef: add GithubReferenceDetector](https://github.com/sourcecred/sourcecred/pull/1543)
- [Expose a ReferenceDetector to createPluginGraphs](https://github.com/sourcecred/sourcecred/pull/1673)

---

_[View the full topic](https://discourse.sourcecred.io/t/unified-reference-detection/301)._
