-
-
Notifications
You must be signed in to change notification settings - Fork 5
fix: migrate to ESLint 9 flat config for gts 7 compatibility #91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
EndBug
merged 3 commits into
dependabot/npm_and_yarn/multi-c2d8b9b5ce
from
copilot/sub-pr-88
Feb 28, 2026
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| module.exports = { | ||
| ...require('gts/.prettierrc.json') | ||
| } | ||
| ...require('gts/.prettierrc.json'), | ||
| }; |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| import * as ResponseTypes from './responseTypes'; | ||
| export type Query = 'getField' | 'getFieldValues' | 'getItemId' | 'getProjectId'; | ||
| export type Mutation = 'clearItemFieldValue' | 'setItemFieldValue'; | ||
| export type Request = Query | Mutation; | ||
| export declare const supportedQueries: readonly ["getField", "getFieldValues", "getItemId", "getProjectId"]; | ||
| export declare const supportedMutations: readonly ["clearItemFieldValue", "setItemFieldValue"]; | ||
| export declare const supportedRequests: ("getField" | "getProjectId" | "getFieldValues" | "getItemId" | "clearItemFieldValue" | "setItemFieldValue")[]; | ||
| export type ProjectV2FieldValue = { | ||
| text: string; | ||
| } | { | ||
| number: number; | ||
| } | { | ||
| date: string; | ||
| } | { | ||
| singleSelectOptionId: string; | ||
| } | { | ||
| iterationId: string; | ||
| }; | ||
| export type FieldDataType = 'ASSIGNEES' | 'LINKED_PULL_REQUESTS' | 'REVIEWERS' | 'LABELS' | 'MILESTONE' | 'REPOSITORY' | 'TITLE' | 'TEXT' | 'SINGLE_SELECT' | 'NUMBER' | 'DATE' | 'ITERATION' | 'TRACKS' | 'TRACKED_BY'; | ||
| export type RequestParams<T extends Request> = T extends 'getField' ? { | ||
| owner: string; | ||
| projectNumber: number; | ||
| fieldName: string; | ||
| } : T extends 'getFieldValues' ? { | ||
| resourceUrl: string; | ||
| } : T extends 'getItemId' ? { | ||
| resourceUrl: string; | ||
| } : T extends 'getProjectId' ? { | ||
| owner: string; | ||
| number: number; | ||
| } : T extends 'clearItemFieldValue' ? { | ||
| projectId: string; | ||
| itemId: string; | ||
| fieldId: string; | ||
| } : T extends 'setItemFieldValue' ? { | ||
| projectId: string; | ||
| itemId: string; | ||
| fieldId: string; | ||
| value: ProjectV2FieldValue; | ||
| } : never; | ||
| export type Response<T extends Request> = T extends 'getField' ? ResponseTypes.getField : T extends 'getFieldValues' ? ResponseTypes.getFieldValues : T extends 'getItemId' ? ResponseTypes.getItemId : T extends 'getProjectId' ? ResponseTypes.getProjectId : T extends 'clearItemFieldValue' ? ResponseTypes.clearItemFieldValue : T extends 'setItemFieldValue' ? ResponseTypes.setItemFieldValue : never; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| import { FieldDataType, Request } from './generated'; | ||
| type FieldsResult = Record<string, { | ||
| value: string | number | undefined; | ||
| type: 'TEXT' | 'SINGLE_SELECT' | 'NUMBER' | 'DATE' | 'ITERATION'; | ||
| id: string; | ||
| unsupported?: false; | ||
| } | { | ||
| value?: never; | ||
| id: string; | ||
| type: FieldDataType; | ||
| unsupported: true; | ||
| }>; | ||
| export declare class Octo { | ||
| octokit: import("@octokit/core").Octokit & import("@octokit/plugin-rest-endpoint-methods/dist-types/types").Api & { | ||
| paginate: import("@octokit/plugin-paginate-rest").PaginateInterface; | ||
| }; | ||
| requests: Record<Request, string>; | ||
| constructor(token: string); | ||
| private _request; | ||
| /** | ||
| * Gets info about a field in a project | ||
| * @param projectOwner The user or organization that owns the project | ||
| * @param projectNumber The number of the project | ||
| * @param fieldName The name of the field | ||
| * @returns Info about the field | ||
| */ | ||
| getField(projectOwner: string, projectNumber: number, fieldName: string): Promise<{ | ||
| id: string; | ||
| dataType: "SINGLE_SELECT"; | ||
| options: { | ||
| id: string; | ||
| name: string; | ||
| }[]; | ||
| } | { | ||
| id: string; | ||
| dataType: "ITERATION"; | ||
| configuration: { | ||
| iterations: { | ||
| id: string; | ||
| title: string; | ||
| }[]; | ||
| completedIterations: { | ||
| id: string; | ||
| title: string; | ||
| }[]; | ||
| }; | ||
| } | { | ||
| id: string; | ||
| dataType: Exclude<FieldDataType, "SINGLE_SELECT" | "ITERATION">; | ||
| }>; | ||
| /** | ||
| * Gets the field values for a project item | ||
| * @param resourceUrl The link to the issue or PR | ||
| * @param projectId The ID of the project | ||
| * @returns An object with each field name as a key and the field value as the value | ||
| */ | ||
| getFieldValues(resourceUrl: string, projectId: string): Promise<FieldsResult>; | ||
| /** | ||
| * Gets the id of a project item | ||
| * @param resourceUrl The link to the issue or PR | ||
| * @param projectId The ID of the project | ||
| * @returns The item ID | ||
| */ | ||
| getItemId(resourceUrl: string, projectId: string): Promise<string>; | ||
| /** | ||
| * Gets the ID of a project | ||
| * @param projectOwner The user or organization that owns the project | ||
| * @param projectNumber The number of the project | ||
| * @returns The project ID | ||
| */ | ||
| getProjectId(projectOwner: string, projectNumber: number): Promise<string>; | ||
| clearFieldValue(projectId: string, itemId: string, fieldId: string): Promise<void>; | ||
| setFieldValue(projectId: string, itemId: string, fieldId: string, value: { | ||
| text: string; | ||
| } | { | ||
| number: number; | ||
| } | { | ||
| date: string; | ||
| } | { | ||
| singleSelectOptionId: string; | ||
| } | { | ||
| iterationId: string; | ||
| }): Promise<void>; | ||
| } | ||
| export {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| import { FieldDataType } from './generated'; | ||
| export interface getField { | ||
| repositoryOwner: { | ||
| projectV2: { | ||
| field: { | ||
| id: string; | ||
| dataType: 'SINGLE_SELECT'; | ||
| options: { | ||
| id: string; | ||
| name: string; | ||
| }[]; | ||
| } | { | ||
| id: string; | ||
| dataType: 'ITERATION'; | ||
| configuration: { | ||
| iterations: { | ||
| id: string; | ||
| title: string; | ||
| }[]; | ||
| completedIterations: { | ||
| id: string; | ||
| title: string; | ||
| }[]; | ||
| }; | ||
| } | { | ||
| id: string; | ||
| dataType: Exclude<FieldDataType, 'SINGLE_SELECT' | 'ITERATION'>; | ||
| }; | ||
| }; | ||
| }; | ||
| } | ||
| export interface getFieldValues { | ||
| resource: { | ||
| projectItems: { | ||
| nodes: { | ||
| itemId: string; | ||
| project: { | ||
| id: string; | ||
| }; | ||
| fieldValues: { | ||
| totalCount: number; | ||
| nodes: ({} | { | ||
| field: { | ||
| name: string; | ||
| id: string; | ||
| dataType: FieldDataType; | ||
| }; | ||
| text?: string; | ||
| name?: string; | ||
| number?: number; | ||
| date?: string; | ||
| title?: string; | ||
| })[]; | ||
| }; | ||
| }[]; | ||
| }; | ||
| }; | ||
| } | ||
| export interface getItemId { | ||
| resource: { | ||
| projectItems: { | ||
| nodes: { | ||
| itemId: string; | ||
| project: { | ||
| id: string; | ||
| }; | ||
| }[]; | ||
| }; | ||
| }; | ||
| } | ||
| export interface getProjectId { | ||
| repositoryOwner: { | ||
| projectV2: { | ||
| id: string; | ||
| }; | ||
| }; | ||
| } | ||
| export interface clearItemFieldValue { | ||
| clientMutationId: string; | ||
| } | ||
| export interface setItemFieldValue { | ||
| clientMutationId: string; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| export declare enum OperationType { | ||
| GET_FIELDS = "GET", | ||
| SET_FIELDS = "SET", | ||
| CLEAR_FIELDS = "CLEAR" | ||
| } | ||
| interface Inputs { | ||
| operation: OperationType; | ||
| fields: string[]; | ||
| project: { | ||
| owner: string; | ||
| ownerType: 'users' | 'orgs'; | ||
| number: number; | ||
| }; | ||
| github_token: string; | ||
| resource: { | ||
| owner: string; | ||
| repo: string; | ||
| type: 'pull' | 'issues'; | ||
| number: number; | ||
| url: string; | ||
| }; | ||
| values?: string[]; | ||
| } | ||
| interface Outputs { | ||
| values: string; | ||
| } | ||
| export declare function getInputs(): Promise<Inputs>; | ||
| /** Lets you set an output that will also be logged */ | ||
| export declare function setOutput<T extends keyof Outputs>(key: T, value: Outputs[T]): void; | ||
| /** Logs all cached outputs */ | ||
| export declare function logOutputs(): void; | ||
| export {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| /** Excludes `{}` from a `Partial` type */ | ||
| export type AtLeastOne<T, U = { | ||
| [K in keyof T]: Pick<T, K>; | ||
| }> = Partial<T> & U[keyof U]; | ||
| /** Excludes `{}` from a union type */ | ||
| export type ExcludeEmpty<T> = T extends AtLeastOne<T> ? T : never; | ||
| /** | ||
| * Can be used as a type guard to check if a value is of a specific type. | ||
| * @param value The value to check | ||
| * @param test A function that takes the value as an argument and returns a whether it is of the correct type | ||
| * @returns Whether the value is of the correct type | ||
| */ | ||
| export declare function checkType<T>(value: unknown, test: (value: unknown) => boolean): value is T; | ||
| /** Shorthand to log a value in the debug logs of the action run */ | ||
| export declare function debug(item: unknown): void; | ||
| /** Generates a CSV string from an array of values */ | ||
| export declare function stringifyCSVArray(values: (string | number | boolean | undefined)[]): string; | ||
| /** Parses a CSV string containing one row into an array of strings */ | ||
| export declare function parseCSVArray(csv: string): string[]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| 'use strict'; | ||
| const gtsConfig = require('gts'); | ||
| const gtsIgnores = require('gts/eslint.ignores.js'); | ||
| const {defineConfig} = require('eslint/config'); | ||
|
|
||
| module.exports = defineConfig([ | ||
| {ignores: gtsIgnores}, | ||
| ...gtsConfig, | ||
| { | ||
| rules: { | ||
| 'spaced-comment': 'warn', | ||
| }, | ||
| }, | ||
| ]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.