Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ updates:
directory: "/"
schedule:
interval: "monthly"
cooldown:
default-days: 7
groups:
actions-minor:
update-types:
Expand Down
1 change: 1 addition & 0 deletions .github/linters/.eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ rules:
'eslint-comments/no-unused-disable': 'off',
'i18n-text/no-en': 'off',
'import/no-namespace': 'off',
'import/no-unresolved': 'off',
'no-console': 'off',
'no-unused-vars': 'off',
'prettier/prettier': 'error',
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ jobs:
- name: Switch back to base branch
env:
BRANCH: ${{ steps.branch-name.outputs.BRANCH }}
run: git switch $BRANCH
run: git switch "$BRANCH"

- name: Make changes to commit and stage them
run: |
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,17 @@ jobs:

- name: Lint Codebase
id: super-linter
uses: super-linter/super-linter/slim@12150456a73e248bdc94d0794898f94e23127c88 # v7.4.0
uses: super-linter/super-linter/slim@502f4fe48a81a392756e173e39a861f8c8efe056 # v8.3.0
env:
DEFAULT_BRANCH: main
FILTER_REGEX_EXCLUDE: dist/**/*
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TYPESCRIPT_DEFAULT_STYLE: prettier
VALIDATE_ALL_CODEBASE: true
VALIDATE_BIOME_FORMAT: false
VALIDATE_BIOME_LINT: false
VALIDATE_GITHUB_ACTIONS: false
VALIDATE_JAVASCRIPT_STANDARD: false
VALIDATE_JSCPD: false
VALIDATE_TYPESCRIPT_ES: false
VALIDATE_TYPESCRIPT_STANDARD: false
4 changes: 2 additions & 2 deletions __tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
*/
import { describe, expect, it, vi } from 'vitest';

import * as main from '../src/main';
import * as main from '../src/main.js';

// Mock the action's entrypoint
const runMock = vi.spyOn(main, 'run').mockImplementation(async () => {});

describe('index', () => {
it('calls run when imported', async () => {
await import('../src/index');
await import('../src/index.js');

expect(runMock).toHaveBeenCalled();
});
Expand Down
2 changes: 1 addition & 1 deletion __tests__/lib.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { beforeEach, describe, expect, it, vi } from 'vitest';
import * as core from '@actions/core';
import * as exec from '@actions/exec';

import * as lib from '../src/lib';
import * as lib from '../src/lib.js';

vi.mock('@actions/core');
vi.mock('@actions/exec');
Expand Down
6 changes: 3 additions & 3 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import * as fs from 'node:fs';
import * as core from '@actions/core';
import { RequestError } from '@octokit/request-error';

import * as lib from '../src/lib';
import * as main from '../src/main';
import { mockGetBooleanInput, mockGetInput } from './utils';
import * as lib from '../src/lib.js';
import * as main from '../src/main.js';
import { mockGetBooleanInput, mockGetInput } from './utils.js';

const createCommit = vi.fn();
const createRef = vi.fn();
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* The entrypoint for the action.
*/
import { run } from './main';
import { run } from './main.js';

// eslint-disable-next-line @typescript-eslint/no-floating-promises
run();
7 changes: 6 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ import * as github from '@actions/github';
import { RequestError } from '@octokit/request-error';
import type { Endpoints } from '@octokit/types';

import { getHeadRef, getHeadSha, getHeadTreeHash, getStagedFiles } from './lib';
import {
getHeadRef,
getHeadSha,
getHeadTreeHash,
getStagedFiles
} from './lib.js';

type GitHubGitTreeType =
Endpoints['POST /repos/{owner}/{repo}/git/trees']['parameters']['tree'];
Expand Down