Skip to content
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

Extract NewIssueData from PullRequestCreated #150

Merged
merged 1 commit into from
Feb 27, 2025

Conversation

pavel-mikula-sonarsource
Copy link
Contributor

@pavel-mikula-sonarsource pavel-mikula-sonarsource commented Feb 26, 2025

This is preparation for the ToDo that are in the code. There was too much logic in the action itself.

There should be no functional changes

Tested here:
https://github.com/pavel-mikula-test-organization/GitHubActionPlaygroundOrganization/pull/94
https://github.com/pavel-mikula-test-organization/GitHubActionPlaygroundOrganization/pull/95

@@ -74,20 +81,20 @@ export class JiraClient {
};
};

private async sendJiraGet(endpoint: string): Promise<any> {
return this.sendJiraRequest("GET", endpoint);
private async sendRestGet(endpoint: string): Promise<any> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The renames and refactorings here are to make room for sendGraphQL(query: any) that will call sendRequest

Comment on lines +63 to +66
if (email == null) {
console.log('Could not find accountId, email is null');
return null;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This null-check is new. Previously, this was called only after email was checked for null. Now, it's called every time.

The test org doesn't have SAML. And it applies also to bots.

Copy link
Contributor

@sebastien-marichal sebastien-marichal left a comment

Choose a reason for hiding this comment

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

LGTM!

@sebastien-marichal sebastien-marichal merged commit 1b43399 into master Feb 27, 2025
1 check passed
@sebastien-marichal sebastien-marichal deleted the Pavel/Refactor branch February 27, 2025 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants