piotrmurach/github

View on GitHub

Showing 129 of 152 total issues

Similar blocks of code found in 21 locations. Consider refactoring.
Open

    def list(*args)
      arguments(args, required: [:owner, :repo])

      response = get_request("/repos/#{arguments.owner}/#{arguments.repo}/releases", arguments.params)
      return response unless block_given?
Severity: Major
Found in lib/github_api/client/repos/releases.rb and 20 other locations - About 30 mins to fix
lib/github_api/client/activity/events.rb on lines 40..45
lib/github_api/client/activity/events.rb on lines 64..69
lib/github_api/client/activity/events.rb on lines 89..94
lib/github_api/client/activity/starring.rb on lines 20..25
lib/github_api/client/activity/watching.rb on lines 19..24
lib/github_api/client/issues/assignees.rb on lines 15..20
lib/github_api/client/pull_requests.rb on lines 27..33
lib/github_api/client/repos.rb on lines 423..428
lib/github_api/client/repos.rb on lines 440..445
lib/github_api/client/repos.rb on lines 462..467
lib/github_api/client/repos/branches.rb on lines 24..29
lib/github_api/client/repos/collaborators.rb on lines 24..29
lib/github_api/client/repos/downloads.rb on lines 25..30
lib/github_api/client/repos/forks.rb on lines 22..27
lib/github_api/client/repos/hooks.rb on lines 48..53
lib/github_api/client/repos/invitations.rb on lines 19..24
lib/github_api/client/repos/keys.rb on lines 24..30
lib/github_api/client/repos/statistics.rb on lines 18..23
lib/github_api/client/repos/statistics.rb on lines 37..42
lib/github_api/client/repos/statistics.rb on lines 81..86

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 21 locations. Consider refactoring.
Open

    def teams(*args)
      arguments(args, required: [:user, :repo])

      response = get_request("/repos/#{arguments.user}/#{arguments.repo}/teams", arguments.params)
      return response unless block_given?
Severity: Major
Found in lib/github_api/client/repos.rb and 20 other locations - About 30 mins to fix
lib/github_api/client/activity/events.rb on lines 40..45
lib/github_api/client/activity/events.rb on lines 64..69
lib/github_api/client/activity/events.rb on lines 89..94
lib/github_api/client/activity/starring.rb on lines 20..25
lib/github_api/client/activity/watching.rb on lines 19..24
lib/github_api/client/issues/assignees.rb on lines 15..20
lib/github_api/client/pull_requests.rb on lines 27..33
lib/github_api/client/repos.rb on lines 423..428
lib/github_api/client/repos.rb on lines 440..445
lib/github_api/client/repos/branches.rb on lines 24..29
lib/github_api/client/repos/collaborators.rb on lines 24..29
lib/github_api/client/repos/downloads.rb on lines 25..30
lib/github_api/client/repos/forks.rb on lines 22..27
lib/github_api/client/repos/hooks.rb on lines 48..53
lib/github_api/client/repos/invitations.rb on lines 19..24
lib/github_api/client/repos/keys.rb on lines 24..30
lib/github_api/client/repos/releases.rb on lines 31..36
lib/github_api/client/repos/statistics.rb on lines 18..23
lib/github_api/client/repos/statistics.rb on lines 37..42
lib/github_api/client/repos/statistics.rb on lines 81..86

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 21 locations. Consider refactoring.
Open

    def network(*args)
      arguments(args, required: [:user, :repo])

      response = get_request("/networks/#{arguments.user}/#{arguments.repo}/events", arguments.params)
      return response unless block_given?
Severity: Major
Found in lib/github_api/client/activity/events.rb and 20 other locations - About 30 mins to fix
lib/github_api/client/activity/events.rb on lines 40..45
lib/github_api/client/activity/events.rb on lines 64..69
lib/github_api/client/activity/starring.rb on lines 20..25
lib/github_api/client/activity/watching.rb on lines 19..24
lib/github_api/client/issues/assignees.rb on lines 15..20
lib/github_api/client/pull_requests.rb on lines 27..33
lib/github_api/client/repos.rb on lines 423..428
lib/github_api/client/repos.rb on lines 440..445
lib/github_api/client/repos.rb on lines 462..467
lib/github_api/client/repos/branches.rb on lines 24..29
lib/github_api/client/repos/collaborators.rb on lines 24..29
lib/github_api/client/repos/downloads.rb on lines 25..30
lib/github_api/client/repos/forks.rb on lines 22..27
lib/github_api/client/repos/hooks.rb on lines 48..53
lib/github_api/client/repos/invitations.rb on lines 19..24
lib/github_api/client/repos/keys.rb on lines 24..30
lib/github_api/client/repos/releases.rb on lines 31..36
lib/github_api/client/repos/statistics.rb on lines 18..23
lib/github_api/client/repos/statistics.rb on lines 37..42
lib/github_api/client/repos/statistics.rb on lines 81..86

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    def watched(*args)
      arguments(args)
      params = arguments.params

      response = if (user_name = params.delete('user'))
