github-schema 1.0.0 → 1.1.0

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
  """
@@ -43221,6 +43236,11 @@ enum RepositoryLockReason {
43221
43236
  The repository is locked due to a trade controls related reason.
43222
43237
  """
43223
43238
  TRADE_RESTRICTION
43239
+
43240
+ """
43241
+ The repository is locked due to an ownership transfer.
43242
+ """
43243
+ TRANSFERRING_OWNERSHIP
43224
43244
  }
43225
43245
 
43226
43246
  """
@@ -43744,6 +43764,11 @@ input RepositoryRuleInput {
43744
43764
  The rule types supported in rulesets
43745
43765
  """
43746
43766
  enum RepositoryRuleType {
43767
+ """
43768
+ Authorization
43769
+ """
43770
+ AUTHORIZATION
43771
+
43747
43772
  """
43748
43773
  Branch name pattern
43749
43774
  """
@@ -43775,7 +43800,32 @@ enum RepositoryRuleType {
43775
43800
  DELETION
43776
43801
 
43777
43802
  """
43778
- Prevent users with push access from force pushing to branches.
43803
+ File path pattern
43804
+ """
43805
+ FILE_PATH_PATTERN
43806
+
43807
+ """
43808
+ Branch is read-only. Users cannot push to the branch.
43809
+ """
43810
+ LOCK_BRANCH
43811
+
43812
+ """
43813
+ Max ref updates
43814
+ """
43815
+ MAX_REF_UPDATES
43816
+
43817
+ """
43818
+ Merges must be performed via a merge queue.
43819
+ """
43820
+ MERGE_QUEUE
43821
+
43822
+ """
43823
+ Merge queue locked ref
43824
+ """
43825
+ MERGE_QUEUE_LOCKED_REF
43826
+
43827
+ """
43828
+ Prevent users with push access from force pushing to refs.
43779
43829
  """
43780
43830
  NON_FAST_FORWARD
43781
43831
 
@@ -43785,29 +43835,55 @@ enum RepositoryRuleType {
43785
43835
  PULL_REQUEST
43786
43836
 
43787
43837
  """
43788
- Choose which environments must be successfully deployed to before branches can
43789
- be merged into a branch that matches this rule.
43838
+ Choose which environments must be successfully deployed to before refs can be merged into a branch that matches this rule.
43790
43839
  """
43791
43840
  REQUIRED_DEPLOYMENTS
43792
43841
 
43793
43842
  """
43794
- Prevent merge commits from being pushed to matching branches.
43843
+ Prevent merge commits from being pushed to matching refs.
43795
43844
  """
43796
43845
  REQUIRED_LINEAR_HISTORY
43797
43846
 
43798
43847
  """
43799
- Commits pushed to matching branches must have verified signatures.
43848
+ When enabled, all conversations on code must be resolved before a pull request
43849
+ can be merged into a branch that matches this rule.
43850
+ """
43851
+ REQUIRED_REVIEW_THREAD_RESOLUTION
43852
+
43853
+ """
43854
+ Commits pushed to matching refs must have verified signatures.
43800
43855
  """
43801
43856
  REQUIRED_SIGNATURES
43802
43857
 
43803
43858
  """
43804
43859
  Choose which status checks must pass before branches can be merged into a
43805
43860
  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.
43861
+ another branch, then merged or pushed directly to a ref that matches this rule
43862
+ after status checks have passed.
43808
43863
  """
43809
43864
  REQUIRED_STATUS_CHECKS
43810
43865
 
43866
+ """
43867
+ Require all commits be made to a non-target branch and submitted via a pull
43868
+ request and required workflow checks to pass before they can be merged.
43869
+ """
43870
+ REQUIRED_WORKFLOW_STATUS_CHECKS
43871
+
43872
+ """
43873
+ Commits pushed to matching refs must have verified signatures.
43874
+ """
43875
+ RULESET_REQUIRED_SIGNATURES
43876
+
43877
+ """
43878
+ Secret scanning
43879
+ """
43880
+ SECRET_SCANNING
43881
+
43882
+ """
43883
+ Tag
43884
+ """
43885
+ TAG
43886
+
43811
43887
  """
43812
43888
  Tag name pattern
43813
43889
  """
@@ -43817,6 +43893,16 @@ enum RepositoryRuleType {
43817
43893
  Only allow users with bypass permission to update matching refs.
43818
43894
  """
43819
43895
  UPDATE
43896
+
43897
+ """
43898
+ Require all changes made to a targeted branch to pass the specified workflows before they can be merged.
43899
+ """
43900
+ WORKFLOWS
43901
+
43902
+ """
43903
+ Workflow files cannot be modified.
43904
+ """
43905
+ WORKFLOW_UPDATES
43820
43906
  }
43821
43907
 
43822
43908
  """
@@ -44708,8 +44794,7 @@ interface RequirableByPullRequest {
44708
44794
  }
44709
44795
 
44710
44796
  """
44711
- Choose which environments must be successfully deployed to before branches can
44712
- be merged into a branch that matches this rule.
44797
+ Choose which environments must be successfully deployed to before refs can be merged into a branch that matches this rule.
44713
44798
  """
44714
44799
  type RequiredDeploymentsParameters {
44715
44800
  """
@@ -44719,8 +44804,7 @@ type RequiredDeploymentsParameters {
44719
44804
  }
44720
44805
 
44721
44806
  """
44722
- Choose which environments must be successfully deployed to before branches can
44723
- be merged into a branch that matches this rule.
44807
+ Choose which environments must be successfully deployed to before refs can be merged into a branch that matches this rule.
44724
44808
  """
44725
44809
  input RequiredDeploymentsParametersInput {
44726
44810
  """
@@ -44764,7 +44848,7 @@ input RequiredStatusCheckInput {
44764
44848
  """
44765
44849
  Choose which status checks must pass before branches can be merged into a branch
44766
44850
  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
44851
+ branch, then merged or pushed directly to a ref that matches this rule after
44768
44852
  status checks have passed.
44769
44853
  """
44770
44854
  type RequiredStatusChecksParameters {
@@ -44784,7 +44868,7 @@ type RequiredStatusChecksParameters {
44784
44868
  """
44785
44869
  Choose which status checks must pass before branches can be merged into a branch
44786
44870
  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
44871
+ branch, then merged or pushed directly to a ref that matches this rule after
44788
44872
  status checks have passed.
44789
44873
  """
44790
44874
  input RequiredStatusChecksParametersInput {
@@ -45378,7 +45462,7 @@ enum RuleEnforcement {
45378
45462
  """
45379
45463
  Types which can be parameters for `RepositoryRule` objects.
45380
45464
  """
45381
- union RuleParameters = BranchNamePatternParameters | CommitAuthorEmailPatternParameters | CommitMessagePatternParameters | CommitterEmailPatternParameters | PullRequestParameters | RequiredDeploymentsParameters | RequiredStatusChecksParameters | TagNamePatternParameters | UpdateParameters
45465
+ union RuleParameters = BranchNamePatternParameters | CommitAuthorEmailPatternParameters | CommitMessagePatternParameters | CommitterEmailPatternParameters | PullRequestParameters | RequiredDeploymentsParameters | RequiredStatusChecksParameters | TagNamePatternParameters | UpdateParameters | WorkflowsParameters
45382
45466
 
45383
45467
  """
45384
45468
  Specifies the parameters for a `RepositoryRule` object. Only one of the fields should be specified.
@@ -45428,6 +45512,11 @@ input RuleParametersInput {
45428
45512
  Parameters used for the `update` rule type
45429
45513
  """
45430
45514
  update: UpdateParametersInput
45515
+
45516
+ """
45517
+ Parameters used for the `workflows` rule type
45518
+ """
45519
+ workflows: WorkflowsParametersInput
45431
45520
  }
45432
45521
 
45433
45522
  """
@@ -46520,6 +46609,11 @@ enum SocialAccountProvider {
46520
46609
  """
46521
46610
  MASTODON
46522
46611
 
46612
+ """
46613
+ JavaScript package registry.
46614
+ """
46615
+ NPM
46616
+
46523
46617
  """
46524
46618
  Social news aggregation and discussion website.
46525
46619
  """
@@ -48306,7 +48400,7 @@ enum SponsorsCountryOrRegionCode {
48306
48400
  TO
48307
48401
 
48308
48402
  """
48309
- Turkey
48403
+ Türkiye
48310
48404
  """
48311
48405
  TR
48312
48406
 
@@ -54548,6 +54642,11 @@ input UpdateEnvironmentInput {
54548
54642
  """
54549
54643
  environmentId: ID!
54550
54644
 
54645
+ """
54646
+ Whether deployments to this environment can be approved by the user who created the deployment.
54647
+ """
54648
+ preventSelfReview: Boolean
54649
+
54551
54650
  """
54552
54651
  The ids of users or teams that can approve deployments to this environment
54553
54652
  """
@@ -58178,6 +58277,56 @@ type Workflow implements Node & UniformResourceLocatable {
58178
58277
  url: URI!
58179
58278
  }
58180
58279
 
58280
+ """
58281
+ A workflow that must run for this rule to pass
58282
+ """
58283
+ type WorkflowFileReference {
58284
+ """
58285
+ The path to the workflow file
58286
+ """
58287
+ path: String!
58288
+
58289
+ """
58290
+ The ref (branch or tag) of the workflow file to use
58291
+ """
58292
+ ref: String
58293
+
58294
+ """
58295
+ The ID of the repository where the workflow is defined
58296
+ """
58297
+ repositoryId: Int!
58298
+
58299
+ """
58300
+ The commit SHA of the workflow file to use
58301
+ """
58302
+ sha: String
58303
+ }
58304
+
58305
+ """
58306
+ A workflow that must run for this rule to pass
58307
+ """
58308
+ input WorkflowFileReferenceInput {
58309
+ """
58310
+ The path to the workflow file
58311
+ """
58312
+ path: String!
58313
+
58314
+ """
58315
+ The ref (branch or tag) of the workflow file to use
58316
+ """
58317
+ ref: String
58318
+
58319
+ """
58320
+ The ID of the repository where the workflow is defined
58321
+ """
58322
+ repositoryId: Int!
58323
+
58324
+ """
58325
+ The commit SHA of the workflow file to use
58326
+ """
58327
+ sha: String
58328
+ }
58329
+
58181
58330
  """
58182
58331
  A workflow run.
58183
58332
  """
@@ -58426,6 +58575,26 @@ enum WorkflowState {
58426
58575
  DISABLED_MANUALLY
58427
58576
  }
58428
58577
 
58578
+ """
58579
+ Require all changes made to a targeted branch to pass the specified workflows before they can be merged.
58580
+ """
58581
+ type WorkflowsParameters {
58582
+ """
58583
+ Workflows that must pass for this rule to pass.
58584
+ """
58585
+ workflows: [WorkflowFileReference!]!
58586
+ }
58587
+
58588
+ """
58589
+ Require all changes made to a targeted branch to pass the specified workflows before they can be merged.
58590
+ """
58591
+ input WorkflowsParametersInput {
58592
+ """
58593
+ Workflows that must pass for this rule to pass.
58594
+ """
58595
+ workflows: [WorkflowFileReferenceInput!]!
58596
+ }
58597
+
58429
58598
  """
58430
58599
  A valid x509 certificate string
58431
58600
  """
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.0",
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
+ }