Skip to content

Commit

Permalink
chore: re-order, rename and fix hyperlinks in documentation #321
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieSlome committed Oct 26, 2023
1 parent 59f3263 commit 33ae1f4
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 26 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Approving a push
description: How to review & approve a push in Git Proxy
description: How to approve a push in Git Proxy
---

All pushes that flow through Git Proxy require an approval (authorisation). Until a push is approved, Git Proxy will block the commits from being sent to the upstream repository. To approve a push, you can use the REST API or web UI.
Expand All @@ -11,14 +11,14 @@ All pushes that flow through Git Proxy require an approval (authorisation). Unti

- Proxy and REST API are running ([default behaviour](https://github.com/finos/git-proxy/blob/main/index.js))
- Proxy and REST API are running on `localhost:8000` and `localhost:8080`, respectively
- [Quickstart](docs/get-started/quickstart) instructions have been followed and you've reached [Eureka! 🎉](/docs/get-started/quickstart#6-eureka-)
- [Intercepting a push](/docs/quickstart/intercept) instructions have been followed and you've reached [Push via Git Proxy](/docs/quickstart/intercept#push-via-git-proxy)
- [`curl`](https://curl.se/) is installed

### Instructions

#### 1. Find the tracking `ID`

Following on from [Eureka! 🎉](/docs/get-started/quickstart#6-eureka-), you'll receive a unique URL:
Following on from [Push via Git Proxy](/docs/quickstart/intercept#push-via-git-proxy), you'll receive a unique URL:

```
http://localhost:8080/requests/0000000000000000000000000000000000000000__79b4d8953cbc324bcc1eb53d6412ff89666c241f
Expand All @@ -41,7 +41,7 @@ curl -H "Content-Type: application/json" -c git-proxy-cookie -X POST \

#### 3. Retrieve push with `ID` from database

Using the [cookie](/docs/get-started/authorize#2-authenticate-with-the-api) generated, execute a `GET` request to confirm that your push with `ID` exists in the database:
Using the [cookie](/docs/quickstart/approve#2-authenticate-with-the-api) generated, execute a `GET` request to confirm that your push with `ID` exists in the database:

```bash
curl -I -b ./git-proxy-cookie http://localhost:8080/api/v1/push/${ID}
Expand All @@ -51,7 +51,7 @@ You should receive a `200 OK` in the response.

#### 4. Approve the push with `ID`

Using the same [cookie](/docs/get-started/authorize#2-authenticate-with-the-api) again, send a `POST` command to approve the push:
Using the same [cookie](/docs/quickstart/approve#2-authenticate-with-the-api) again, send a `POST` command to approve the push:

```bash
curl -b ./git-proxy-cookie \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Quickstart
description: Ready to take Git Proxy for a test drive?
title: Intercepting a push
description: How to intercept a push with Git Proxy
---

In this section, we will demonstrate the power 💪 of Git Proxy and how it works with a barebones & out-of-the-box demonstration using default configuration. Before we start, there are a few prerequisites:
Expand Down Expand Up @@ -94,7 +94,7 @@ remote: http://localhost:8080/requests/000000__b12557
remote:
```

The push is now held in a suspended state by Git Proxy and requires [approval](/docs/get-started/authorize) before it can be pushed to the upstream repository on GitHub.
The push is now held in a suspended state by Git Proxy and requires [approval](/docs/quickstart/approve) before it can be pushed to the upstream repository on GitHub.


#### Managing credentials
Expand Down
File renamed without changes.
25 changes: 8 additions & 17 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,20 @@ module.exports = {
'index',
{
type: 'category',
label: 'Get Started',
label: 'Quickstart',
link: {
type: 'generated-index',
title: 'Get Started',
slug: '/category/get-started',
keywords: [
'get started',
'quickstart',
'installation',
'configuration',
'usage',
],
title: 'Quickstart',
slug: '/category/quickstart',
keywords: ['get started', 'quickstart'],
image: '/img/github-mark.png',
},
collapsible: true,
collapsed: false,
items: [
'get-started/installation',
'get-started/usage',
'get-started/configuration',
'get-started/quickstart',
'get-started/authorize',
],
items: ['quickstart/intercept', 'quickstart/approve'],
},
'installation',
'usage',
'configuration',
],
};
2 changes: 1 addition & 1 deletion website/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function Home() {
</a>
<a
className="button button--outline button--secondary button--lg margin-left--sm"
href="/docs/get-started/quickstart"
href="/docs/category/quickstart"
>
Quickstart 🚀
</a>
Expand Down

0 comments on commit 33ae1f4

Please sign in to comment.