Severity: Minor
Found in lib/github_api/client/activity/watching.rb and 1 other location - About 30 mins to fix
lib/github_api/client/activity/starring.rb on lines 53..63

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 21 locations. Consider refactoring.
Open

    def list(*args)
      arguments(args, required: [:user, :repo])

      response = get_request("/repos/#{arguments.user}/#{arguments.repo}/invitations", arguments.params)
      return response unless block_given?
Severity: Major
Found in lib/github_api/client/repos/invitations.rb and 20 other locations - About 30 mins to fix
lib/github_api/client/activity/events.rb on lines 40..45
lib/github_api/client/activity/events.rb on lines 64..69
lib/github_api/client/activity/events.rb on lines 89..94
lib/github_api/client/activity/starring.rb on lines 20..25
lib/github_api/client/activity/watching.rb on lines 19..24
lib/github_api/client/issues/assignees.rb on lines 15..20
lib/github_api/client/pull_requests.rb on lines 27..33
lib/github_api/client/repos.rb on lines 423..428
lib/github_api/client/repos.rb on lines 440..445
lib/github_api/client/repos.rb on lines 462..467
lib/github_api/client/repos/branches.rb on lines 24..29
lib/github_api/client/repos/collaborators.rb on lines 24..29
lib/github_api/client/repos/downloads.rb on lines 25..30
lib/github_api/client/repos/forks.rb on lines 22..27
lib/github_api/client/repos/hooks.rb on lines 48..53
lib/github_api/client/repos/keys.rb on lines 24..30
lib/github_api/client/repos/releases.rb on lines 31..36
lib/github_api/client/repos/statistics.rb on lines 18..23
lib/github_api/client/repos/statistics.rb on lines 37..42
lib/github_api/client/repos/statistics.rb on lines 81..86

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    def edit(*args)
      arguments(args, required: [:user, :repo, :id]) do
        permit VALID_ISSUE_COMMENT_PARAM_NAME
        assert_required %w[ body ]
      end
Severity: Minor
Found in lib/github_api/client/issues/comments.rb and 1 other location - About 30 mins to fix
lib/github_api/client/git_data/references.rb on lines 113..119

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 21 locations. Consider refactoring.
Open

    def list(*args)
      arguments(args, required: [:user, :repo])

      response = get_request("/repos/#{arguments.user}/#{arguments.repo}/keys",
                             arguments.params)
Severity: Major
Found in lib/github_api/client/repos/keys.rb and 20 other locations - About 30 mins to fix
lib/github_api/client/activity/events.rb on lines 40..45
lib/github_api/client/activity/events.rb on lines 64..69
lib/github_api/client/activity/events.rb on lines 89..94
lib/github_api/client/activity/starring.rb on lines 20..25
lib/github_api/client/activity/watching.rb on lines 19..24
lib/github_api/client/issues/assignees.rb on lines 15..20
lib/github_api/client/pull_requests.rb on lines 27..33
lib/github_api/client/repos.rb on lines 423..428
lib/github_api/client/repos.rb on lines 440..445
lib/github_api/client/repos.rb on lines 462..467
lib/github_api/client/repos/branches.rb on lines 24..29
lib/github_api/client/repos/collaborators.rb on lines 24..29
lib/github_api/client/repos/downloads.rb on lines 25..30
lib/github_api/client/repos/forks.rb on lines 22..27
lib/github_api/client/repos/hooks.rb on lines 48..53
lib/github_api/client/repos/invitations.rb on lines 19..24
lib/github_api/client/repos/releases.rb on lines 31..36
lib/github_api/client/repos/statistics.rb on lines 18..23
lib/github_api/client/repos/statistics.rb on lines 37..42
lib/github_api/client/repos/statistics.rb on lines 81..86

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 21 locations. Consider refactoring.
Open

    def list(*args)
      arguments(args, required: [:user, :repo])

      response = get_request("/repos/#{arguments.user}/#{arguments.repo}/forks", arguments.params)
      return response unless block_given?
