git: drop types/git and inline GitHub context type
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
@@ -15,18 +15,18 @@
|
||||
*/
|
||||
|
||||
import * as core from '@actions/core';
|
||||
import * as github from '@actions/github';
|
||||
import {Octokit} from '@octokit/core';
|
||||
import {restEndpointMethods} from '@octokit/plugin-rest-endpoint-methods';
|
||||
|
||||
import {Exec} from './exec.js';
|
||||
import {GitHub} from './github.js';
|
||||
import {Context} from '@actions/github/lib/context';
|
||||
|
||||
import {Context as GitContext} from './types/git.js';
|
||||
export type GitContext = typeof github.context;
|
||||
|
||||
export class Git {
|
||||
public static async context(): Promise<GitContext> {
|
||||
const ctx = new Context();
|
||||
const ctx = {...github.context} as GitContext;
|
||||
ctx.ref = await Git.ref();
|
||||
ctx.sha = await Git.fullCommit();
|
||||
return ctx;
|
||||
|
||||
Reference in New Issue
Block a user