Sorry, we didn't find any relevant articles for you.

Send us your queries using the form below and we will get back to you with a solution.

How do I use GithubReceiver

Learn how to effectively utilize GithubReceiver for streamlining your GitHub workflows .

Description

The GithubReceiver traverses one or more payload sub-directories, and for each file found, this Receiver commits and pushes the file to a branch.

Receiver Parameters

The following parameters should be defined for the GithubReceiver. Items with an asterisk(*) are required.

  • payloadFilesPath* - Defines the base location of the files to send
  • payloadFilesSubDir - Defines the naming convention for sub-directories within the payloadFilesPath
  • payloadFilesDescriptor - Defines the name of the descriptor of files to be sent from payloadFilesSubDir
    • Example:
      • txt - Sends only files whose extension is txt
      • xls - Sends only files whose extension is xls
  • propertiesFilePath* - Defines the location of the configuration properties file
  • propertiesSubDir - Defines the subdirectory within the propertiesFilePath where the properties file is located
  • propertiesFileName* - Defines the file name of the configuration properties file
  • logFileCount* - Defines the number of requests that are executed before logging a message to the console
  • commitMessage* - Indicates commit message

Configuration (Properties File)

The GithubReceiver must read from a configuration file that contains information to be able to connect to the Github repository. The configuration file must contain the properties listed below. Items with an asterisk(*) are required.

  • rootUrl* - URL for the GitHub repository
  • repositoryOwner* - Username for the owner of the repository
  • repositoryName* - Name of the repository where files should be pushed
  • committerName* - Username of committer
  • email* - Email of committer
  • branch* - Branch where files should be pushed
  • token* - Access token used by committer

Note: To generate access token, please follow this link: https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token

Below is an example configuration file:

rootUrl=https://api.github.com/reposrepositoryOwner=user1repositoryName=sampleRepositorycommitt