# Need to make customizable the GitHub onebox number of lines limitation instead of the current 20

**URL:** <https://meta.discourse.org/t/need-to-make-customizable-the-github-onebox-number-of-lines-limitation-instead-of-the-current-20/42321>\
**Category:** Feature\
**Created:** [2016年四月10日 05:21 UTC](https://meta.discourse.org/t/need-to-make-customizable-the-github-onebox-number-of-lines-limitation-instead-of-the-current-20/42321 "2016-04-10T05:21:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmitry\_fedyuk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dmitry_fedyuk/32/293153_2.png) [@dmitry\_fedyuk](https://meta.discourse.org/u/dmitry_fedyuk)\
**Post date:** [2016年四月10日 05:21 UTC](https://meta.discourse.org/t/need-to-make-customizable-the-github-onebox-number-of-lines-limitation-instead-of-the-current-20/42321/1 "2016-04-10T05:21:54Z")

</div>

For example, the following method contains 22 lines of code, and it is impossible to publish it in a useful way.  
It is only possible to publish it as…

1. chopped:

> <https://github.com/magento/magento2/blob/052e789/app/code/Magento/Security/Model/ResourceModel/AdminSessionInfo/Collection.php#L58-L80>

1. or splitted:

> <https://github.com/magento/magento2/blob/052e789/app/code/Magento/Security/Model/ResourceModel/AdminSessionInfo/Collection.php#L58-L72>

> <https://github.com/magento/magento2/blob/052e789/app/code/Magento/Security/Model/ResourceModel/AdminSessionInfo/Collection.php#L73-L80>

It would be nice to let the forum’s administrator to decide what should be the number of lines limitation instead of the currently 20.

---

<div class="post-metadata">

**Author:** ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)\
**Post date:** [2016年四月10日 08:24 UTC](https://meta.discourse.org/t/need-to-make-customizable-the-github-onebox-number-of-lines-limitation-instead-of-the-current-20/42321/2 "2016-04-10T08:24:44Z")

</div>

Meh, if you need to share that much code copy it into a backtick-fenced block and link to the source on the next line (with a onebox breaker, such as “Source: link”).

---

<div class="post-metadata">

**Author:** ![dmitry\_fedyuk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dmitry_fedyuk/32/293153_2.png) [@dmitry\_fedyuk](https://meta.discourse.org/u/dmitry_fedyuk)\
**Post date:** [2016年十月6日 16:07 UTC](https://meta.discourse.org/t/need-to-make-customizable-the-github-onebox-number-of-lines-limitation-instead-of-the-current-20/42321/3 "2016-10-06T16:07:35Z")

</div>

I have implemented it as a plugin: [GitHub - discourse-pro/df-github-blob-onebox: The plugin removes the limitation on the maximum number of lines of code of the default GitHub blob onebox for the Discourse forum software · GitHub](https://github.com/mage2pro/df-github-blob-onebox)  
A usage example: [How does \Magento\Sales\Model\Order\CustomerManagement::create() work? - Magento 2](https://mage2.pro/t/1968)