Severity: Major
Found in lib/github_api/client/repos/forks.rb and 20 other locations - About 30 mins to fix
lib/github_api/client/activity/events.rb on lines 40..45
lib/github_api/client/activity/events.rb on lines 64..69
lib/github_api/client/activity/events.rb on lines 89..94
lib/github_api/client/activity/starring.rb on lines 20..25
lib/github_api/client/activity/watching.rb on lines 19..24
lib/github_api/client/issues/assignees.rb on lines 15..20
lib/github_api/client/pull_requests.rb on lines 27..33
lib/github_api/client/repos.rb on lines 423..428
lib/github_api/client/repos.rb on lines 440..445
lib/github_api/client/repos.rb on lines 462..467
lib/github_api/client/repos/branches.rb on lines 24..29
lib/github_api/client/repos/collaborators.rb on lines 24..29
lib/github_api/client/repos/downloads.rb on lines 25..30
lib/github_api/client/repos/hooks.rb on lines 48..53
lib/github_api/client/repos/invitations.rb on lines 19..24
lib/github_api/client/repos/keys.rb on lines 24..30
lib/github_api/client/repos/releases.rb on lines 31..36
lib/github_api/client/repos/statistics.rb on lines 18..23
lib/github_api/client/repos/statistics.rb on lines 37..42
lib/github_api/client/repos/statistics.rb on lines 81..86

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 21 locations. Consider refactoring.
Open

    def issue(*args)
      arguments(args, required: [:user, :repo])

      response = get_request("/repos/#{arguments.user}/#{arguments.repo}/issues/events", arguments.params)
      return response unless block_given?
Severity: Major
Found in lib/github_api/client/activity/events.rb and 20 other locations - About 30 mins to fix
lib/github_api/client/activity/events.rb on lines 40..45
lib/github_api/client/activity/events.rb on lines 89..94
lib/github_api/client/activity/starring.rb on lines 20..25
lib/github_api/client/activity/watching.rb on lines 19..24
lib/github_api/client/issues/assignees.rb on lines 15..20
lib/github_api/client/pull_requests.rb on lines 27..33
lib/github_api/client/repos.rb on lines 423..428
lib/github_api/client/repos.rb on lines 440..445
lib/github_api/client/repos.rb on lines 462..467
lib/github_api/client/repos/branches.rb on lines 24..29
lib/github_api/client/repos/collaborators.rb on lines 24..29
lib/github_api/client/repos/downloads.rb on lines 25..30
lib/github_api/client/repos/forks.rb on lines 22..27
lib/github_api/client/repos/hooks.rb on lines 48..53
lib/github_api/client/repos/invitations.rb on lines 19..24
lib/github_api/client/repos/keys.rb on lines 24..30
lib/github_api/client/repos/releases.rb on lines 31..36
lib/github_api/client/repos/statistics.rb on lines 18..23
lib/github_api/client/repos/statistics.rb on lines 37..42
lib/github_api/client/repos/statistics.rb on lines 81..86

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 21 locations. Consider refactoring.
Open

    def punch_card(*args)
      arguments(args, required: [:user, :repo])

      response = get_request("/repos/#{arguments.user}/#{arguments.repo}/stats/punch_card", arguments.params)
      return response unless block_given?
Severity: Major
Found in lib/github_api/client/repos/statistics.rb and 20 other locations - About 30 mins to fix
lib/github_api/client/activity/events.rb on lines 40..45
lib/github_api/client/activity/events.rb on lines 64..69
lib/github_api/client/activity/events.rb on lines 89..94
lib/github_api/client/activity/starring.rb on lines 20..25
lib/github_api/client/activity/watching.rb on lines 19..24
lib/github_api/client/issues/assignees.rb on lines 15..20
lib/github_api/client/pull_requests.rb on lines 27..33
lib/github_api/client/repos.rb on lines 423..428
lib/github_api/client/repos.rb on lines 440..445
lib/github_api/client/repos.rb on lines 462..467
lib/github_api/client/repos/branches.rb on lines 24..29
lib/github_api/client/repos/collaborators.rb on lines 24..29
lib/github_api/client/repos/downloads.rb on lines 25..30
lib/github_api/client/repos/forks.rb on lines 22..27
lib/github_api/client/repos/hooks.rb on lines 48..53
lib/github_api/client/repos/invitations.rb on lines 19..24
lib/github_api/client/repos/keys.rb on lines 24..30
lib/github_api/client/repos/releases.rb on lines 31..36
lib/github_api/client/repos/statistics.rb on lines 18..23
lib/github_api/client/repos/statistics.rb on lines 37..42

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 21 locations. Consider refactoring.
Open

    def list(*args)
      arguments(args, required: [:user, :repo])

      response = get_request("/repos/#{arguments.user}/#{arguments.repo}/pulls",
                             arguments.params)
