Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #31 from Code-Hex/fix/28
Browse files Browse the repository at this point in the history
fixed #28
  • Loading branch information
Code-Hex authored Mar 3, 2022
2 parents ce8b84c + fb4a8fd commit 3b6d8dc
Show file tree
Hide file tree
Showing 9 changed files with 16,021 additions and 6,579 deletions.
643 changes: 639 additions & 4 deletions example/github/enums.md

Large diffs are not rendered by default.

1,683 changes: 1,621 additions & 62 deletions example/github/input_objects.md

Large diffs are not rendered by default.

558 changes: 556 additions & 2 deletions example/github/interfaces.md

Large diffs are not rendered by default.

670 changes: 662 additions & 8 deletions example/github/mutations.md

Large diffs are not rendered by default.

18,955 changes: 12,469 additions & 6,486 deletions example/github/objects.md

Large diffs are not rendered by default.

22 changes: 8 additions & 14 deletions example/github/queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ Lookup a given repository by the owner and repository name.

| Name | Description |
|------|-------------|
| followRenames ([Boolean](scalars.md#boolean)) | <p>Follow repository renames. If disabled, a repository referenced by its old name will return an error.</p> |
| name ([String!](scalars.md#string)) | <p>The name of the repository</p> |
| owner ([String!](scalars.md#string)) | <p>The login field of a user or organization</p> |

Expand Down Expand Up @@ -370,6 +371,13 @@ Users and organizations who can be sponsored via GitHub Sponsors.
| before ([String](scalars.md#string)) | <p>Returns the elements in the list that come before the specified cursor.</p> |
| dependencyEcosystem ([SecurityAdvisoryEcosystem](enums.md#securityadvisoryecosystem)) | <p>Optional filter for which dependencies should be checked for sponsorable
owners. Only sponsorable owners of dependencies in this ecosystem will be
included. Used when onlyDependencies = true.</p>

<p><strong>Upcoming Change on 2022-07-01 UTC</strong>
<strong>Description:</strong> <code>dependencyEcosystem</code> will be removed. Use the ecosystem argument instead.
<strong>Reason:</strong> The type is switching from SecurityAdvisoryEcosystem to DependencyGraphEcosystem.</p> |
| ecosystem ([DependencyGraphEcosystem](enums.md#dependencygraphecosystem)) | <p>Optional filter for which dependencies should be checked for sponsorable
owners. Only sponsorable owners of dependencies in this ecosystem will be
included. Used when onlyDependencies = true.</p> |
| first ([Int](scalars.md#int)) | <p>Returns the first <em>n</em> elements from the list.</p> |
| last ([Int](scalars.md#int)) | <p>Returns the last <em>n</em> elements from the list.</p> |
Expand All @@ -385,20 +393,6 @@ public repositories will be considered.</p> |

---

### sponsorsListing

#### Type: [SponsorsListing](objects.md#sponsorslisting)

Look up a single Sponsors Listing

#### Arguments

| Name | Description |
|------|-------------|
| slug ([String!](scalars.md#string)) | <p>Select the Sponsors listing which matches this slug</p> |

---

### topic

#### Type: [Topic](objects.md#topic)
Expand Down
10 changes: 8 additions & 2 deletions example/github/scalars.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

When calling the GraphQL API, you must specify nested subfields until you return only scalars.

### Base64String

<p>A (potentially binary) string encoded using base64.</p>

---

### Boolean

<p>The <code>Boolean</code> scalar type represents <code>true</code> or <code>false</code>.</p>
Expand Down Expand Up @@ -62,7 +68,7 @@ When calling the GraphQL API, you must specify nested subfields until you return

### ID

<p>The <code>ID</code> scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as <code>&quot;4&quot;</code>) or integer (such as <code>4</code>) input value will be accepted as an ID.</p>
<p>The <code>ID</code> scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as &ldquo;4&rdquo;) or integer (such as 4) input value will be accepted as an ID.</p>

---

Expand All @@ -80,7 +86,7 @@ When calling the GraphQL API, you must specify nested subfields until you return

### String

<p>The <code>String</code> scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.</p>
<p>The <code>String</code>scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.</p>

---

Expand Down
54 changes: 54 additions & 0 deletions example/github/unions.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@ A [union](https://graphql.github.io/graphql-spec/June2018/#sec-Unions) is a type

---

### BranchActorAllowanceActor

<p>Types which can be actors for <code>BranchActorAllowance</code> objects.</p>

### Possible types


- [Team](objects.md#team)
- [User](objects.md#user)

---

### Closer

<p>The object which triggered a <code>ClosedEvent</code>.</p>
Expand Down Expand Up @@ -79,6 +91,18 @@ A [union](https://graphql.github.io/graphql-spec/June2018/#sec-Unions) is a type

---

### DeploymentReviewer

<p>Users and teams.</p>

### Possible types


- [Team](objects.md#team)
- [User](objects.md#user)

---

### EnterpriseMember

<p>An object that is a member of an enterprise.</p>
Expand All @@ -98,6 +122,7 @@ A [union](https://graphql.github.io/graphql-spec/June2018/#sec-Unions) is a type
### Possible types


- [App](objects.md#app)
- [Enterprise](objects.md#enterprise)
- [Organization](objects.md#organization)

Expand Down Expand Up @@ -157,6 +182,7 @@ A [union](https://graphql.github.io/graphql-spec/June2018/#sec-Unions) is a type
- [CommentDeletedEvent](objects.md#commentdeletedevent)
- [ConnectedEvent](objects.md#connectedevent)
- [ConvertedNoteToIssueEvent](objects.md#convertednotetoissueevent)
- [ConvertedToDiscussionEvent](objects.md#convertedtodiscussionevent)
- [CrossReferencedEvent](objects.md#crossreferencedevent)
- [DemilestonedEvent](objects.md#demilestonedevent)
- [DisconnectedEvent](objects.md#disconnectedevent)
Expand Down Expand Up @@ -309,6 +335,18 @@ A [union](https://graphql.github.io/graphql-spec/June2018/#sec-Unions) is a type
### Possible types


- [Issue](objects.md#issue)
- [PullRequest](objects.md#pullrequest)

---

### ProjectNextItemContent

<p>Types that can be inside Project Items.</p>

### Possible types


- [Issue](objects.md#issue)
- [PullRequest](objects.md#pullrequest)

Expand Down Expand Up @@ -380,6 +418,7 @@ A [union](https://graphql.github.io/graphql-spec/June2018/#sec-Unions) is a type
- [ConnectedEvent](objects.md#connectedevent)
- [ConvertToDraftEvent](objects.md#converttodraftevent)
- [ConvertedNoteToIssueEvent](objects.md#convertednotetoissueevent)
- [ConvertedToDiscussionEvent](objects.md#convertedtodiscussionevent)
- [CrossReferencedEvent](objects.md#crossreferencedevent)
- [DemilestonedEvent](objects.md#demilestonedevent)
- [DeployedEvent](objects.md#deployedevent)
Expand Down Expand Up @@ -435,6 +474,20 @@ A [union](https://graphql.github.io/graphql-spec/June2018/#sec-Unions) is a type

---

### Reactor

<p>Types that can be assigned to reactions.</p>

### Possible types


- [Bot](objects.md#bot)
- [Mannequin](objects.md#mannequin)
- [Organization](objects.md#organization)
- [User](objects.md#user)

---

### ReferencedSubject

<p>Any referencable object</p>
Expand Down Expand Up @@ -492,6 +545,7 @@ A [union](https://graphql.github.io/graphql-spec/June2018/#sec-Unions) is a type


- [App](objects.md#app)
- [Discussion](objects.md#discussion)
- [Issue](objects.md#issue)
- [MarketplaceListing](objects.md#marketplacelisting)
- [Organization](objects.md#organization)
Expand Down
5 changes: 4 additions & 1 deletion internal/markdown/markdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ type Config struct {
}

func (m *Config) Create(filename string) (*os.File, error) {
dest := filepath.Join(m.BaseDir, filename)
dest, err := filepath.Abs(filepath.Join(m.BaseDir, filename))
if err != nil {
return nil, errors.WithStack(err)
}
return os.Create(dest)
}

Expand Down

0 comments on commit 3b6d8dc

Please sign in to comment.