Citing GitHub Repositories, Issues, and Code in Discourse

Table of Contents

  1. Citing a GitHub Repository
  2. Citing a GitHub Issue or Pull Request
  3. Citing Specific Code or Lines

As CS-DCC uses GitHub for code management and issue tracking, you may often need to reference GitHub content. Discourse makes it easy to cite repositories, issues, and specific lines of code — particularly from public repositories.

Citing a GitHub Repository

  • Copy the repository URL from GitHub.
  • Paste it directly into your Discourse post.
    Discourse will automatically embed a preview.

For example, this is a citation for https://github.com/cidgoh/DataHarmonizer/

github citation screenshot


Citing a GitHub Issue or Pull Request

  • Copy the issue or PR URL from GitHub.
  • Paste it directly into your post.

For example, this is a citation for an issue https://github.com/cidgoh/DataHarmonizer/issues/439

github cite an issue screenshot


Citing Specific Code or Lines

  • Open the file in the GitHub repository.
  • Click a line number or select a range of lines to highlight.

select github code lines screenshot

  • Copy the URL from your browser (it includes the line numbers, e.g., https://github.com/cidgoh/DataHarmonizer/blob/master/script/tabular_to_schema.py#L1-L24).
  • Paste the URL in your post.

github citation by lines screenshot