github-schema 1.0.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1 +1,2 @@
1
- export { default as gql } from 'graphql-tag';
1
+ export { gql } from './chunk-GEXVORGP.mjs';
2
+ export { default as gqlTyped } from 'graphql-tag';
package/dist/raw.cjs ADDED
@@ -0,0 +1,8 @@
1
+ 'use strict';
2
+
3
+ // src/raw.ts
4
+ function gql(raw, ...keys) {
5
+ return keys.length === 0 ? raw[0] : String.raw({ raw }, ...keys);
6
+ }
7
+
8
+ exports.gql = gql;
package/dist/raw.d.cts ADDED
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Returns a GraphQL query string by interpolating variables into a template string.
3
+ * @param {TemplateStringsArray} raw - The template string.
4
+ * @param {...string} keys - The variables to interpolate.
5
+ * @returns {string} The interpolated GraphQL query string.
6
+ */
7
+ declare function gql(raw: TemplateStringsArray, ...keys: string[]): string;
8
+
9
+ export { gql };
package/dist/raw.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Returns a GraphQL query string by interpolating variables into a template string.
3
+ * @param {TemplateStringsArray} raw - The template string.
4
+ * @param {...string} keys - The variables to interpolate.
5
+ * @returns {string} The interpolated GraphQL query string.
6
+ */
7
+ declare function gql(raw: TemplateStringsArray, ...keys: string[]): string;
8
+
9
+ export { gql };
package/dist/raw.mjs ADDED
@@ -0,0 +1 @@
1
+ export { gql } from './chunk-GEXVORGP.mjs';
@@ -7089,6 +7089,11 @@ type CreateLinkedBranchPayload {
7089
7089
  """
7090
7090
  clientMutationId: String
7091
7091
 
7092
+ """
7093
+ The issue that was linked to.
7094
+ """
7095
+ issue: Issue
7096
+
7092
7097
  """
7093
7098
  The new branch issue reference.
7094
7099
  """
@@ -9598,6 +9603,11 @@ type DeploymentProtectionRule {
9598
9603
  """
9599
9604
  databaseId: Int
9600
9605
 
9606
+ """
9607
+ Whether deployments to this environment can be approved by the user who created the deployment.
9608
+ """
9609
+ preventSelfReview: Boolean
9610
+
9601
9611
  """
9602
9612
  The teams or users that can review the deployment
9603
9613
  """
@@ -29164,6 +29174,11 @@ type PermissionSource {
29164
29174
  """
29165
29175
  permission: DefaultRepositoryPermissionField!
29166
29176
 
29177
+ """
29178
+ The name of the role this source has granted to the user.
29179
+ """
29180
+ roleName: String
29181
+
29167
29182
  """
29168
29183
  The source of this permission.
29169
29184
  """
@@ -42651,7 +42666,8 @@ type RepositoryConnection {
42651
42666
  totalCount: Int!
42652
42667
 
42653
42668
  """
42654
- The total size in kilobytes of all repositories in the connection.
42669
+ The total size in kilobytes of all repositories in the connection. Value will
42670
+ never be larger than max 32-bit signed integer.
42655
42671
  """
42656
42672
  totalDiskUsage: Int!
42657
42673
  }
@@ -43221,6 +43237,11 @@ enum RepositoryLockReason {
43221
43237
  The repository is locked due to a trade controls related reason.
43222
43238
  """
43223
43239
  TRADE_RESTRICTION
43240
+
43241
+ """
43242
+ The repository is locked due to an ownership transfer.
43243
+ """
43244
+ TRANSFERRING_OWNERSHIP
43224
43245
  }
43225
43246
 
43226
43247
  """
@@ -43744,6 +43765,11 @@ input RepositoryRuleInput {
43744
43765
  The rule types supported in rulesets
43745
43766
  """
43746
43767
  enum RepositoryRuleType {
43768
+ """
43769
+ Authorization
43770
+ """
43771
+ AUTHORIZATION
43772
+
43747
43773
  """
43748
43774
  Branch name pattern
43749
43775
  """
@@ -43775,7 +43801,27 @@ enum RepositoryRuleType {
43775
43801
  DELETION
43776
43802
 
43777
43803
  """
43778
- Prevent users with push access from force pushing to branches.
43804
+ Branch is read-only. Users cannot push to the branch.
43805
+ """
43806
+ LOCK_BRANCH
43807
+
43808
+ """
43809
+ Max ref updates
43810
+ """
43811
+ MAX_REF_UPDATES
43812
+
43813
+ """
43814
+ Merges must be performed via a merge queue.
43815
+ """
43816
+ MERGE_QUEUE
43817
+
43818
+ """
43819
+ Merge queue locked ref
43820
+ """
43821
+ MERGE_QUEUE_LOCKED_REF
43822
+
43823
+ """
43824
+ Prevent users with push access from force pushing to refs.
43779
43825
  """
43780
43826
  NON_FAST_FORWARD
43781
43827
 
@@ -43785,29 +43831,55 @@ enum RepositoryRuleType {
43785
43831
  PULL_REQUEST
43786
43832
 
43787
43833
  """
43788
- Choose which environments must be successfully deployed to before branches can
43789
- be merged into a branch that matches this rule.
43834
+ Choose which environments must be successfully deployed to before refs can be merged into a branch that matches this rule.
43790
43835
  """
43791
43836
  REQUIRED_DEPLOYMENTS
43792
43837
 
43793
43838
  """
43794
- Prevent merge commits from being pushed to matching branches.
43839
+ Prevent merge commits from being pushed to matching refs.
43795
43840
  """
43796
43841
  REQUIRED_LINEAR_HISTORY
43797
43842
 
43798
43843
  """
43799
- Commits pushed to matching branches must have verified signatures.
43844
+ When enabled, all conversations on code must be resolved before a pull request
43845
+ can be merged into a branch that matches this rule.
43846
+ """
43847
+ REQUIRED_REVIEW_THREAD_RESOLUTION
43848
+
43849
+ """
43850
+ Commits pushed to matching refs must have verified signatures.
43800
43851
  """
43801
43852
  REQUIRED_SIGNATURES
43802
43853
 
43803
43854
  """
43804
43855
  Choose which status checks must pass before branches can be merged into a
43805
43856
  branch that matches this rule. When enabled, commits must first be pushed to
43806
- another branch, then merged or pushed directly to a branch that matches this
43807
- rule after status checks have passed.
43857
+ another branch, then merged or pushed directly to a ref that matches this rule
43858
+ after status checks have passed.
43808
43859
  """
43809
43860
  REQUIRED_STATUS_CHECKS
43810
43861
 
43862
+ """
43863
+ Require all commits be made to a non-target branch and submitted via a pull
43864
+ request and required workflow checks to pass before they can be merged.
43865
+ """
43866
+ REQUIRED_WORKFLOW_STATUS_CHECKS
43867
+
43868
+ """
43869
+ Commits pushed to matching refs must have verified signatures.
43870
+ """
43871
+ RULESET_REQUIRED_SIGNATURES
43872
+
43873
+ """
43874
+ Secret scanning
43875
+ """
43876
+ SECRET_SCANNING
43877
+
43878
+ """
43879
+ Tag
43880
+ """
43881
+ TAG
43882
+
43811
43883
  """
43812
43884
  Tag name pattern
43813
43885
  """
@@ -43817,6 +43889,16 @@ enum RepositoryRuleType {
43817
43889
  Only allow users with bypass permission to update matching refs.
43818
43890
  """
43819
43891
  UPDATE
43892
+
43893
+ """
43894
+ Require all changes made to a targeted branch to pass the specified workflows before they can be merged.
43895
+ """
43896
+ WORKFLOWS
43897
+
43898
+ """
43899
+ Workflow files cannot be modified.
43900
+ """
43901
+ WORKFLOW_UPDATES
43820
43902
  }
43821
43903
 
43822
43904
  """
@@ -44708,8 +44790,7 @@ interface RequirableByPullRequest {
44708
44790
  }
44709
44791
 
44710
44792
  """
44711
- Choose which environments must be successfully deployed to before branches can
44712
- be merged into a branch that matches this rule.
44793
+ Choose which environments must be successfully deployed to before refs can be merged into a branch that matches this rule.
44713
44794
  """
44714
44795
  type RequiredDeploymentsParameters {
44715
44796
  """
@@ -44719,8 +44800,7 @@ type RequiredDeploymentsParameters {
44719
44800
  }
44720
44801
 
44721
44802
  """
44722
- Choose which environments must be successfully deployed to before branches can
44723
- be merged into a branch that matches this rule.
44803
+ Choose which environments must be successfully deployed to before refs can be merged into a branch that matches this rule.
44724
44804
  """
44725
44805
  input RequiredDeploymentsParametersInput {
44726
44806
  """
@@ -44764,7 +44844,7 @@ input RequiredStatusCheckInput {
44764
44844
  """
44765
44845
  Choose which status checks must pass before branches can be merged into a branch
44766
44846
  that matches this rule. When enabled, commits must first be pushed to another
44767
- branch, then merged or pushed directly to a branch that matches this rule after
44847
+ branch, then merged or pushed directly to a ref that matches this rule after
44768
44848
  status checks have passed.
44769
44849
  """
44770
44850
  type RequiredStatusChecksParameters {
@@ -44784,7 +44864,7 @@ type RequiredStatusChecksParameters {
44784
44864
  """
44785
44865
  Choose which status checks must pass before branches can be merged into a branch
44786
44866
  that matches this rule. When enabled, commits must first be pushed to another
44787
- branch, then merged or pushed directly to a branch that matches this rule after
44867
+ branch, then merged or pushed directly to a ref that matches this rule after
44788
44868
  status checks have passed.
44789
44869
  """
44790
44870
  input RequiredStatusChecksParametersInput {
@@ -45378,7 +45458,7 @@ enum RuleEnforcement {
45378
45458
  """
45379
45459
  Types which can be parameters for `RepositoryRule` objects.
45380
45460
  """
45381
- union RuleParameters = BranchNamePatternParameters | CommitAuthorEmailPatternParameters | CommitMessagePatternParameters | CommitterEmailPatternParameters | PullRequestParameters | RequiredDeploymentsParameters | RequiredStatusChecksParameters | TagNamePatternParameters | UpdateParameters
45461
+ union RuleParameters = BranchNamePatternParameters | CommitAuthorEmailPatternParameters | CommitMessagePatternParameters | CommitterEmailPatternParameters | PullRequestParameters | RequiredDeploymentsParameters | RequiredStatusChecksParameters | TagNamePatternParameters | UpdateParameters | WorkflowsParameters
45382
45462
 
45383
45463
  """
45384
45464
  Specifies the parameters for a `RepositoryRule` object. Only one of the fields should be specified.
@@ -45428,6 +45508,11 @@ input RuleParametersInput {
45428
45508
  Parameters used for the `update` rule type
45429
45509
  """
45430
45510
  update: UpdateParametersInput
45511
+
45512
+ """
45513
+ Parameters used for the `workflows` rule type
45514
+ """
45515
+ workflows: WorkflowsParametersInput
45431
45516
  }
45432
45517
 
45433
45518
  """
@@ -46520,6 +46605,11 @@ enum SocialAccountProvider {
46520
46605
  """
46521
46606
  MASTODON
46522
46607
 
46608
+ """
46609
+ JavaScript package registry.
46610
+ """
46611
+ NPM
46612
+
46523
46613
  """
46524
46614
  Social news aggregation and discussion website.
46525
46615
  """
@@ -48306,7 +48396,7 @@ enum SponsorsCountryOrRegionCode {
48306
48396
  TO
48307
48397
 
48308
48398
  """
48309
- Turkey
48399
+ Türkiye
48310
48400
  """
48311
48401
  TR
48312
48402
 
@@ -54548,6 +54638,11 @@ input UpdateEnvironmentInput {
54548
54638
  """
54549
54639
  environmentId: ID!
54550
54640
 
54641
+ """
54642
+ Whether deployments to this environment can be approved by the user who created the deployment.
54643
+ """
54644
+ preventSelfReview: Boolean
54645
+
54551
54646
  """
54552
54647
  The ids of users or teams that can approve deployments to this environment
54553
54648
  """
@@ -58178,6 +58273,56 @@ type Workflow implements Node & UniformResourceLocatable {
58178
58273
  url: URI!
58179
58274
  }
58180
58275
 
58276
+ """
58277
+ A workflow that must run for this rule to pass
58278
+ """
58279
+ type WorkflowFileReference {
58280
+ """
58281
+ The path to the workflow file
58282
+ """
58283
+ path: String!
58284
+
58285
+ """
58286
+ The ref (branch or tag) of the workflow file to use
58287
+ """
58288
+ ref: String
58289
+
58290
+ """
58291
+ The ID of the repository where the workflow is defined
58292
+ """
58293
+ repositoryId: Int!
58294
+
58295
+ """
58296
+ The commit SHA of the workflow file to use
58297
+ """
58298
+ sha: String
58299
+ }
58300
+
58301
+ """
58302
+ A workflow that must run for this rule to pass
58303
+ """
58304
+ input WorkflowFileReferenceInput {
58305
+ """
58306
+ The path to the workflow file
58307
+ """
58308
+ path: String!
58309
+
58310
+ """
58311
+ The ref (branch or tag) of the workflow file to use
58312
+ """
58313
+ ref: String
58314
+
58315
+ """
58316
+ The ID of the repository where the workflow is defined
58317
+ """
58318
+ repositoryId: Int!
58319
+
58320
+ """
58321
+ The commit SHA of the workflow file to use
58322
+ """
58323
+ sha: String
58324
+ }
58325
+
58181
58326
  """
58182
58327
  A workflow run.
58183
58328
  """
@@ -58426,6 +58571,26 @@ enum WorkflowState {
58426
58571
  DISABLED_MANUALLY
58427
58572
  }
58428
58573
 
58574
+ """
58575
+ Require all changes made to a targeted branch to pass the specified workflows before they can be merged.
58576
+ """
58577
+ type WorkflowsParameters {
58578
+ """
58579
+ Workflows that must pass for this rule to pass.
58580
+ """
58581
+ workflows: [WorkflowFileReference!]!
58582
+ }
58583
+
58584
+ """
58585
+ Require all changes made to a targeted branch to pass the specified workflows before they can be merged.
58586
+ """
58587
+ input WorkflowsParametersInput {
58588
+ """
58589
+ Workflows that must pass for this rule to pass.
58590
+ """
58591
+ workflows: [WorkflowFileReferenceInput!]!
58592
+ }
58593
+
58429
58594
  """
58430
58595
  A valid x509 certificate string
58431
58596
  """
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "github-schema",
3
3
  "type": "module",
4
- "version": "1.0.0",
5
- "packageManager": "bun@1.0.2",
4
+ "version": "1.1.1",
5
+ "packageManager": "bun@1.0.7",
6
6
  "description": "GitHub's GraphQL schema",
7
7
  "author": {
8
8
  "name": "Lucas Nørgård",
@@ -20,13 +20,46 @@
20
20
  },
21
21
  "exports": {
22
22
  ".": {
23
- "types": "./dist/index.d.ts",
24
- "import": "./dist/index.mjs",
25
- "require": "./dist/index.cjs"
23
+ "import": {
24
+ "types": "./dist/index.d.ts",
25
+ "default": "./dist/index.mjs"
26
+ },
27
+ "require": {
28
+ "types": "./dist/index.d.cts",
29
+ "default": "./dist/index.cjs"
30
+ }
31
+ },
32
+ "./raw": {
33
+ "import": {
34
+ "types": "./dist/raw.d.ts",
35
+ "default": "./dist/raw.mjs"
36
+ },
37
+ "require": {
38
+ "types": "./dist/raw.d.cts",
39
+ "default": "./dist/raw.cjs"
40
+ }
41
+ },
42
+ "./graphql-schema": "./github-schema.graphql",
43
+ "./github-schema": {
44
+ "import": {
45
+ "types": "./dist/github-schema.d.ts",
46
+ "default": "./dist/github-schema.mjs"
47
+ },
48
+ "require": {
49
+ "types": "./dist/github-schema.d.cts",
50
+ "default": "./dist/github-schema.cjs"
51
+ }
52
+ },
53
+ "./schema": {
54
+ "import": {
55
+ "types": "./dist/github-schema.d.ts",
56
+ "default": "./dist/github-schema.mjs"
57
+ },
58
+ "require": {
59
+ "types": "./dist/github-schema.d.cts",
60
+ "default": "./dist/github-schema.cjs"
61
+ }
26
62
  },
27
- "./github-schema.graphql": "./github-schema.graphql",
28
- "./github-schema": "./github-schema.d.ts",
29
- "./schema": "./github-schema.d.ts",
30
63
  "./package.json": "./package.json"
31
64
  },
32
65
  "main": "dist/index.cjs",
@@ -37,26 +70,28 @@
37
70
  "github-schema.graphql",
38
71
  "github-schema.d.ts"
39
72
  ],
73
+ "scripts": {
74
+ "build": "tsup",
75
+ "download": "bun run scripts/download.ts",
76
+ "codegen": "graphql-codegen",
77
+ "prepublishOnly": "bun run download && bun run codegen && bun run build",
78
+ "lint": "eslint .",
79
+ "lint:fix": "eslint --fix .",
80
+ "typecheck": "tsc --noEmit"
81
+ },
40
82
  "dependencies": {
41
83
  "graphql": "^16.8.1",
42
84
  "graphql-tag": "^2.12.6"
43
85
  },
44
86
  "devDependencies": {
87
+ "@graphql-codegen/add": "^5.0.0",
45
88
  "@graphql-codegen/cli": "^5.0.0",
46
89
  "@graphql-codegen/typescript": "^4.0.1",
47
90
  "@luxass/eslint-config": "^3.3.2",
48
- "bun-types": "^1.0.2",
49
- "eslint": "^8.49.0",
50
- "eslint-plugin-import": "npm:eslint-plugin-i@2.28.0-2",
51
- "typescript": "^5.2.2",
52
- "unbuild": "^2.0.0"
53
- },
54
- "scripts": {
55
- "build": "unbuild",
56
- "download": "bun run scripts/download.ts",
57
- "codegen": "graphql-codegen",
58
- "lint": "eslint .",
59
- "lint:fix": "eslint --fix .",
60
- "typecheck": "tsc --noEmit"
91
+ "bun-types": "^1.0.7",
92
+ "eslint": "^8.52.0",
93
+ "eslint-plugin-import": "npm:eslint-plugin-i@2.29.0",
94
+ "tsup": "^7.2.0",
95
+ "typescript": "^5.2.2"
61
96
  }
62
- }
97
+ }