Skip to content

Commit

Permalink
fix: update @action/github to 1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
cakeinpanic committed Sep 27, 2023
1 parent fcd99e9 commit 570c4a1
Show file tree
Hide file tree
Showing 6 changed files with 469 additions and 332 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## 0.7.0
* update @actions/core package to 1.10.0

## 0.6.1
* Fix adding outputs if action failed
* update @actions/core package to 1.10.0

## 0.6.0
* Add `jira-issue-found` and `jira-issue-source` outputs https://github.com/cakeinpanic/jira-description-action/pull/45
Expand Down
8 changes: 4 additions & 4 deletions __tests__/github-connector.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getOctokit } from '@actions/github';
import { GithubConnector } from '../src/github-connector';
import { GitHub } from '@actions/github/lib/github';
import { ESource, IActionInputs } from '../src/types';
import { describe } from 'jest-circus';
import { getJIRAIssueKeyByDefaultRegexp, getJIRAIssueKeysByCustomRegexp } from '../src/utils';
Expand All @@ -12,7 +12,7 @@ const MOCK_INPUT: Partial<IActionInputs> = {
const BRANCH_NAME = 'branchName';
const PR_TITLE = 'prTitle';

jest.mock('@actions/github/lib/github', () => {
jest.mock('@actions/github', () => {
const MOCK_CONTEXT = {
eventName: 'eventName',
payload: {
Expand All @@ -22,7 +22,7 @@ jest.mock('@actions/github/lib/github', () => {
},
};
return {
GitHub: jest.fn(),
getOctokit: jest.fn(),
context: MOCK_CONTEXT,
};
});
Expand All @@ -36,7 +36,7 @@ describe('Github connector()', () => {
it('initializes correctly', () => {
(getInputs as any).mockImplementation(() => MOCK_INPUT);
connector = new GithubConnector();
expect(GitHub).toHaveBeenCalledWith(MOCK_INPUT.GITHUB_TOKEN);
expect(getOctokit).toHaveBeenCalledWith(MOCK_INPUT.GITHUB_TOKEN);
});

describe('getIssueKeyFromTitle()', () => {
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js

Large diffs are not rendered by default.

Loading

0 comments on commit 570c4a1

Please sign in to comment.