Skip to content

Commit

Permalink
deps: bump @octokit/types from 5.5.0 to 6.0.3 (#340)
Browse files Browse the repository at this point in the history
* deps: bump @octokit/types from 5.5.0 to 6.0.3

Bumps [@octokit/types](https://github.com/octokit/types.ts) from 5.5.0 to 6.0.3.
- [Release notes](https://github.com/octokit/types.ts/releases)
- [Commits](octokit/types.ts@v5.5.0...v6.0.3)

Signed-off-by: dependabot[bot] <[email protected]>

* fix: use GetResponseTypeFromEndpointMethod

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: peaceiris <[email protected]>
  • Loading branch information
dependabot[bot] and peaceiris authored Dec 3, 2020
1 parent 510990b commit 8f0e413
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 6 deletions.
88 changes: 85 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"dependencies": {
"@actions/core": "^1.2.6",
"@actions/github": "^4.0.0",
"@octokit/types": "^5.5.0",
"@octokit/types": "^6.0.3",
"@octokit/webhooks": "^7.15.1",
"js-yaml": "^3.14.0",
"mustache": "^4.0.1"
Expand Down
7 changes: 5 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import fs from 'fs';
import yaml from 'js-yaml';
import Mustache from 'mustache';
import {openIssue, closeIssue, unlockIssue, lockIssue} from './issues-helper';
import {IssuesCreateCommentResponseData, OctokitResponse} from '@octokit/types';
import {GetResponseTypeFromEndpointMethod} from '@octokit/types';

// eslint-disable-next-line @typescript-eslint/no-explicit-any
function groupConsoleLog(groupTitle: string, body: any, debug: boolean): void {
Expand Down Expand Up @@ -178,6 +178,9 @@ export async function run(): Promise<void> {
// Create octokit client
const githubToken = inps.GithubToken;
const githubClient = getOctokit(githubToken);
type IssuesCreateCommentResponse = GetResponseTypeFromEndpointMethod<
typeof githubClient.issues.createComment
>;

// Get locking config
const locking = config.labels[labelIndex][`${labelEvent}`][`${eventType}`].locking;
Expand Down Expand Up @@ -211,7 +214,7 @@ export async function run(): Promise<void> {

// Post comment
if (!locked) {
const issuesCreateCommentResponse: OctokitResponse<IssuesCreateCommentResponseData> = await githubClient.issues.createComment(
const issuesCreateCommentResponse: IssuesCreateCommentResponse = await githubClient.issues.createComment(
{
issue_number: context.issue.number,
owner: context.repo.owner,
Expand Down

0 comments on commit 8f0e413

Please sign in to comment.