Severity: Major
Found in lib/github_api/client/pull_requests.rb and 20 other locations - About 30 mins to fix
lib/github_api/client/activity/events.rb on lines 40..45
lib/github_api/client/activity/events.rb on lines 64..69
lib/github_api/client/activity/events.rb on lines 89..94
lib/github_api/client/activity/starring.rb on lines 20..25
lib/github_api/client/activity/watching.rb on lines 19..24
lib/github_api/client/issues/assignees.rb on lines 15..20
lib/github_api/client/repos.rb on lines 423..428
lib/github_api/client/repos.rb on lines 440..445
lib/github_api/client/repos.rb on lines 462..467
lib/github_api/client/repos/branches.rb on lines 24..29
lib/github_api/client/repos/collaborators.rb on lines 24..29
lib/github_api/client/repos/downloads.rb on lines 25..30
lib/github_api/client/repos/forks.rb on lines 22..27
lib/github_api/client/repos/hooks.rb on lines 48..53
lib/github_api/client/repos/invitations.rb on lines 19..24
lib/github_api/client/repos/keys.rb on lines 24..30
lib/github_api/client/repos/releases.rb on lines 31..36
lib/github_api/client/repos/statistics.rb on lines 18..23
lib/github_api/client/repos/statistics.rb on lines 37..42
lib/github_api/client/repos/statistics.rb on lines 81..86

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    def list(*args)
      params = arguments(args).params

      response = if user_name = arguments.remaining.first
        get_request("/users/#{user_name}/followers", params)
Severity: Minor
Found in lib/github_api/client/users/followers.rb and 1 other location - About 25 mins to fix
lib/github_api/client/users/followers.rb on lines 50..59

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 31.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    def following(*args)
      params = arguments(args).params

      response = if user_name = arguments.remaining.first
        get_request("/users/#{user_name}/following", params)
Severity: Minor
Found in lib/github_api/client/users/followers.rb and 1 other location - About 25 mins to fix
lib/github_api/client/users/followers.rb on lines 23..32

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 31.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    def starring?(*args)
      arguments(args, required: [:user, :repo])

      get_request("/user/starred/#{arguments.user}/#{arguments.repo}", arguments.params)
      true
Severity: Minor
Found in lib/github_api/client/activity/starring.rb and 1 other location - About 25 mins to fix
lib/github_api/client/activity/watching.rb on lines 133..139

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 29.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    def watching?(*args)
      arguments(args, required: [:user, :repo])

      get_request("/user/subscriptions/#{arguments.user}/#{arguments.repo}", arguments.params)
      true
Severity: Minor
Found in lib/github_api/client/activity/watching.rb and 1 other location - About 25 mins to fix
lib/github_api/client/activity/starring.rb on lines 81..87

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 29.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    def move(*args)
      arguments(args, required: [:card_id]) do
        assert_required REQUIRED_MOVE_CARD_PARAMS
      end
      params = arguments.params
Severity: Minor
Found in lib/github_api/client/projects/cards.rb and 2 other locations - About 25 mins to fix
lib/github_api/client/projects/columns.rb on lines 65..73
lib/github_api/client/projects/columns.rb on lines 135..143

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 29.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    def move(*args)
      arguments(args, required: [:column_id]) do
        assert_required REQUIRED_MOVE_COLUMN_PARAMS
      end
      params = arguments.params
Severity: Minor
Found in lib/github_api/client/projects/columns.rb and 2 other locations - About 25 mins to fix
lib/github_api/client/projects/cards.rb on lines 147..155
lib/github_api/client/projects/columns.rb on lines 65..73

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 29.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    def create(*args)
      arguments(args, required: [:project_id]) do
        assert_required REQUIRED_COLUMN_PARAMS
      end
      params = arguments.params
Severity: Minor
Found in lib/github_api/client/projects/columns.rb and 2 other locations - About 25 mins to fix
lib/github_api/client/projects/cards.rb on lines 147..155
lib/github_api/client/projects/columns.rb on lines 135..143

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 29.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    def edit(*args)
      arguments(args, required: [:user, :repo, :branch]) do
        permit VALID_PROTECTION_PARAM_NAMES
      end

Severity: Minor
Found in lib/github_api/client/repos/branches/protections.rb and 1 other location - About 25 mins to fix
lib/github_api/client/repos/comments.rb on lines 84..89

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 29.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    def create(*args)
      arguments(args, required: [:user, :repo, :sha]) do
        assert_required REQUIRED_COMMENT_OPTIONS
      end

Severity: Minor
Found in lib/github_api/client/repos/comments.rb and 1 other location - About 25 mins to fix
lib/github_api/client/repos/branches/protections.rb on lines 52..57

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 29.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language