GitHub
55 min
the github connector enables automated interaction with github repositories, user information, and organizational data, streamlining development workflows github is a powerful collaboration platform and version control system that enables developers to build, ship, and maintain their software the github turbine connector allows users to automate various github actions such as managing issues, pull requests, and repository contents directly from the swimlane turbine platform by integrating with github, swimlane turbine users can streamline their development and security workflows, enforce compliance, and respond to events in real time, all within a low code automation environment this connector empowers teams to enhance their operational efficiency and maintain robust security practices by leveraging github's extensive api capabilities prerequisites to effectively utilize the github connector for swimlane turbine, ensure you have the following http bearer authentication with the following parameters url the api endpoint url for github token your personal access token (pat) or jwt token for authenticating api requests asset setup to generate a personal access token, please follow the instructions https //docs github com/en/authentication/keeping your account and data secure/managing your personal access tokens to generate a jwt token, please follow the instructions https //docs github com/en/apps/creating github apps/authenticating with a github app/generating a json web token jwt for a github app capabilities the github bundle has the following capabilities block a user create a repository dispatch event create an issue create or update file contents get a pull request get a user get an issue get an organization by id get file list organizations revoke pat (fine grained token) task setup create a repository dispatch event this action is used to trigger a webhook event called repository dispatch when you want activity that happens outside of github to trigger a github actions workflow or github app webhook you must configure your github actions workflow or github app to run when the repository dispatch event occurs for an example repository dispatch webhook payload, see "repositorydispatchevent " the client payload parameter is available for any extra information that your workflow might need this parameter is a json payload that will be passed on when the webhook event is dispatched for example, the client payload can include a message that a user would like to send using a github actions workflow or the client payload can be used as a test to debug your workflow oauth app tokens and personal access tokens (classic) need the repo scope to use this endpoint fine grained access tokens for "create a repository dispatch event" this action works with the following fine grained token types https //docs github com/en/apps/creating github apps/authenticating with a github app/generating a user access token for a github app https //docs github com/en/apps/creating github apps/authenticating with a github app/generating an installation access token for a github app https //docs github com/en/authentication/keeping your account and data secure/managing your personal access tokens#creating a fine grained personal access token the fine grained token must have the following permission set "contents" repository permissions (write) github's documentation for this action can be found https //docs github com/en/rest/repos/repos?apiversion=2022 11 28#create a repository dispatch event notes https //docs github com/en/rest/quickstart?apiversion=2022 11 28 configurations http bearer authentication authenticates using a github pat or jwt token configuration parameters parameter description type required url an url to the github host string required token a jwt token or an access token with sufficient permissions string required verify ssl verify ssl certificate boolean optional http proxy a proxy to route requests through string optional actions block a user blocks a specified github user and confirms with a 204 status; returns a 422 error if blocking is not possible endpoint url /user/blocks/{{username}} method put input argument name type required description headers object required http headers for the request headers x github api version string required http headers for the request headers accept string required http headers for the request path parameters username string required parameters for the block a user action input example {"headers" {"x github api version" "2022 11 28","accept" "application/vnd github+json"},"path parameters" {"username" "github"}} output parameter type description status code number http status code of the response reason string response reason phrase response text string output field response text output example {"status code" 204,"response headers" {"server" "github com","date" "sat, 04 nov 2023 12 24 59 gmt","x oauth scopes" "admin\ enterprise, admin\ gpg key, admin\ org, admin\ org hook, admin\ public key, ad ","x accepted oauth scopes" "user","x github media type" "github v3; format=json","x github api version selected" "2022 11 28","x ratelimit limit" "5000","x ratelimit remaining" "4989","x ratelimit reset" "1699102435","x ratelimit used" "11","x ratelimit resource" "core","access control expose head create a repository dispatch event triggers a repository dispatch webhook event to initiate github actions workflows or app webhooks with specified event type, owner, and repo endpoint url /repos/{{owner}}/{{repo}}/dispatches method post input argument name type required description path parameters owner string required the account owner of the repository the name is not case sensitive path parameters repo string required the name of the repository without the git extension the name is not case sensitive headers object required http headers for the request headers accept string required setting to application/vnd github+json is recommended headers x github api version string required http headers for the request event type string optional a custom webhook event name must be 100 characters or fewer client payload object optional json payload with extra information about the webhook event that your action or workflow may use the maximum number of top level properties is 10 the total size of the json payload must be less than 64kb client payload unit boolean optional parameter for create a repository dispatch event client payload integration boolean optional parameter for create a repository dispatch event input example {"json body" {"event type" "on demand test","client payload" {"unit"\ false,"integration"\ true}},"headers" {"accept" "application/vnd github+json","x github api version" "2022 11 28"}} output parameter type description status code number http status code of the response reason string response reason phrase response text string output field response text output example {"status code" 204,"response headers" {"server" "github com","date" "wed, 18 dec 2024 12 24 59 gmt","x oauth scopes" "admin\ enterprise, admin\ gpg key, admin\ org, admin\ org hook, admin\ public key, ad ","x accepted oauth scopes" "user","x github media type" "github v3; format=json","x github api version selected" "2022 11 28","x ratelimit limit" "5000","x ratelimit remaining" "4989","x ratelimit reset" "1699102435","x ratelimit used" "11","x ratelimit resource" "core","access control expose head create an issue creates a new issue in the specified github repository using the provided title requires owner, repo, and additional details endpoint url /repos/{{owner}}/{{repo}}/issues method post input argument name type required description path parameters owner string required the account owner of the repository the name is not case sensitive path parameters repo string required the name of the repository without the git extension the name is not case sensitive headers object required http headers for the request headers accept string required http headers for the request headers x github api version string required http headers for the request title string optional the title of the issue body string optional the contents of the issue assignee string optional login for the user that this issue should be assigned to milestone string optional the number of the milestone to associate this issue with labels array optional labels to associate with this issue assignees array optional logins for users to assign to this issue input example {"path parameters" {"owner" "string","repo" "string"},"headers" {"accept" "application/vnd github+json","x github api version" "2022 11 28"},"title" "string","body" "string","assignee" "string","milestone" "string","labels" \["string"],"assignees" \["string"]} output parameter type description status code number http status code of the response reason string response reason phrase url string url endpoint for the request repository url string url endpoint for the request labels url string url endpoint for the request comments url string url endpoint for the request events url string url endpoint for the request html url string url endpoint for the request id number unique identifier node id string unique identifier number number output field number title string output field title user object output field user user login string output field user login user id number unique identifier user node id string unique identifier user avatar url string url endpoint for the request user gravatar id string unique identifier user url string url endpoint for the request user html url string url endpoint for the request user followers url string url endpoint for the request user following url string url endpoint for the request user gists url string url endpoint for the request user starred url string url endpoint for the request user subscriptions url string url endpoint for the request output example {"status code" 201,"response headers" {"server" "github com","date" "sun, 10 sep 2023 09 00 36 gmt","content type" "application/json; charset=utf 8","content length" "6126","cache control" "private, max age=60, s maxage=60","vary" "accept, authorization, cookie, x github otp, accept encoding, accept, x requeste ","etag" "\\"b85f090c17f8a0f07b38d07c42a6a59116fd960958f5b71a5f764ab32759965a\\"","x oauth scopes" "admin\ enterprise, admin\ gpg key, admin\ org, admin\ org hook, admin\ repo hook, adm ","x create or update file contents create or update file contents in a github repository, requiring path parameters (owner, repo, path) and json body with message and content endpoint url /repos/{{owner}}/{{repo}}/contents/{{path}} method put input argument name type required description path parameters owner string required the account owner of the repository the name is not case sensitive path parameters repo string required the name of the repository without the git extension the name is not case sensitive path parameters path string required path from root to the file to be created or updated headers object required http headers for the request headers accept string required http headers for the request headers x github api version string required http headers for the request message string optional the commit message content string optional the file content, using base64 encoding sha string optional required if you are updating a file the blob sha of the file being replaced branch string optional the branch name default the repository’s default branch committer object optional the person that committed the file default the authenticated user committer name string optional the name of the committer of the commit you'll receive a 422 status code if name is omitted committer email string optional the email of the committer of the commit you'll receive a 422 status code if email is omitted committer date string optional date value author object optional parameter for create or update file contents author name string optional the name of the author of the commit you'll receive a 422 status code if name is omitted author email string optional the email of the author of the commit you'll receive a 422 status code if email is omitted author date string optional date value input example {"path parameters" {"owner" "string","repo" "string","path" "string"},"headers" {"accept" "application/vnd github+json","x github api version" "2022 11 28"},"message" "string","content" "string","sha" "string","branch" "string","committer" {"name" "example name","email" "user\@example com","date" "2024 01 01t00 00 00z"},"author" {"name" "example name","email" "user\@example com","date" "2024 01 01t00 00 00z"}} output parameter type description status code number http status code of the response reason string response reason phrase content object response content content name string name of the resource content path string response content content sha string response content content size number response content content url string url endpoint for the request content html url string url endpoint for the request content git url string url endpoint for the request content download url string url endpoint for the request content type string type of the resource content links object response content content links self string response content content links git string response content content links html string response content commit object output field commit commit sha string output field commit sha commit node id string unique identifier commit url string url endpoint for the request commit html url string url endpoint for the request commit author object output field commit author commit author name string name of the resource commit author email string output field commit author email commit author date string date value output example {"status code" 200,"response headers" {"server" "github com","date" "sun, 10 sep 2023 08 29 41 gmt","content type" "application/json; charset=utf 8","transfer encoding" "chunked","cache control" "private, max age=60, s maxage=60","vary" "accept, authorization, cookie, x github otp, accept encoding, accept, x requeste ","etag" "w/\\"911292a7951b39bdc0d53e0b0ed712f92385469a64c500a2fc0e186c6d1498ec\\"","x oauth scopes" "admin\ enterprise, admin\ gpg key, admin\ org, admin\ org hook, admin\ repo hook, ad get a pull request retrieve detailed information for a specific pull request in github using the repository owner, repo name, and pull number endpoint url /repos/{{owner}}/{{repo}}/pulls/{{pull number}} method get input argument name type required description path parameters owner string required the account owner of the repository the name is not case sensitive path parameters repo string required the name of the repository without the git extension the name is not case sensitive path parameters pull number number required parameters for the get a pull request action headers object required http headers for the request headers accept string required http headers for the request headers x github api version string required http headers for the request input example {"path parameters" {"owner" "string","repo" "string","pull number" 123},"headers" {"accept" "application/vnd github+json","x github api version" "2022 11 28"}} output parameter type description status code number http status code of the response reason string response reason phrase url string url endpoint for the request id number unique identifier node id string unique identifier html url string url endpoint for the request diff url string url endpoint for the request patch url string url endpoint for the request issue url string url endpoint for the request commits url string url endpoint for the request review comments url string url endpoint for the request review comment url string url endpoint for the request comments url string url endpoint for the request statuses url string url endpoint for the request number number output field number state string output field state locked boolean output field locked title string output field title user object output field user user login string output field user login user id number unique identifier user node id string unique identifier user avatar url string url endpoint for the request user gravatar id string unique identifier user url string url endpoint for the request output example {"status code" 200,"response headers" {"server" "github com","date" "sun, 10 sep 2023 09 19 31 gmt","content type" "application/json; charset=utf 8","transfer encoding" "chunked","cache control" "private, max age=60, s maxage=60","vary" "accept, authorization, cookie, x github otp, accept encoding, accept, x requeste ","etag" "w/\\"14f5e385ca01e477288dbb7e7d33bd5bb23711ee98b7fd5df71a58efba5418b2\\"","last modified" "wed, 06 sep 2023 16 27 54 gmt","x oauth scopes" "admin\ enterprise, admin\ gpg key get a user retrieve publicly available information about a github user by specifying the username endpoint url /users/{{username}} method get input argument name type required description headers object required http headers for the request headers x github api version string required http headers for the request headers accept string required http headers for the request path parameters username string required parameters for the get a user action input example {"headers" {"x github api version" "2022 11 28","accept" "application/vnd github+json"},"path parameters" {"username" "github"}} output parameter type description status code number http status code of the response reason string response reason phrase login string output field login id number unique identifier node id string unique identifier avatar url string url endpoint for the request gravatar id string unique identifier url string url endpoint for the request html url string url endpoint for the request followers url string url endpoint for the request following url string url endpoint for the request gists url string url endpoint for the request starred url string url endpoint for the request subscriptions url string url endpoint for the request organizations url string url endpoint for the request repos url string url endpoint for the request events url string url endpoint for the request received events url string url endpoint for the request type string type of the resource site admin boolean output field site admin name string name of the resource company object output field company blog string output field blog location string output field location email object output field email output example {"status code" 200,"response headers" {"server" "github com","date" "sat, 04 nov 2023 12 21 15 gmt","content type" "application/json; charset=utf 8","transfer encoding" "chunked","cache control" "private, max age=60, s maxage=60","vary" "accept, authorization, cookie, x github otp, accept encoding, accept, x requeste ","etag" "w/\\"a2fdd5420c59742e686712e811415f38e938e83c135f72002e3e7578fae72711\\"","last modified" "tue, 29 nov 2022 19 44 55 gmt","x oauth scopes" "admin\ enterprise, admin\ gpg key get an issue retrieve details for a specific issue from a github repository using the owner, repo, and issue number endpoint url /repos/{{owner}}/{{repo}}/issues/{{issue number}} method get input argument name type required description path parameters owner string required the account owner of the repository the name is not case sensitive path parameters repo string required the name of the repository without the git extension the name is not case sensitive path parameters issue number number required parameters for the get an issue action headers object required http headers for the request headers accept string required http headers for the request headers x github api version string required http headers for the request input example {"path parameters" {"owner" "string","repo" "string","issue number" 123},"headers" {"accept" "application/vnd github+json","x github api version" "2022 11 28"}} output parameter type description status code number http status code of the response reason string response reason phrase url string url endpoint for the request repository url string url endpoint for the request labels url string url endpoint for the request comments url string url endpoint for the request events url string url endpoint for the request html url string url endpoint for the request id number unique identifier node id string unique identifier number number output field number title string output field title user object output field user user login string output field user login user id number unique identifier user node id string unique identifier user avatar url string url endpoint for the request user gravatar id string unique identifier user url string url endpoint for the request user html url string url endpoint for the request user followers url string url endpoint for the request user following url string url endpoint for the request user gists url string url endpoint for the request user starred url string url endpoint for the request user subscriptions url string url endpoint for the request output example {"status code" 200,"response headers" {"server" "github com","date" "sun, 10 sep 2023 09 07 57 gmt","content type" "application/json; charset=utf 8","transfer encoding" "chunked","cache control" "private, max age=60, s maxage=60","vary" "accept, authorization, cookie, x github otp, accept encoding, accept, x requeste ","etag" "w/\\"b85f090c17f8a0f07b38d07c42a6a59116fd960958f5b71a5f764ab32759965a\\"","last modified" "sun, 10 sep 2023 09 00 36 gmt","x oauth scopes" "admin\ enterprise, admin\ gpg key get an organization by id retrieve details of a specific github organization using its unique id, requiring both headers and the 'orgid' path parameter endpoint url /orgs/{{orgid}} method get input argument name type required description headers object required http headers for the request headers x github api version string required http headers for the request headers accept string required http headers for the request path parameters orgid string required parameters for the get an organization by id action input example {"headers" {"x github api version" "2022 11 28","accept" "application/vnd github+json"},"path parameters" {"org" "1"}} output parameter type description status code number http status code of the response reason string response reason phrase login string output field login id number unique identifier node id string unique identifier url string url endpoint for the request repos url string url endpoint for the request events url string url endpoint for the request hooks url string url endpoint for the request issues url string url endpoint for the request members url string url endpoint for the request public members url string url endpoint for the request avatar url string url endpoint for the request description string output field description name string name of the resource company object output field company blog string output field blog location string output field location email object output field email twitter username object name of the resource is verified boolean output field is verified has organization projects boolean output field has organization projects has repository projects boolean output field has repository projects public repos number output field public repos public gists number output field public gists output example {"status code" 200,"response headers" {"server" "github com","date" "sat, 04 nov 2023 12 18 22 gmt","content type" "application/json; charset=utf 8","transfer encoding" "chunked","cache control" "private, max age=60, s maxage=60","vary" "accept, authorization, cookie, x github otp, accept encoding, accept, x requeste ","etag" "w/\\"834f4948c757254f52bcf9431917b61e686bf22a9aba5324d662c440dbdc79ac\\"","last modified" "tue, 29 nov 2022 19 44 55 gmt","x oauth scopes" "admin\ enterprise, admin\ gpg key get file retrieves the content of a specified file or directory from a github repository, requiring the repository's owner, name, and file path endpoint url /repos/{{owner}}/{{repo}}/contents/{{path}} method get input argument name type required description path parameters owner string required the account owner of the repository the name is not case sensitive path parameters repo string required the name of the repository without the git extension the name is not case sensitive path parameters path string required file path or directory path from root headers object required http headers for the request headers accept string required http headers for the request headers x github api version string required http headers for the request parameters ref string optional parameters for the get file action input example {"path parameters" {"owner" "string","repo" "string","path" "string"},"headers" {"accept" "application/vnd github+json","x github api version" "2022 11 28"},"parameters" {"ref" "string"}} output parameter type description status code number http status code of the response reason string response reason phrase name string name of the resource path string output field path sha string output field sha size number output field size url string url endpoint for the request html url string url endpoint for the request git url string url endpoint for the request download url string url endpoint for the request type string type of the resource content string response content encoding string output field encoding links object output field links links self string output field links self links git string output field links git links html string output field links html output example {"status code" 200,"response headers" {"server" "github com","date" "sun, 10 sep 2023 08 38 19 gmt","content type" "application/json; charset=utf 8","transfer encoding" "chunked","cache control" "private, max age=60, s maxage=60","vary" "accept, authorization, cookie, x github otp, accept encoding, accept, x requeste ","etag" "w/\\"7d71b040dbc5ed0cee2775d7bc31bf9962bb65b3\\"","last modified" "sun, 10 sep 2023 08 33 32 gmt","x oauth scopes" "admin\ enterprise, admin\ gpg key, admin\ org, admin\ org h list organizations retrieves a list of all organizations on github in the order they were created, requiring specific header information endpoint url /organizations method get input argument name type required description headers object required http headers for the request headers x github api version string required http headers for the request headers accept string required http headers for the request parameters since number optional parameters for the list organizations action parameters per page number optional parameters for the list organizations action input example {"parameters" {"since" 1,"per page" 10},"headers" {"x github api version" "2022 11 28","accept" "application/vnd github+json"}} output parameter type description status code number http status code of the response reason string response reason phrase output example {"status code" 200,"response headers" {"server" "github com","date" "sat, 04 nov 2023 12 09 27 gmt","content type" "application/json; charset=utf 8","transfer encoding" "chunked","cache control" "private, max age=60, s maxage=60","vary" "accept, authorization, cookie, x github otp, accept encoding, accept, x requeste ","etag" "w/\\"7a188c41cd70b54373cb4a941d92eb1cc2950b97dfbd498e62b4477be6d00a05\\"","x oauth scopes" "admin\ enterprise, admin\ gpg key, admin\ org, admin\ org hook, admin\ public key, a revoke pat updates an organization member's resource access by revoking a specified fine grained personal access token in github endpoint url /orgs/{{orgid}}/personal access tokens/{{patid}} method post input argument name type required description headers object required http headers for the request headers x github api version string required http headers for the request headers accept string required http headers for the request path parameters orgid string required parameters for the revoke pat action path parameters patid string required parameters for the revoke pat action action string optional parameter for revoke pat input example {"json body" {"action" "revoke"},"headers" {"x github api version" "2022 11 28","accept" "application/vnd github+json"}} output parameter type description status code number http status code of the response reason string response reason phrase response text string output field response text output example {"status code" 204,"response headers" {"server" "github com","date" "sat, 04 nov 2023 12 24 59 gmt","x oauth scopes" "admin\ enterprise, admin\ gpg key, admin\ org, admin\ org hook, admin\ public key, ad ","x accepted oauth scopes" "user","x github media type" "github v3; format=json","x github api version selected" "2022 11 28","x ratelimit limit" "5000","x ratelimit remaining" "4989","x ratelimit reset" "1699102435","x ratelimit used" "11","x ratelimit resource" "core","access control expose head response headers header description example access control allow origin http response header access control allow origin access control expose headers http response header access control expose headers etag, link, location, retry after, x github otp, x ratelimit limit, x ratelimit remaining, x ratelimit used, x ratelimit resource, x ratelimit reset, x oauth scopes, x accepted oauth scopes, x poll interval, x github media type, x github sso, x github request id, deprecation, sunset cache control directives for caching mechanisms private, max age=60, s maxage=60 content encoding http response header content encoding gzip content length the length of the response body in bytes 6126 content security policy http response header content security policy default src 'none' content type the media type of the resource application/json; charset=utf 8 date the date and time at which the message was originated sun, 10 sep 2023 08 38 19 gmt etag an identifier for a specific version of a resource w/"14f5e385ca01e477288dbb7e7d33bd5bb23711ee98b7fd5df71a58efba5418b2" github authentication token expiration http response header github authentication token expiration 2023 09 17 08 10 24 utc last modified the date and time at which the origin server believes the resource was last modified sun, 10 sep 2023 09 00 36 gmt link http response header link https //api github com/organizations?since=374\&per page=10 ; rel="next", https //api github com/organizations{?since} ; rel="first" location the url to redirect a page to https //api github com/repos/swimlane connectors/github test/issues/1 referrer policy http response header referrer policy origin when cross origin, strict origin when cross origin server information about the software used by the origin server github com strict transport security http response header strict transport security max age=31536000; includesubdomains; preload transfer encoding http response header transfer encoding chunked vary http response header vary accept, authorization, cookie, x github otp, accept encoding, accept, x requested with x accepted oauth scopes http response header x accepted oauth scopes repo x content type options http response header x content type options nosniff x frame options http response header x frame options deny x github api version selected http response header x github api version selected 2022 11 28 x github media type http response header x github media type github v3; format=json x github request id http response header x github request id 9c11 3f8c1e 5fd5e3 6ae11f 64fd7e74 x oauth scopes http response header x oauth scopes admin \ enterprise , admin \ gpg key , admin \ org , admin \ org hook , admin \ repo hook , admin \ ssh signing key , audit log, codespace, copilot, delete \ packages , delete repo, gist, notifications, project, repo, user, workflow, write \ discussion , write \ packages x ratelimit limit the number of requests allowed in the current rate limit window 5000 x ratelimit remaining the number of requests remaining in the current rate limit window 4997 x ratelimit reset the time at which the current rate limit window resets 1699102435 x ratelimit resource http response header x ratelimit resource core x ratelimit used http response header x ratelimit used 7 x xss protection http response header x xss protection 0