def add_to_template()

in chalice/pipeline.py [0:0]


    def add_to_template(self, template, pipeline_params):
        # type: (Dict[str, Any], PipelineParameters) -> None
        # For the github source, we don't create a github repo,
        # we just wire it up in the code pipeline.  The
        # only thing we add to the template are parameters
        # we reference in other resources later.
        p = template.setdefault('Parameters', {})
        p['GithubOwner'] = {
            'Type': 'String',
            'Description': 'The github owner or org name of the repository.',
        }
        p['GithubRepoName'] = {
            'Type': 'String',
            'Description': 'The name of the github repository.',
        }
        if pipeline_params.pipeline_version == 'v1':
            p['GithubPersonalToken'] = {
                'Type': 'String',
                'Description': 'Personal access token for the github repo.',
                'NoEcho': True,
            }
        else:
            p['GithubRepoSecretId'] = {
                'Type': 'String',
                'Default': 'GithubRepoAccess',
                'Description': (
                    'The name/ID of the SecretsManager secret that '
                    'contains the personal access token for the github repo.'
                )
            }
            p['GithubRepoSecretJSONKey'] = {
                'Type': 'String',
                'Default': 'OAuthToken',
                'Description': (
                    'The name of the JSON key in the SecretsManager secret '
                    'that contains the personal access token for the '
                    'github repo.'
                )
            }