Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
import ballerina/log;
import ballerinax/github;

configurable string owner = ?;
configurable string repo = ?;

public function main() returns error? {
do {
github:Issue githubIssue = check githubClient->/repos/[owner]/[repo]/issues.post({
title: "Test webhook"
});
Comment thread
PasinduGunarathne marked this conversation as resolved.
log:printInfo("Issue created", number = githubIssue.number, url = githubIssue.html_url);
} on fail error e {
log:printError("Error occurred", 'error = e);
return e;
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

configurable string webhookSecret = ?;
configurable int listenerPort = ?;
configurable string githubAuthToken = ?;
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
import ballerinax/github;

final github:Client githubClient = check new ({
auth: {
token: string `${githubAuthToken}`
}
});
Comment thread
PasinduGunarathne marked this conversation as resolved.