Skip to content

Add mock GitHub API config listener#1632

Merged
charisk merged 1 commit intomainfrom
charisk/setup-config-listener
Oct 19, 2022
Merged

Add mock GitHub API config listener#1632
charisk merged 1 commit intomainfrom
charisk/setup-config-listener

Conversation

@charisk
Copy link
Copy Markdown
Contributor

@charisk charisk commented Oct 19, 2022

Set up a config listener to start and stop the mock server.

Checklist

N/A - internal only:

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

@charisk charisk added the secexp label Oct 19, 2022
@charisk charisk requested a review from koesie10 October 19, 2022 13:32
@charisk charisk requested a review from a team as a code owner October 19, 2022 13:32
*/
export class MockGitHubApiServer {
private isListening: boolean;
private config: MockGitHubApiConfigListener;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can this be readonly and instantiated inline?

Suggested change
private config: MockGitHubApiConfigListener;
private readonly config = new MockGitHubApiConfigListener();

I'm also happy to leave it like this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not a huge fan of adding logic outside of the constructor (but that runs as part of the constructor).

@charisk charisk enabled auto-merge (squash) October 19, 2022 14:46
@charisk charisk merged commit 6a78560 into main Oct 19, 2022
@charisk charisk deleted the charisk/setup-config-listener branch October 19, 2022 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants