Skip to content

Commit be86988

Browse files
committed
Optimize graphql query and add README.md
1 parent 056d36e commit be86988

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# git-remote-gitopia
2+
3+
git remote helper for [Gitopia](https://gitopia.org)
4+
PST Fee of 0.01 AR is applicable on git push.
5+
6+
## Steps to Build
7+
8+
- `npm install`
9+
- `npm link`
10+
11+
## Usage
12+
13+
Set the following environment variable with the path of your Arweave wallet file.
14+
`export GITOPIA_WALLET_PATH=/path/to/wallet`
15+
16+
You don't need to run `git-remote-gitopia` directly, it will be called automatically by `git` when it encounters remote of the form `gitopia://`

bin/lib/graphql.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ export const getOidByRef = async (arweave, remoteURI, ref) => {
1414
transactions(
1515
owners: ["${repoOwnerAddress}"]
1616
tags: [
17+
{ name: "Type", values: ["update-ref"] }
1718
{ name: "Repo", values: ["${repoName}"] }
1819
{ name: "Version", values: ["0.0.2"] }
1920
{ name: "Ref", values: ["${ref}"] }
20-
{ name: "Type", values: ["update-ref"] }
2121
{ name: "App-Name", values: ["gitopia"] }
2222
]
2323
first: 10
@@ -78,9 +78,9 @@ export const getAllRefs = async (arweave, remoteURI) => {
7878
transactions(
7979
owners: ["${repoOwnerAddress}"]
8080
tags: [
81+
{ name: "Type", values: ["update-ref"] }
8182
{ name: "Repo", values: ["${repoName}"] }
8283
{ name: "Version", values: ["0.0.2"] }
83-
{ name: "Type", values: ["update-ref"] }
8484
{ name: "App-Name", values: ["gitopia"] }
8585
]
8686
) {

0 commit comments

Comments
 (0)