The GithubReceiver traverses one or more payload subdirectories and for each file found, this Receiver commits and pushes the file to a branch.
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
- 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 owner of repository
- repositoryName* - Name of 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: