Skip to content

Commit

Permalink
close #1059, release v0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
taylordowns2000 committed Aug 31, 2023
1 parent e554378 commit b1e1aea
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 9 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,17 @@ and this project adheres to

### Added

### Changed

### Fixed

## [v0.8.0]

### Added

- Introduces Github sync feature, users can now setup our github app on their
instance and sync projects using our latest portability spec
[#970](https://github.com/OpenFn/Lightning/issues/970)

- Support Backup Codes for Multi-Factor Authentication
[937](https://github.com/OpenFn/Lightning/issues/937)
- Log a warning in the console when the Editor/docs component is given latest
Expand All @@ -24,6 +31,8 @@ and this project adheres to
[#957](https://github.com/OpenFn/Lightning/issues/957)
- Reimplement skipped CredentialLive tests
[#962](https://github.com/OpenFn/Lightning/issues/962)
- Show GitHub installation ID and repo link to help setup/debugging for version
control [1059](https://github.com/OpenFn/Lightning/issues/1059)

### Changed

Expand Down
8 changes: 5 additions & 3 deletions lib/lightning_web/live/project_live/settings.ex
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ defmodule LightningWeb.ProjectLive.Settings do
%{repo: nil} ->
{false, true, false, project_repo_connection}

%{repo: r, branch: b} ->
{false, true, true, %{"repo" => r, "branch" => b}}
%{repo: r, branch: b, github_installation_id: g} ->
{false, true, true,
%{"repo" => r, "branch" => b, "github_installation_id" => g}}
end

repo_settings
Expand Down Expand Up @@ -327,7 +328,8 @@ defmodule LightningWeb.ProjectLive.Settings do
show_sync_button: true,
project_repo_connection: %{
"branch" => params["branch"],
"repo" => params["repo"]
"repo" => params["repo"],
"github_installation_id" => params["github_installation_id"]
}
)}
end
Expand Down
58 changes: 55 additions & 3 deletions lib/lightning_web/live/project_live/settings.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,17 @@
<div :if={!@show_github_setup} class="bg-white p-4 rounded-md">
<h6 class="font-medium text-black">Sync to Github</h6>
<small class="block my-1 text-xs text-gray-600">
Configure the settings below to start Syncing
Configure a two-way sync between this lightning project and a
GitHub repo. See
<.link
href="https://docs.openfn.org/documentation/portability"
target="_blank"
class="hover:underline text-primary-600"
>
portability docs
</.link>
for full documentation on associated GitHub actions and
automated workflows.
</small>

<.form
Expand All @@ -396,7 +406,14 @@
Repository
<% end %>
<%= if @show_sync_button do %>
Repository: <%= @project_repo_connection["repo"] %>
Repository:
<.link
href={"https://www.github.com/" <> @project_repo_connection["repo"]}
target="_blank"
class="hover:underline text-primary-600"
>
<%= @project_repo_connection["repo"] %>
</.link>
<% end %>
</span>
</small>
Expand Down Expand Up @@ -427,7 +444,10 @@
Branch
<% end %>
<%= if @show_sync_button do %>
Branch: <%= @project_repo_connection["branch"] %>
Branch:
<span class="text-xs font-mono bg-gray-200 rounded-md p-1">
<%= @project_repo_connection["branch"] %>
</span>
<% end %>
</span>
</small>
Expand All @@ -445,6 +465,38 @@
/>
</div>
</div>
<%= if @show_sync_button do %>
<div class="hidden sm:block" aria-hidden="true">
<div class="py-1"></div>
</div>
<div class="grid grid-cols gap-6">
<div class="md:col-span-2">
<small class="font-medium my-1 text-xs text-black">
<span>
GitHub Installation ID:
<span class="text-xs font-mono bg-gray-200 rounded-md p-1">
<%= @project_repo_connection[
"github_installation_id"
] %>
</span>
</span>
</small>
<Form.select_field
:if={@show_repo_setup && !@show_sync_button}
form={f}
disabled={@loading_branches}
phx-change="branch_selected"
name={:branch}
id="project-branch"
values={@branches}
prompt={
@project_repo_connection["branch"] ||
"Select a branch"
}
/>
</div>
</div>
<% end %>
<div class="hidden sm:block" aria-hidden="true">
<div class="py-4"></div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Lightning.MixProject do
def project do
[
app: :lightning,
version: "0.7.3",
version: "0.8.0",
elixir: "~> 1.15",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: Mix.compilers(),
Expand Down
2 changes: 1 addition & 1 deletion test/lightning_web/live/project_live_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ defmodule LightningWeb.ProjectLiveTest do

assert view
|> render_click("save_repo", %{branch: "b", repo: "r"}) =~
"Repository: r"
"Repository:\n <a href=\"https://www.github.com/r\" target=\"_blank\" class=\"hover:underline text-primary-600\">\nr"
end

@tag role: :admin
Expand Down

0 comments on commit b1e1aea

Please sign in to comment.