docbrown/app/models
Daniel Uber 32a8c39ca2
If there is no body of the linked issue or PR, don't render markdown (#14804)
* If there is no body of the linked issue or PR, don't render markdown

Return a readable and actionable error to the user when they're
linking a PR that doesn't have a body (and we can't render).

This is not needed if there's a fallback path to render _something_ in
the absence of a body (or if it's safe to just skip the `body` rendered
inside the github issue liquid template partial).

* When there is no issue body to render, just show PR title and link

Set the body to an empty string and let github return an empty html
body.

It would be possible to substitute this with a conditional to only
post if a body was present, or assign processed_html directly if not.

* Don't use github api when we have an empty body

Save a network trip and just replace the processed html body with an
empty string when the issue body was nil.
2021-09-28 09:20:49 -05:00
..
ahoy [15 Min Fix]: Fix incorrect scope used by metrics:overview rake task (#13138) 2021-03-25 17:31:10 -07:00
articles Rubocop: Move from OpenStruct to Struct in Organization (#9431) 2020-07-30 21:04:05 +07:00
concerns Remove CustomProfileField (#14286) 2021-07-22 10:05:39 +07:00
liquid_tags [deploy] Add role and docs for user subscription liquid tag (#9170) 2020-07-08 14:07:53 -04:00
settings Add display_in_directory setting (#14733) 2021-09-15 13:34:31 -04:00
users Remove redundant freeze calls (#14596) 2021-08-26 10:01:08 -04:00
webhook Add missing presence validators to models (#10495) 2020-10-01 16:15:32 +02:00
admin_menu.rb Add feature flag for Connect (#14644) 2021-09-13 10:45:56 -04:00
announcement.rb Add Polymorphism to Broadcasts (Part 1) (#9231) [deploy] 2020-07-13 09:36:19 -06:00
api_secret.rb Limit the Number of API Keys a User Can Have (#7870) 2020-05-15 11:33:02 +02:00
application_record.rb Filter only ordinary tables in estimated count (#8913) 2020-06-25 14:04:13 -04:00
article.rb Make Rubocop happy again (#14729) 2021-09-14 09:15:01 -05:00
audit_log.rb Add missing presence validators to models (#10495) 2020-10-01 16:15:32 +02:00
badge.rb Refactor cache purging (#12811) 2021-03-02 10:09:05 -05:00
badge_achievement.rb Use new UserSetting and UserNotificationSettings and Ignore Related User Table Fields (#14121) 2021-07-08 09:31:34 -05:00
banished_user.rb Introduce BanishedUser table (#5589) [deploy] 2020-01-21 17:15:58 -05:00
broadcast.rb Fix Rails/HasManyOrHasOneDependent for Broadcast and Collection (#9662) 2020-08-07 14:27:24 -04:00
campaign.rb Split Settings::Campaign from SiteConfig (#13238) 2021-04-19 10:01:03 +07:00
chat_channel.rb 🚀 Ability to allow tag moderators to create chat channels (#9741) 2020-12-08 13:10:36 +07:00
chat_channel_membership.rb Remove Elasticsearch ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ (#13606) 2021-05-03 11:09:45 -04:00
collection.rb Fix Rails/HasManyOrHasOneDependent for Broadcast and Collection (#9662) 2020-08-07 14:27:24 -04:00
comment.rb Remove redundant freeze calls (#14596) 2021-08-26 10:01:08 -04:00
config.rb Add single resource admin concept (#5069) [deploy] 2019-12-11 13:17:55 -05:00
consumer_app.rb Make Consumer Apps dictate aasa results (#14015) 2021-06-24 08:36:11 -06:00
credit.rb Replace activerecord-import with Rails 6 insert_all and upsert_all (#8407) 2020-06-12 11:16:06 +02:00
data_update_script.rb Navigation Items and Role access for Data Update Scripts (#12292) 2021-02-09 17:41:14 +02:00
device.rb Add mutable flag to APNS notifcation payload (#14777) 2021-09-21 15:37:43 -05:00
discussion_lock.rb Create DiscussionLocks (#13905) 2021-06-10 11:04:33 -04:00
display_ad.rb Fix inconsistencies with DisplayAd (#14789) 2021-09-28 09:22:07 -04:00
display_ad_event.rb Remove unused columns from display_ad_events (#6806) [deploy] 2020-03-25 17:47:05 -04:00
email_authorization.rb Refactor Admin Member Detail view - Tools section (#14283) 2021-08-17 18:55:53 +02:00
email_message.rb Look for <html> tags instead of <body> for other emails (#14547) 2021-08-19 16:53:45 -04:00
event.rb Rename MarkdownParser to MarkdownProcessor::Parser (#12248) 2021-01-13 10:39:13 -05:00
feedback_message.rb Refactor Admin Member Detail view - Tools section (#14283) 2021-08-17 18:55:53 +02:00
follow.rb rubocop -a (#11674) 2020-11-30 14:50:13 +01:00
forem_instance.rb Fix Forem Ownership Field (#14730) 2021-09-16 06:56:59 -04:00
github_issue.rb If there is no body of the linked issue or PR, don't render markdown (#14804) 2021-09-28 09:20:49 -05:00
github_repo.rb Refactor cache purging (#12811) 2021-03-02 10:09:05 -05:00
html_variant.rb Fix html variant image prefix logic (#11917) 2020-12-15 14:44:11 -05:00
html_variant_success.rb [deploy] Add relations and foreign keys between HtmlVariant related models (#9846) 2020-08-18 11:33:38 -04:00
html_variant_trial.rb [deploy] Add relations and foreign keys between HtmlVariant related models (#9846) 2020-08-18 11:33:38 -04:00
identity.rb secure Identity#email in case of missing auth_data_dump hash (#11936) (#12322) 2021-01-18 19:27:07 -05:00
invitation.rb [deploy] Invite users to join and create password (#9294) 2020-07-15 11:37:19 -04:00
listing.rb Remove Elasticsearch ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ (#13606) 2021-05-03 11:09:45 -04:00
listing_category.rb [deploy] Manage listing categories in dashboard (#10506) 2020-10-02 11:05:09 -04:00
mention.rb Use new UserSetting and UserNotificationSettings and Ignore Related User Table Fields (#14121) 2021-07-08 09:31:34 -05:00
message.rb Use new UserSetting and UserNotificationSettings and Ignore Related User Table Fields (#14121) 2021-07-08 09:31:34 -05:00
mod.rb Add single resource admin concept (#5069) [deploy] 2019-12-11 13:17:55 -05:00
moderator_action.rb [deploy] Moderator and admin actions log (#6797) 2020-03-26 16:59:24 -05:00
navigation_link.rb Remove redundant freeze calls (#14596) 2021-08-26 10:01:08 -04:00
note.rb [deploy] Add missing dependent clauses to User and cleanup relations (#10011) 2020-08-28 20:19:24 +02:00
notification.rb Expand @-mention functionality to posts (#13367) 2021-05-12 07:33:33 -07:00
notification_subscription.rb Add missing presence validators to models (#10495) 2020-10-01 16:15:32 +02:00
organization.rb Remove redundant freeze calls (#14596) 2021-08-26 10:01:08 -04:00
organization_membership.rb Check Connect feature flag in more places (#14795) 2021-09-23 09:02:27 -05:00
overview.rb Add admin overview page (#12726) 2021-03-01 18:59:05 -06:00
page.rb [15 min fix] Refactor private landing pages model code (#13982) 2021-06-15 18:17:15 +02:00
page_view.rb Declare winner in feed_top_articles_query test (#12308) 2021-02-04 13:02:00 -05:00
permission.rb Add single resource admin concept (#5069) [deploy] 2019-12-11 13:17:55 -05:00
pinned_article.rb Pin posts to feed (#13807) 2021-06-04 10:54:53 +02:00
podcast.rb Podcast ownership join table (MLH Fellowship #81) (#11410) 2020-11-19 12:41:17 +01:00
podcast_episode.rb Various cleanups (#14616) 2021-08-31 09:17:24 +07:00
podcast_episode_appearance.rb Add podcast_appearances joined table (forem#82) (#11354) 2020-11-30 17:12:52 +01:00
podcast_ownership.rb Podcast ownership join table (MLH Fellowship #81) (#11410) 2020-11-19 12:41:17 +01:00
poll.rb Rename MarkdownParser to MarkdownProcessor::Parser (#12248) 2021-01-13 10:39:13 -05:00
poll_option.rb Rename MarkdownParser to MarkdownProcessor::Parser (#12248) 2021-01-13 10:39:13 -05:00
poll_skip.rb Improve speed of model tests by around 50/60 seconds (#5016) 2019-12-09 16:33:48 -05:00
poll_vote.rb Rubocop: enable and fix new Rails cops (#9537) 2020-07-29 11:14:19 +02:00
privileged_reaction.rb [deploy] New Feature: Mod Actions Panel (#7777) 2020-06-08 13:24:18 -04:00
profile.rb Refactor profile refreshing (#14643) 2021-09-13 12:15:04 -04:00
profile_field.rb Upgrade to Ruby 3.0.2 (#12103) 2021-08-25 14:26:33 -04:00
profile_field_group.rb [deploy] /profile/settings page rendering (Ridhwana/Michael) (#10733) 2020-10-20 09:18:13 -04:00
profile_pin.rb Fix Typos (#3510) 2019-07-22 12:56:48 -04:00
rating_vote.rb [deploy] Add missing foreign keys to models related to users (#10018) 2020-08-31 15:39:57 +02:00
reaction.rb Refactor Admin Member Detail view - Tools section (#14283) 2021-08-17 18:55:53 +02:00
response_template.rb Add unique indexes - part 4 (#8059) 2020-05-27 09:29:20 +02:00
role.rb Added the creator role for the first Forem instance admin (#14583) 2021-08-26 13:50:21 -04:00
secret.rb [deploy] Feature: Setup Admin Area to Update Vault Secrets (#8935) 2020-06-29 15:08:09 -05:00
sponsorship.rb Add missing presence validators to models (#10495) 2020-10-01 16:15:32 +02:00
tag.rb Relax tag validation restriction to permit non-ascii strings (#14710) 2021-09-14 14:03:54 -05:00
tag_adjustment.rb [deploy] Rubocop: fix violations of Layout/LineLength (#9197) 2020-07-08 08:36:36 -05:00
timeframe.rb Remove timeframer from app/labor (#11782) 2020-12-08 12:52:33 +07:00
tool.rb Add single resource admin concept (#5069) [deploy] 2019-12-11 13:17:55 -05:00
tweet.rb RFC 190: Forem Creator Signup Page (#13875) 2021-08-24 10:33:26 +02:00
user.rb Various cleanups (#14616) 2021-08-31 09:17:24 +07:00
user_block.rb Fix and refactor hide user content (#12307) 2021-01-18 11:08:23 -05:00
user_role.rb [Search 2.0] Users (#13453) 2021-04-24 19:06:06 +02:00
user_subscription.rb Rename MarkdownParser to MarkdownProcessor::Parser (#12248) 2021-01-13 10:39:13 -05:00
webhook_endpoint.rb Add single resource admin concept (#5069) [deploy] 2019-12-11 13:17:55 -05:00
welcome.rb Add single resource admin concept (#5069) [deploy] 2019-12-11 13:17:55 -05:00
welcome_notification.rb Add Polymorphism to Broadcasts (Part 1) (#9231) [deploy] 2020-07-13 09:36:19 -06:00