mirror of
https://github.com/jlengrand/github-templates.git
synced 2026-03-10 08:21:22 +00:00
482a025f6365c2f0dab9bf682314814d23be042b
Github Templates
This repository was created for my talk at Javaland 2021 about Voice apps.
The app presented here is an Alexa voice app that allows the user to create repositories from Github templates. It was created using the Alexa Skills Kit
Structure :
The structure of this repository is the typical structure of a Java generated ask app.
- skill-package contains all the information about the skill itself, as well as the 'front-end' of the app
- lambda contains the Java code and represents the 'back-end' of the app. It is uploaded as an AWS lambda.
Some interesting files :
- en-GB.json contains the JSON representation of my app model (basically its front-end).
- CreateRepositoryIntentHandler.java is where the magic happens, and the repository is created based on user input.
Running the code
This code is specifically wired to run on my environment. However, you can try it in a few steps.
- Make sure to be logged in the AWS CLI locally.
- In the skill.json file, empty out the "apis" object.
- Make sure that the ask-resources.json file "type" key contains your default AWS region.
- Once you have deployed the lambda using
ask deploy, create theGITHUB_LOGINandGITHUB_OAUTHenvironment variables so the lambda can interact with your Github account. - If you want to be able to run GithubDataGrabber, create a .githubconfig file in the root of the repository with the
GITHUB_LOGINandGITHUB_OAUTHvalues.
note : You can find more information about the Github API here.
note2: Using environment variables is fine for testing, but for actual production usage there are better ways to interact with the Github API.
Slides of the talk
See slides.
Author
Description
Languages
Java
100%