Commit graph

14 commits

Author SHA1 Message Date
yheuhtozr
e45536af37
app/models i18n (#16124)
* app/models etc i18n

* delete ja.yml

* fix for PR review

* fix for spec

* delete ja.yml

* fix for spec updated
2022-02-03 13:41:42 -05:00
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
Michael Kohl
c16ec1d53d
Remove redundant freeze calls (#14596) 2021-08-26 10:01:08 -04:00
Ben Halpern
1a531bca0e
Replace need for GitHub ENV vars on bootup (#10372)
* Un-eagerload dev mode

* Change approach

* Fix for_user

* Fix spec?

* Fix spec?

* Fix spec?

* Fix spec?

* Fix spec?
2020-09-18 11:21:31 -04:00
rhymes
7db40b2117
[deploy] Add unique indexes - part 3 (#8050) 2020-05-26 08:34:53 -05:00
rhymes
ae8a58fec2
[deploy] Decouple GitHub authentication from fetching GitHub issues (#7660)
* Improve error handling

* Add tests for Github::Client

* Add GithubIssue validation

* Refactor GithubIssue and fix bug with pull requests

* Improve tests

* Fix PR API URL generation

* Improve logic and get rid of the issue fragment

* Fix disappeared avatar

* Improve rendering

* Activate client side caching using Redis

* Remove unnecessary file

* Add RemoveGithubIssues data update script

* Fix comma

* Forgot to disable the approvals verify text

* Apply PR feedback
2020-05-04 16:17:16 -04:00
rhymes
a1787d0702 Fixed some Style/* rubocop violations (#2314)
* Fix Style/FormatString and Style/TrivialAccessors

* Fix Style/NegatedIf and Style/DoubleNegation

* Style/ClassAndModuleChildren is already enabled by default

* Fix Style/GlobalVars

* Group all style/ cops inside rubocop config file
2019-04-06 14:24:33 -04:00
Abraham Williams
9cb40e546b Enables Rails cops (#2186)
* Enable Rails cops

* Fix Rails/DynamicFindBy

* Fix Rails/HttpStatus

* Fix Rails/Blank

* Fix Rails/RequestReferer

* Fix Rails/ActiveRecordAliases

* Fix Rails/FindBy

* Fix Rails/Presence

* Fix Rails/Delegate

* Fix Rails/Validation

* Fix Rails/PluralizationGrammar

* Fix Rails/Present

* Fix Rails/Output

* Fix Rails/Blank

* Fix Rails/FilePath

* Fix Rails/InverseOf

* Fix Rails/LexicallyScopedActionFilter

* Add Rails/OutputSafety to TODO

* Add Rails/HasManyOrHasOneDependent to TODO

* Add Rails/SkipsModelValidations to TODO
2019-03-25 09:25:55 -04:00
Keshav Biswa
8d57d45ecc Rubocop Style cops enabled (#2056)
* Rubocop enabled style/alias

* Enabled Style/ArrayJoin Cop

* Enabled Style/Attr

* Enabled Case Equality

* Enabled CharacterLiteral

*  Enabled ColonMethodCall Cop

* Enabled CommentAnnotation cop

* Enabled PreferredHashMethods Cop

*  Enabled DoubleNegation Cop

* Enabled EachWithObject Cop

* Enabled EmptyLiteral Cop

* Enabled EvenOdd Cop

* Enabled IfWithSemicolon Cop

* Enabled Lambda and LambdaCall Cop

* Enabled LineEndConcatenation Cop

* Enabled ModuleFunction Cop;

* Enable NegatedIf and NegatedWhile Cop

* Enabled NilComparison Cop

* Enabled Not Cop

* Enabled NumericLiterals Cop

* Enabled OneLineConditional Cop

* Enabled PercentLiteralDelimiters Cop

* Excluded internal/users_controller from negated_if cop

* Reverted the double negation change from github_issue_tag and github_issue.rb"

* Enabled PerlBackrefs Cop

* Changed Regexp.last_match(1) to Regexp.last_match(0)

* Enabled proc cop

* Enabled RaiseArgs Cop

* Reverted Regexp.last_match(0) to Regexp.last_match(1)

* Enabled SelfAssignment Cop

* Enabled SingleLineMethods Cop

* Enabled SpecialGlobalVars Cop

* Enabled VariableInterpolation Cop

* Enabled WhenThen Cop

* Enabled WhileUntilModifier Cop

* Enabled WordArray Cop

* Enabled IfUnlessModifier Cop

* Enabled GuardClause Cop
2019-03-15 18:33:54 -04:00
Glenn Carremans
91633206ee Implement GitHub PR liquid tag support (#1784) 2019-02-15 13:40:15 -05:00
rhymes
e588fa7ece Code cleanups (#659)
* Initial automatic cleanup with rubocop

* Fix syntax error introduced by rubocop

* Cleanup seeds file

* Cleanup lib folder

* Exclude bin folder because it contains auto generated files

* Make Rubocop a little bit more chatty

* Block length should not include comments in the count

* Cleanup config folder

* Cleanup specs

* Updated Rubocop version and generated a todo file

* Fix broken ArticlesApi spec

* Fix tests

* Restored rubocop pre-commit hook
2018-08-07 11:00:13 -04:00
Andy Zhao
c9c02ef3c0 [Done] Fix div in li issue (#320)
* Lint and clean up github issue styles

* Use heredoc HTML for easier formatting

* Add better error handling for 404 github issues

* Use custom sanitizer for markdown render

* Refactor unless to ternary

* Rename file and tighten up sanitization

* Fix codepen and instagram tag styling
2018-05-21 17:35:03 -04:00
Jess Lee
905f88e3fe fix github issue comment liquid tag (#242) 2018-04-25 16:42:58 -04:00
Mac Siri
301c6080e3 Initial commit 2018-02-28 16:11:08 -05:00