{"action":"created","issue":{"url":"https://api.github.com/repos/discord-csharp/MODiX/issues/656","repository_url":"https://api.github.com/repos/discord-csharp/MODiX","labels_url":"https://api.github.com/repos/discord-csharp/MODiX/issues/656/labels{/name}","comments_url":"https://api.github.com/repos/discord-csharp/MODiX/issues/656/comments","events_url":"https://api.github.com/repos/discord-csharp/MODiX/issues/656/events","html_url":"https://github.com/discord-csharp/MODiX/issues/656","id":548648189,"node_id":"MDU6SXNzdWU1NDg2NDgxODk=","number":656,"title":"feature request: github link as formatted code","user":{"login":"MithrilMan","id":5107375,"node_id":"MDQ6VXNlcjUxMDczNzU=","avatar_url":"https://avatars3.githubusercontent.com/u/5107375?v=4","gravatar_id":"","url":"https://api.github.com/users/MithrilMan","html_url":"https://github.com/MithrilMan","followers_url":"https://api.github.com/users/MithrilMan/followers","following_url":"https://api.github.com/users/MithrilMan/following{/other_user}","gists_url":"https://api.github.com/users/MithrilMan/gists{/gist_id}","starred_url":"https://api.github.com/users/MithrilMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MithrilMan/subscriptions","organizations_url":"https://api.github.com/users/MithrilMan/orgs","repos_url":"https://api.github.com/users/MithrilMan/repos","events_url":"https://api.github.com/users/MithrilMan/events{/privacy}","received_events_url":"https://api.github.com/users/MithrilMan/received_events","type":"User","site_admin":false},"labels":[{"id":659068661,"node_id":"MDU6TGFiZWw2NTkwNjg2NjE=","url":"https://api.github.com/repos/discord-csharp/MODiX/labels/enhancement","name":"enhancement","color":"84b6eb","default":true,"description":"This item enhances existing functionality with new or improved features."},{"id":1077316475,"node_id":"MDU6TGFiZWwxMDc3MzE2NDc1","url":"https://api.github.com/repos/discord-csharp/MODiX/labels/proposal","name":"proposal","color":"9655b5","default":false,"description":"This item proposes new functionality for MODiX."}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2020-01-12T23:56:04Z","updated_at":"2020-01-13T00:22:44Z","closed_at":null,"author_association":"NONE","body":"feature request is simple (by description)\r\nwhen someone post a link to a github repo, with a region delimiter (e.g. from line X to line Y) the bot should post the code contained between these lines\r\n\r\ne.g.\r\nhttps://github.com/dotnet/runtime/blob/master/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/List.cs#L396-L412\r\n\r\nshould be shown in the channel as\r\n\r\n```\r\n// Ensures that the capacity of this list is at least the given minimum\r\n// value. If the current capacity of the list is less than min, the\r\n// capacity is increased to twice the current capacity or to min,\r\n// whichever is larger.\r\n//\r\nprivate void EnsureCapacity(int min)\r\n{\r\n\tif (_items.Length < min)\r\n\t{\r\n\t\tint newCapacity = _items.Length == 0 ? DefaultCapacity : _items.Length * 2;\r\n\t\t// Allow the list to grow to maximum possible capacity (~2G elements) before encountering overflow.\r\n\t\t// Note that this check works even when _items.Length overflowed thanks to the (uint) cast\r\n\t\tif ((uint)newCapacity > Array.MaxArrayLength) newCapacity = Array.MaxArrayLength;\r\n\t\tif (newCapacity < min) newCapacity = min;\r\n\t\tCapacity = newCapacity;\r\n\t}\r\n}\r\n```\r\n\r\nfor people who work with Slack, slack has already this feature in its github bot"},"comment":{"url":"https://api.github.com/repos/discord-csharp/MODiX/issues/comments/573475096","html_url":"https://github.com/discord-csharp/MODiX/issues/656#issuecomment-573475096","issue_url":"https://api.github.com/repos/discord-csharp/MODiX/issues/656","id":573475096,"node_id":"MDEyOklzc3VlQ29tbWVudDU3MzQ3NTA5Ng==","user":{"login":"MithrilMan","id":5107375,"node_id":"MDQ6VXNlcjUxMDczNzU=","avatar_url":"https://avatars3.githubusercontent.com/u/5107375?v=4","gravatar_id":"","url":"https://api.github.com/users/MithrilMan","html_url":"https://github.com/MithrilMan","followers_url":"https://api.github.com/users/MithrilMan/followers","following_url":"https://api.github.com/users/MithrilMan/following{/other_user}","gists_url":"https://api.github.com/users/MithrilMan/gists{/gist_id}","starred_url":"https://api.github.com/users/MithrilMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MithrilMan/subscriptions","organizations_url":"https://api.github.com/users/MithrilMan/orgs","repos_url":"https://api.github.com/users/MithrilMan/repos","events_url":"https://api.github.com/users/MithrilMan/events{/privacy}","received_events_url":"https://api.github.com/users/MithrilMan/received_events","type":"User","site_admin":false},"created_at":"2020-01-13T00:22:44Z","updated_at":"2020-01-13T00:22:44Z","author_association":"NONE","body":"in my slack experience, an un-highlighted code was enough, because often it's a matter of just showing few lines of code without requiring the user to navigate to the link"}}
{"actor":{"display_login":"MithrilMan"}}