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
Update the module with ballerina 0.990.0 #60
Update the module with ballerina 0.990.0 #60
Conversation
README.md
Outdated
repository = rep; | ||
} else { | ||
io:println(err); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove new line here.
github4/github_constants.bal
Outdated
|
||
// Public constants | ||
# Pull request state open, closed and merged | ||
@final public string PULL_REQUEST_STATE_ALL = "[\"OPEN\",\"CLOSED\",\"MERGED\"]"; | ||
final string PULL_REQUEST_STATE_ALL = "[\"OPEN\",\"CLOSED\",\"MERGED\"]"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing public
access modifier here block the usage of these variables for end users. Please correct it all the places where applicable.
final string PULL_REQUEST_STATE_ALL = "[\"OPEN\",\"CLOSED\",\"MERGED\"]"; | |
public final string PULL_REQUEST_STATE_ALL = "[\"OPEN\",\"CLOSED\",\"MERGED\"]"; |
github4/github_constants.bal
Outdated
# Closed state | ||
@final public string STATE_CLOSED = "[\"CLOSED\"]"; | ||
final string STATE_CLOSED = "[\"CLOSED\"]"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
final string STATE_CLOSED = "[\"CLOSED\"]"; | |
public final string STATE_CLOSED = "[\"CLOSED\"]"; |
github4/github_constants.bal
Outdated
# Merged state | ||
@final public string STATE_MERGED = "[\"MERGED\"]"; | ||
final string STATE_MERGED = "[\"MERGED\"]"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
final string STATE_MERGED = "[\"MERGED\"]"; | |
public final string STATE_MERGED = "[\"MERGED\"]"; |
github4/github_constants.bal
Outdated
# Open state | ||
@final public string STATE_OPEN = "[\"OPEN\"]"; | ||
final string STATE_OPEN = "[\"OPEN\"]"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
final string STATE_OPEN = "[\"OPEN\"]"; | |
public final string STATE_OPEN = "[\"OPEN\"]"; |
github4/github_constants.bal
Outdated
# State open and closed | ||
@final public string STATE_ALL = "[\"OPEN\",\"CLOSED\"]"; | ||
final string STATE_ALL = "[\"OPEN\",\"CLOSED\"]"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
final string STATE_ALL = "[\"OPEN\",\"CLOSED\"]"; | |
public final string STATE_ALL = "[\"OPEN\",\"CLOSED\"]"; |
github4/github_data_mappings.bal
Outdated
target_repository.owner = {}; | ||
} else { | ||
var result = RepositoryOwner.convert(source_json.owner); | ||
if(result is RepositoryOwner) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if(result is RepositoryOwner) { | |
if (result is RepositoryOwner) { |
github4/github_data_mappings.bal
Outdated
target_repository.primaryLanguage = {}; | ||
} else { | ||
var result = Language.convert(source_json.primaryLanguage); | ||
if(result is Language) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if(result is Language) { | |
if (result is Language) { |
github4/github_endpoint.bal
Outdated
# + githubGraphQlClient - HTTP client endpoint | ||
public type Client client object { | ||
|
||
public http:Client githubRestClient; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public http:Client githubRestClient; | |
http:Client githubRestClient; |
github4/github_endpoint.bal
Outdated
public type Client client object { | ||
|
||
public http:Client githubRestClient; | ||
public http:Client githubGraphQlClient; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public http:Client githubGraphQlClient; | |
http:Client githubGraphQlClient; |
github4/github_endpoint.bal
Outdated
# + labelList - List of labels for the issue | ||
# + assigneeList - Users to be assigned to the issue | ||
# + return - Created issue object or Connector error | ||
remote function createIssue(string repositoryOwner, string repositoryName, string issueTitle, string issueContent, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these remote functions should have public
access modifier. Otherwise, this prevents the enduser to call these. Right?
github4/github_endpoint.bal
Outdated
} | ||
} | ||
} else { | ||
error err = error(GITHUB_ERROR_CODE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please format the code here.
github4/github_endpoint.bal
Outdated
remote function Client.getColumnListNextPage(ColumnList columnList) returns ColumnList|error { | ||
|
||
if (columnList.hasNextPage()) { | ||
var jsonQuery = stringToJson(columnList.columnListQuery); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please format the code in everywhere of this remote function.
github4/github_endpoint.bal
Outdated
if (repository is Repository) { | ||
repositoryOwner = repository.owner.login; | ||
repositoryName = repository.name; | ||
} else if (repository is (string, string)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} else if (repository is (string, string)){ | |
} else if (repository is (string, string)) { |
github4/github_endpoint.bal
Outdated
//Check for empty payloads and errors | ||
json|error validatedResponse = getValidatedResponse(response, GIT_ISSUES); | ||
|
||
if(validatedResponse is json) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if(validatedResponse is json) { | |
if (validatedResponse is json) { |
github4/github_endpoint.bal
Outdated
if (result is Project) { | ||
return result; | ||
} else { | ||
error err = error(GITHUB_ERROR_CODE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please format the code here.
github4/github_endpoint.bal
Outdated
returns RepositoryList|error { | ||
|
||
string organizationName = ""; | ||
if(organization is Organization) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if(organization is Organization) { | |
if (organization is Organization) { |
github4/github_utils.bal
Outdated
|
||
error err => { | ||
if (response is http:Response) { | ||
if(response.getJsonPayload() is error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if(response.getJsonPayload() is error) { | |
if (response.getJsonPayload() is error) { |
Fix Made the changes in the testcases
Purpose
Update the module with ballerina 0.990.0.
In the github connector, only 41 testcase are successfully run and other testcases are failure because the data map.
Goals
Approach
User stories
Release note
Documentation
Training
Certification
Marketing
Automation github4.tests
Security checks
Samples
Related PRs
Migrations (if applicable)
Test environment
Learning