Skip to content

Commit

Permalink
Refactor the code to use the updated IgitLink type in the `Pipelin…
Browse files Browse the repository at this point in the history
…e` class and modify the `IPipeline` interface to use `IgitLink` instead of `gitLink`.
  • Loading branch information
mms-gianni committed Sep 12, 2023
1 parent 260b447 commit 71c04ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 2 additions & 6 deletions src/modules/pipeline.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IBuildpack , IPipeline, IPipelinePhase, IKubectlPipeline, IKubectlMetadata, IGithubRepository} from '../types';
import { IBuildpack , IPipeline, IPipelinePhase, IKubectlPipeline, IKubectlMetadata, IgitLink, IGithubRepository} from '../types';

export class Pipeline implements IPipeline {
public name: string;
Expand All @@ -8,11 +8,7 @@ export class Pipeline implements IPipeline {
public phases: IPipelinePhase[];
public buildpack: IBuildpack;
public deploymentstrategy: 'git' | 'docker';
public git: {
keys: object,
repository?: IGithubRepository | undefined;
webhook: object;
};
public git: IgitLink;

constructor(
pl: IPipeline,
Expand Down
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,13 @@ export interface IPipeline {
reviewapps: boolean;
phases: IPipelinePhase[];
buildpack: IBuildpack
git: gitLink;
git: IgitLink;
dockerimage: string;
deploymentstrategy: 'git' | 'docker',
resourceVersion?: string; // required to update resource, not part of spec
}

export interface gitLink {
export interface IgitLink {
keys: {
priv: string,
pub: string,
Expand Down

0 comments on commit 71c04ce

Please sign in to comment.