Skip to content

Commit

Permalink
#34429: Renamed file and made constructor private
Browse files Browse the repository at this point in the history
  • Loading branch information
janssen-tiobe committed Aug 8, 2024
1 parent 1f13431 commit 2517ef0
Show file tree
Hide file tree
Showing 10 changed files with 75 additions and 105 deletions.
162 changes: 66 additions & 96 deletions dist/index.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class GithubEvent {
static readonly WORKFLOW_DISPATCH = new GithubEvent('workflow_dispatch', false);
static readonly WORKFLOW_RUN = new GithubEvent('workflow_run', false);

constructor(
private constructor(
readonly name: string,
readonly isPullRequest: boolean
) {}
Expand Down
2 changes: 1 addition & 1 deletion src/configuration/github.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { isDebug } from '@actions/core';
import { context } from '@actions/github';
import { logger } from '../helper/logger';
import { GithubEvent } from './event';
import { GithubEvent } from './github-event';

export class GithubConfig {
readonly apiUrl: string;
Expand Down
2 changes: 1 addition & 1 deletion test/.setup/mock.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { jest } from '@jest/globals';
import { summary } from './summary_mock';
import { GithubEvent } from '../../src/configuration/event';
import { GithubEvent } from '../../src/configuration/github-event';

export const githubConfigMock: {
apiUrl: string;
Expand Down
2 changes: 1 addition & 1 deletion test/unit/action/decorate/action.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as annotations from '../../../../src/github/annotations';
import { decorateAction } from '../../../../src/action/decorate/action';
import { actionConfigMock, githubConfigMock } from '../../../.setup/mock';
import { analysisPassed, analysisResultsSoaked } from './objects/summary';
import { GithubEvent } from '../../../../src/configuration/event';
import { GithubEvent } from '../../../../src/configuration/github-event';

describe('decorateAction', () => {
let spyCreateSummaryBody: jest.SpyInstance;
Expand Down
2 changes: 1 addition & 1 deletion test/unit/action/decorate/summary.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
} from './objects/summary';
import { EOL } from 'os';
import { githubConfigMock, ticsConfigMock } from '../../../.setup/mock';
import { GithubEvent } from '../../../../src/configuration/event';
import { GithubEvent } from '../../../../src/configuration/github-event';

describe('createSummaryBody', () => {
beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/analysis/client/process-analysis.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
analysisWithUrl,
analysisWithDoubleUrl
} from './objects/process-analysis';
import { GithubEvent } from '../../../../src/configuration/event';
import { GithubEvent } from '../../../../src/configuration/github-event';

describe('processIncompleteAnalysis', () => {
let spyGetPostedComments: jest.SpyInstance;
Expand Down
2 changes: 1 addition & 1 deletion test/unit/analysis/helper/changed-files.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { getChangedFiles } from '../../../../src/analysis/helper/changed-files';
import { githubConfigMock, ticsConfigMock } from '../../../.setup/mock';
import { singleChangedFiles } from './objects/changed-files';
import { Mode } from '../../../../src/configuration/tics';
import { GithubEvent } from '../../../../src/configuration/event';
import { GithubEvent } from '../../../../src/configuration/github-event';

let spyPullFiles: jest.SpyInstance;
let spyCommitFiles: jest.SpyInstance;
Expand Down
2 changes: 1 addition & 1 deletion test/unit/analysis/qserver.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from './objects/qserver';
import { qServerAnalysis } from '../../../src/analysis/qserver';
import { Mode } from '../../../src/configuration/tics';
import { GithubEvent } from '../../../src/configuration/event';
import { GithubEvent } from '../../../src/configuration/github-event';

describe('SetFailed checks (QServer)', () => {
let spyAnalyzer: jest.SpyInstance;
Expand Down
2 changes: 1 addition & 1 deletion test/unit/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { main } from '../../src/main';
import { githubConfigMock, ticsCliMock, ticsConfigMock } from '../.setup/mock';
import { logger } from '../../src/helper/logger';
import { Mode } from '../../src/configuration/tics';
import { GithubEvent } from '../../src/configuration/event';
import { GithubEvent } from '../../src/configuration/github-event';

afterEach(() => {
jest.clearAllMocks();
Expand Down

0 comments on commit 2517ef0

Please sign in to comment.