Description

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


In This Article


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 subdirectories 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/repos
repositoryOwner=user1
repositoryName=sampleRepository
committerName=user2
email=user2@email.com
branch=master
token=xsp_135xliVUGuz01GWzzsXhrNvUYczGD535DbSq