pulp / pulp/pulp-ui

Base / Common class properties/types

Open
#255 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stale
Dominant language
TypeScript
Stars
29
Forks
22
Avg merge
2d 6h
Merged PRs (30d)
19

Description

Class types are created individually, even though they share a lot of common properties.

Eg:

export class RPMRepositoryType {
  autopublish?: boolean;
  checksum_type?: 'sha1' | 'sha256' | 'sha512';
  description: string | null;
  gpgcheck?: 0 | 1 | 2;
  latest_version_href?: string;
  metadata_signing_service?: string;
  name: string;
  pulp_created?: string;
  pulp_href?: string;
  pulp_labels: Record<string, string>;
  pulp_last_updated?: string;
  remote: string | null;
  repoclosure_verification?: boolean;
  repo_gpgcheck?: 0 | 1;
  retain_package_versions?: number;
  retain_repo_versions: number | null;
  versions_href?: string;
}

export class FileRepositoryType {
  autopublish?: boolean;
  description: string | null;
  latest_version_href?: string;
  manifest?: string;
  name: string;
  prn?: string;
  pulp_created?: string;
  pulp_href?: string;
  pulp_labels: Record<string, string>;
  pulp_last_updated?: string;
  remote: string | null;
  retain_repo_versions: number;
  versions_href?: string;
}

A parent class type for each pulp base type (remote, content, repository, distribution, publication), could be created to remove the duplication between these classes.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Locate the RPMRepositoryType and FileRepositoryType definitions, then review the other remote, content, repository, distribution, and publication types for repeated properties. Done means shared parent types remove the duplication while preserving the existing property types.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.