Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github Sync From Lightning #970

Closed
5 of 6 tasks
zacck opened this issue Jul 26, 2023 · 2 comments · Fixed by #1007
Closed
5 of 6 tasks

Github Sync From Lightning #970

zacck opened this issue Jul 26, 2023 · 2 comments · Fixed by #1007
Assignees

Comments

@zacck
Copy link
Contributor

zacck commented Jul 26, 2023

we want:

To be able to update a lightning projec in github and to be able to make commits to a specific branch, updating some files, when two things happen in lightning:

  1. The user hits save on a workflow and they have auto-commit enabled
  2. The user clicks “sync” next to a workflow or project (in either case, the whole project will likely be synced unless you know a way to have only the individual workflow get synced.)

Design Doc

https://docs.google.com/document/d/15hhQ1sm1ffKkya2vJdKI44MCMUG85EW5UVuld-M1IhQ/edit

Strategy

  • Add a project repo connection with the following keys
    |id | project_id | user_id| installation_id|repo| branch|timestamps
  • Before a user is redirected to the installation we need to record their id and the project id, note a user will only have one installation_id that is nil at a time
  • Build a controller to receive the installation_id from github and redirect us to the version control settings in project settings
  • Build a nested version control settings live view and allow us to redirected to and boot in the correct state that way a user can finish set up
  • Once a user is redirected back we need to collect available repos and branches to sync to and enable the user to choose those from a pick list
  • User saves repo project connection and is not allowed to sycn and sync is available for editors as well
@zacck zacck self-assigned this Jul 26, 2023
@taylordowns2000 taylordowns2000 changed the title Github Sync From Lighting Github Sync From Lightning Jul 31, 2023
@zacck zacck mentioned this issue Aug 1, 2023
4 tasks
@zacck
Copy link
Contributor Author

zacck commented Aug 3, 2023

The work for this is mostly done we are missing a few things though

  • We need to use base64 encoding to pass in the github certification
  • The github client makes a few http calls to fetch repos and branches, these need to be mocked and tested
  • Some intermediary states need to be shown, such as fetching the repos and fetching the branches
  • Testing the live views for correct actions and display

@taylordowns2000
Copy link
Member

  1. if github key isn't provided via ENV, show "Version Control is not configured for this Lightning instance. Contact the superuser for more information."
  2. remember to set Application config (:config, blah, blah) in runtime.exs after reading from System.get_env("BLAH") and then use that stuff in the app via Application.get_env()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants