Skip to content

Commit 75f0374

Browse files
Merge pull request #14 from syngenta/Feature-GitHub_Integration
Released v0.2.0
2 parents 3458b33 + ee973db commit 75f0374

File tree

14 files changed

+694
-115
lines changed

14 files changed

+694
-115
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@ package-lock.json
2121

2222
npm-debug.log*
2323
yarn-debug.log*
24-
yarn-error.log*
24+
yarn-error.log*
25+
26+
.env

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,15 @@
33
<img src="./images/logo.png" height="300" width="300"></img>
44

55
[![Deploy app to GitHub Pages](https://github.com/syngenta/circleci-config-visualizer/actions/workflows/deploy.yml/badge.svg?branch=main)](https://github.com/syngenta/circleci-config-visualizer/actions/workflows/deploy.yml)
6-
[![Stars](https://custom-icon-badges.herokuapp.com/github/stars/syngenta/circleci-config-visualizer?logo=star&style=social&logoColor=black)](https://custom-icon-badges.herokuapp.com/github/stars/syngenta/circleci-config-visualizer?logo=star&style=social&logoColor=black)
6+
[![Stars](https://img.shields.io/github/stars/syngenta/circleci-config-visualizer)](https://img.shields.io/github/stars/syngenta/circleci-config-visualizer)
7+
8+
[![MIT License](https://img.shields.io/github/license/syngenta/circleci-config-visualizer)](https://img.shields.io/github/license/syngenta/circleci-config-visualizer)
9+
[![GitHub Release](https://img.shields.io/github/v/release/syngenta/circleci-config-visualizer)](https://img.shields.io/github/v/release/syngenta/circleci-config-visualizer)
10+
[![Open Issues](https://img.shields.io/github/issues/syngenta/circleci-config-visualizer)](https://img.shields.io/github/issues/syngenta/circleci-config-visualizer)
11+
[![Pull Requests](https://img.shields.io/github/issues-pr/syngenta/circleci-config-visualizer)](https://img.shields.io/github/issues-pr/syngenta/circleci-config-visualizer)
12+
13+
[![Open Source](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://opensource.org/)
14+
715

816
# CircleCI Config Visualizer
917
</div>
@@ -24,7 +32,15 @@ Built using `Reactjs`, `Redux`, and `Typescript`.
2432

2533
![Homepage](https://github.com/syngenta/circleci-config-visualizer/blob/main/images/homepage.png)
2634

27-
3. The file gets opened in a visual editor:
35+
3. Alternatively, you can now connect your GitHub account using a Personal Access Token (PAT) and load config files directly from your repositories:
36+
37+
![GitHub Connect](https://github.com/syngenta/circleci-config-visualizer/blob/main/images/github_connect.png)
38+
39+
If `config.yml` is present in the repo, the status will be shown. Click on **Load Config** button to load the config:
40+
41+
![GitHub Config Load](https://github.com/syngenta/circleci-config-visualizer/blob/main/images/github_config_load.png)
42+
43+
4. The file gets opened in a visual editor:
2844

2945
![Visualized file](https://github.com/syngenta/circleci-config-visualizer/blob/main/images/visualized_file.png)
3046

images/github_config_load.png

156 KB
Loading

images/github_connect.png

173 KB
Loading

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,17 @@
2020
"@types/react-router-dom": "^5.3.3",
2121
"@xyflow/react": "^12.0.4",
2222
"aos": "^2.3.4",
23+
"axios": "^1.7.9",
24+
"buffer": "^6.0.3",
2325
"html-to-image": "^1.11.11",
2426
"js-yaml": "^4.1.0",
2527
"monaco-themes": "^0.4.4",
28+
"octokit": "^4.0.2",
2629
"react": "^18.3.1",
2730
"react-dom": "^18.3.1",
2831
"react-icons": "^5.2.1",
2932
"react-json-view": "^1.21.3",
33+
"react-loader-spinner": "^6.1.6",
3034
"react-redux": "^9.1.2",
3135
"react-resizable-panels": "^2.0.22",
3236
"react-router": "^6.26.1",

src/App.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import "aos/dist/aos.css";
1414
import { setDataReducer } from "./redux/data/dataSlice";
1515
import Development from "./pages/Development/Development";
1616
import { ReactFlowProvider } from "@xyflow/react";
17+
import { setGithubData } from "./redux/githubData/githubDataSlice";
18+
import { Buffer } from "buffer";
1719
AOS.init();
1820

1921
function App() {
@@ -32,6 +34,16 @@ function App() {
3234
dispatch(setDarkMode(false));
3335
document.documentElement.classList.remove("dark");
3436
}
37+
const githubData = localStorage.getItem("githubData");
38+
if (githubData) {
39+
dispatch(
40+
setGithubData(
41+
Buffer.from(githubData, "base64").toString("binary")
42+
)
43+
);
44+
} else {
45+
dispatch(setGithubData(null));
46+
}
3547
}, []);
3648

3749
return (

0 commit comments

Comments
 (0)