FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Store and restore "failed" configuration if `init` step aborts by mbg · Pull Request #4225 · github/codeql-action · GitHub

Repository navigation

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension .ts  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
Next Next commit
Add ActionConfig type
  • Loading branch information
mbg committed Oct 12, 2026
commit cf8f7b978792800ea9d527b0cfdef71cae962575
16 changes: 16 additions & 0 deletions src/config/action-config.ts
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
Expand Up @@ -126,3 +126,19 @@ export interface Config {
*/
enableFileCoverageInformation: boolean;
}

/** Properties available in `Config`. */
export type ActionConfigProperties = keyof Config;

/**
* The CodeQL Action configuration state that is persisted
* between steps of the CodeQL Action in a CodeQL workflow.
*
* By default, this is equivalent to `Config`. By explicitly
* providing required property names for `T` this can be restricted
* to requiring only those. For example, in `ActionConfig<"codeqlCmd">`
Comment thread
mbg marked this conversation as resolved.
Resolved
* all properties except `codeqlCmd` are optional.
*/
export type ActionConfig<

henrymercer Oct 12, 2026 •
edited
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Bikeshed: ConfigWith?

Also, we should be careful with properties that might be optional, e.g. buildMode can be undefined in a successful configuration.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Some time ago we talked about how Config is an awful name for the type and that it's really more representing the state of the Action that we persist across steps. It's also ambiguous as to whether it refers to the Action, CLI, or something else. I thought that I would use this opportunity to move away from that and introduce a better name.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

My one comment about ActionConfig is that it's quite easy to confuse with ActionState, e.g. you mention "A new ActionState type is added" in the PR description. But I agree it's good to clarify that we're talking about Action configuration.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Good point and I have fixed that in the PR description now. I can't really think of a better name right now, but open to suggestions (and happy to rename as a follow-up).

T extends ActionConfigProperties = ActionConfigProperties,
> = Partial<Config> & Pick<Config, T>;

Back | FazBrowse Home | New Git URL