diff --git a/.eslintrc b/.eslintrc index 0c9c6128d0..9696ced133 100644 --- a/.eslintrc +++ b/.eslintrc @@ -20,7 +20,8 @@ "no-param-reassign": 0, "jsx-a11y/alt-text": 2, "jsx-a11y/anchor-is-valid": 2, - "indent": ["error", 2] + "indent": ["error", 2], + "max-len": [1, 120, {tabWidth: 2, ignoreUrls: true}] }, "globals": { "atom": true, diff --git a/.github/main.workflow b/.github/main.workflow deleted file mode 100644 index f3eb7d2117..0000000000 --- a/.github/main.workflow +++ /dev/null @@ -1,42 +0,0 @@ -workflow "GraphQL schema update" { - // Every Thursday at 1am. - on = "schedule(0 1 * * 4)" - resolves = "Update schema" -} - -workflow "Core team issues" { - on = "issues" - resolves = "Add issue to release board" -} - -workflow "Core team pull requests" { - on = "pull_request" - resolves = "Add pull request to release board" -} - -action "Update schema" { - uses = "./actions/schema-up" - secrets = ["GITHUB_TOKEN"] -} - -action "Consider issue for release board" { - uses = "actions/bin/filter@master" - args = "action assigned" -} - -action "Add issue to release board" { - needs = "Consider issue for release board" - uses = "./actions/auto-sprint" - secrets = ["GITHUB_TOKEN"] -} - -action "Consider pull request for release board" { - uses = "actions/bin/filter@master" - args = "action 'opened|merged|assigned|reopened'" -} - -action "Add pull request to release board" { - needs = "Consider pull request for release board" - uses = "./actions/auto-sprint" - secrets = ["GRAPHQL_TOKEN"] -} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..7d30ce8063 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,92 @@ +name: ci +on: + pull_request: + push: + branches: + - master +jobs: + tests: + name: tests + strategy: + matrix: + os: [ubuntu-18.04, macos-latest, windows-2019] + channel: [beta, nightly] + fail-fast: false + runs-on: ${{ matrix.os }} + env: + ATOM_GITHUB_BABEL_ENV: coverage + MOCHA_TIMEOUT: 60000 + UNTIL_TIMEOUT: 30000 + steps: + - uses: actions/checkout@v1 + - name: install Atom + uses: UziTech/action-setup-atom@v1 + with: + channel: ${{ matrix.channel }} + + - name: install dependencies + run: apm ci + + - name: configure git + shell: bash + run: | + git config --global user.name Hubot + git config --global user.email hubot@github.com + + - name: Run the tests + if: ${{ !contains(matrix.os, 'windows') }} + run: atom --test test + + - name: Run the tests on Windows + if: ${{ contains(matrix.os, 'windows') }} + continue-on-error: true # due to https://github.com/atom/github/pull/2459#issuecomment-624725972 + run: atom --test test + + - name: report code coverage + shell: bash + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + SYSTEM_PULLREQUEST_PULLREQUESTNUMBER: ${{ github.event.number }} + SYSTEM_PULLREQUEST_SOURCEBRANCH: ${{ github.head_ref }} + BUILD_SOURCEBRANCH: ${{ github.event.ref }} + OS_NAME: ${{ matrix.os }} + run: | + npm run report:coverage + COVERAGE_NAME=$([[ "${OS_NAME}" == macos* ]] && echo "macOS" || echo "Linux") + bash <(curl -s https://codecov.io/bash) \ + -n "${COVERAGE_NAME}" \ + -P "${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER:-}" \ + -B "${SYSTEM_PULLREQUEST_SOURCEBRANCH:-${BUILD_SOURCEBRANCH}}" + if: | + !contains(matrix.os, 'windows') && + (success() || failure()) + lint: + name: lint + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v1 + - name: install Atom + uses: UziTech/action-setup-atom@v1 + with: + channel: nightly + - name: install dependencies + run: apm ci + - name: lint + run: npm run lint + + snapshot-tests: + name: snapshot tests + runs-on: ubuntu-18.04 + env: + ATOM_GITHUB_BABEL_ENV: coverage + ATOM_GITHUB_TEST_SUITE: snapshot + steps: + - uses: actions/checkout@v1 + - name: install Atom + uses: UziTech/action-setup-atom@v1 + with: + channel: nightly + - name: install dependencies + run: apm ci + - name: run snapshot tests + run: atom --test test/ diff --git a/.github/workflows/schedule.yml b/.github/workflows/schedule.yml new file mode 100644 index 0000000000..7eeeb88ae2 --- /dev/null +++ b/.github/workflows/schedule.yml @@ -0,0 +1,14 @@ +on: + schedule: + - cron: 0 1 * * 5 +name: GraphQL schema update +jobs: + updateSchema: + name: Update schema + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Update schema + uses: ./actions/schema-up + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 54ab8637bf..dc9d7bb021 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,7 @@ For general contributing information, see the [Atom contributing guide](https:// In particular, the GitHub package is under constant development by a portion of the core Atom team, and there is currently a clear vision for short- to medium-term features and enhancements. That doesn't mean we won't merge pull requests or fix other issues, but it *does* mean that you should consider discussing things with us first so that you don't spend time implementing things in a way that differs from the patterns we want to establish or build a feature that we're already working on. -Feel free to [open an issue](https://github.com/atom/github/issues) if you want to discuss anything with us. Depending on the scope and complexity of your proposal we may ask you to reframe it as a [Feature Request](/docs/how-we-work.md#new-features). If you're curious what we're working on and will be working on in the near future, you can take a look at [our most recent sprint project](https://github.com/atom/github/project) or [accepted Feature Requests](/docs/feature-requests/). +Feel free to [open an issue](https://github.com/atom/github/issues) if you want to discuss anything with us. Depending on the scope and complexity of your proposal we may ask you to reframe it as a [Feature Request](/docs/how-we-work.md#new-features). If you're curious what we're working on and will be working on in the near future, you can take a look at [our most recent sprint project](https://github.com/atom/github/projects) or [accepted Feature Requests](/docs/feature-requests/). ## Getting started diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index 2bc88e7f31..42d963a11d 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -20,29 +20,31 @@ Do you want to ask a question? Are you looking for support? The Atom message boa ### Description -[Description of the issue] + ### Steps to Reproduce -1. [First Step] -2. [Second Step] -3. [and so on...] +1. +2. +3. **Expected behavior:** -[What did you expect to happen?] + **Actual behavior:** -[What actually happened instead?] + **Reproduces how often:** -[What percentage of the time does this happen?] + -### Versions +### Platform and Versions -You can get this information from copy and pasting the output of `atom --version` and `apm --version` from the command line. Also, please include the OS and what version of the OS you're running. +What OS and version of OS are you running? + +What version of Atom are you using? You can get this information from copy and pasting the output of `atom --version` and `apm --version` from the command line. ### Additional Information diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index 7e2f5af7de..1be3b35bc2 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -3,7 +3,6 @@ ### Requirements * Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion. -* Suggestion: You can use checklists to keep track of progress for the sections on metrics, tests, documentation, and user research. ### Description of the Change @@ -13,70 +12,10 @@ We must be able to understand the design of your change from this description. I --> -### Screenshot/Gif +### Screenshot or Gif -### Alternate Designs - - - -### Benefits - - - -### Possible Drawbacks - - - ### Applicable Issues - - -### Metrics - - - -### Tests - - - -### Documentation - - - -### Release Notes - - - -### User Experience Research (Optional) - - - + diff --git a/README.md b/README.md index 1468dc3ee1..d7d7d2b5ce 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ -# Atom GitHub Package +##### Atom and all repositories under Atom will be archived on December 15, 2022. Learn more in our [official announcement](https://github.blog/2022-06-08-sunsetting-atom/) + # Atom GitHub Package -| Build | Code Coverage | Dependencies | -|-------|---------------|--------------| -| [![Build Status](https://dev.azure.com/atom-github/GitHub%20package%20for%20Atom/_apis/build/status/atom.github)](https://dev.azure.com/atom-github/GitHub%20package%20for%20Atom/_build/latest?definitionId=1) | [![codecov](https://codecov.io/gh/atom/github/branch/master/graph/badge.svg)](https://codecov.io/gh/atom/github) | [![Greenkeeper badge](https://badges.greenkeeper.io/atom/github.svg)](https://greenkeeper.io/) [![Dependency Status](https://david-dm.org/atom/github.svg)](https://david-dm.org/atom/github) | +| Build | Code Coverage | +|-------|---------------| +| [![Build Status](https://github.com/atom/github/workflows/ci/badge.svg)](https://github.com/atom/github/actions?query=workflow%3Aci+branch%3Amaster) | [![codecov](https://codecov.io/gh/atom/github/branch/master/graph/badge.svg)](https://codecov.io/gh/atom/github) | The Atom GitHub package provides Git and GitHub integration for Atom. Check out [github.atom.io](https://github.atom.io) for more information. diff --git a/actions/auto-sprint/package-lock.json b/actions/auto-sprint/package-lock.json index 49fe765296..1c2ecb1028 100644 --- a/actions/auto-sprint/package-lock.json +++ b/actions/auto-sprint/package-lock.json @@ -491,9 +491,9 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" }, "node-fetch": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", - "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==" + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" }, "npm-run-path": { "version": "2.0.2", diff --git a/actions/schema-up/index.js b/actions/schema-up/index.js index bb2cc2c421..14a3db1c65 100644 --- a/actions/schema-up/index.js +++ b/actions/schema-up/index.js @@ -21,7 +21,7 @@ Toolkit.run(async tools => { ); if (hasSchemaChanges === 0) { tools.log.info('No schema changes to fetch.'); - tools.exit.neutral('Nothing to do.'); + tools.exit.success('Nothing to do.'); } tools.log.info('Checking for unmerged schema update pull requests.'); @@ -39,7 +39,7 @@ Toolkit.run(async tools => { const repositoryId = openPullRequestsQuery.repository.id; if (openPullRequestsQuery.repository.pullRequests.totalCount > 0) { - tools.exit.neutral('One or more schema update pull requests are already open. Please resolve those first.'); + tools.exit.success('One or more schema update pull requests are already open. Please resolve those first.'); } const branchName = `schema-update/${Date.now()}`; @@ -65,7 +65,12 @@ Toolkit.run(async tools => { if (hasRelayChanges !== 0 && !relayFailed) { await tools.runInWorkspace('git', ['commit', '--all', '--message', ':gear: relay-compiler changes']); } - await tools.runInWorkspace('git', ['push', 'origin', branchName]); + + const actor = process.env.GITHUB_ACTOR; + const token = process.env.GITHUB_TOKEN; + const repository = process.env.GITHUB_REPOSITORY; + + await tools.runInWorkspace('git', ['push', `https://${actor}:${token}@github.com/${repository}.git`, branchName]); tools.log.info('Creating a pull request.'); diff --git a/actions/schema-up/package-lock.json b/actions/schema-up/package-lock.json index 89ff48a867..7b29ad2527 100644 --- a/actions/schema-up/package-lock.json +++ b/actions/schema-up/package-lock.json @@ -12,18 +12,18 @@ } }, "@babel/core": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.5.5.tgz", - "integrity": "sha512-i4qoSr2KTtce0DmkuuQBV4AuQgGPUcPXMr9L5MyYAtk06z068lQ10a4O009fe5OB/DfNV+h+qqT7ddNV8UnRjg==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.7.2.tgz", + "integrity": "sha512-eeD7VEZKfhK1KUXGiyPFettgF3m513f8FoBSWiQ1xTvl1RAopLs42Wp9+Ze911I6H0N9lNqJMDgoZT7gHsipeQ==", "requires": { "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.5.5", - "@babel/helpers": "^7.5.5", - "@babel/parser": "^7.5.5", - "@babel/template": "^7.4.4", - "@babel/traverse": "^7.5.5", - "@babel/types": "^7.5.5", - "convert-source-map": "^1.1.0", + "@babel/generator": "^7.7.2", + "@babel/helpers": "^7.7.0", + "@babel/parser": "^7.7.2", + "@babel/template": "^7.7.0", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.7.2", + "convert-source-map": "^1.7.0", "debug": "^4.1.0", "json5": "^2.1.0", "lodash": "^4.17.13", @@ -33,128 +33,127 @@ } }, "@babel/generator": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.5.5.tgz", - "integrity": "sha512-ETI/4vyTSxTzGnU2c49XHv2zhExkv9JHLTwDAFz85kmcwuShvYG2H08FwgIguQf4JC75CBnXAUM5PqeF4fj0nQ==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.7.2.tgz", + "integrity": "sha512-WthSArvAjYLz4TcbKOi88me+KmDJdKSlfwwN8CnUYn9jBkzhq0ZEPuBfkAWIvjJ3AdEV1Cf/+eSQTnp3IDJKlQ==", "requires": { - "@babel/types": "^7.5.5", + "@babel/types": "^7.7.2", "jsesc": "^2.5.1", "lodash": "^4.17.13", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" + "source-map": "^0.5.0" } }, "@babel/helper-annotate-as-pure": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz", - "integrity": "sha512-3UYcJUj9kvSLbLbUIfQTqzcy5VX7GRZ/CCDrnOaZorFFM01aXp1+GJwuFGV4NDDoAS+mOUyHcO6UD/RfqOks3Q==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.7.0.tgz", + "integrity": "sha512-k50CQxMlYTYo+GGyUGFwpxKVtxVJi9yh61sXZji3zYHccK9RYliZGSTOgci85T+r+0VFN2nWbGM04PIqwfrpMg==", "requires": { - "@babel/types": "^7.0.0" + "@babel/types": "^7.7.0" } }, "@babel/helper-builder-react-jsx": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.3.0.tgz", - "integrity": "sha512-MjA9KgwCuPEkQd9ncSXvSyJ5y+j2sICHyrI0M3L+6fnS4wMSNDc1ARXsbTfbb2cXHn17VisSnU/sHFTCxVxSMw==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.7.0.tgz", + "integrity": "sha512-LSln3cexwInTMYYoFeVLKnYPPMfWNJ8PubTBs3hkh7wCu9iBaqq1OOyW+xGmEdLxT1nhsl+9SJ+h2oUDYz0l2A==", "requires": { - "@babel/types": "^7.3.0", + "@babel/types": "^7.7.0", "esutils": "^2.0.0" } }, "@babel/helper-call-delegate": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.4.4.tgz", - "integrity": "sha512-l79boDFJ8S1c5hvQvG+rc+wHw6IuH7YldmRKsYtpbawsxURu/paVy57FZMomGK22/JckepaikOkY0MoAmdyOlQ==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.7.0.tgz", + "integrity": "sha512-Su0Mdq7uSSWGZayGMMQ+z6lnL00mMCnGAbO/R0ZO9odIdB/WNU/VfQKqMQU0fdIsxQYbRjDM4BixIa93SQIpvw==", "requires": { - "@babel/helper-hoist-variables": "^7.4.4", - "@babel/traverse": "^7.4.4", - "@babel/types": "^7.4.4" + "@babel/helper-hoist-variables": "^7.7.0", + "@babel/traverse": "^7.7.0", + "@babel/types": "^7.7.0" } }, "@babel/helper-create-class-features-plugin": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.5.5.tgz", - "integrity": "sha512-ZsxkyYiRA7Bg+ZTRpPvB6AbOFKTFFK4LrvTet8lInm0V468MWCaSYJE+I7v2z2r8KNLtYiV+K5kTCnR7dvyZjg==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.7.0.tgz", + "integrity": "sha512-MZiB5qvTWoyiFOgootmRSDV1udjIqJW/8lmxgzKq6oDqxdmHUjeP2ZUOmgHdYjmUVNABqRrHjYAYRvj8Eox/UA==", "requires": { - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-member-expression-to-functions": "^7.5.5", - "@babel/helper-optimise-call-expression": "^7.0.0", + "@babel/helper-function-name": "^7.7.0", + "@babel/helper-member-expression-to-functions": "^7.7.0", + "@babel/helper-optimise-call-expression": "^7.7.0", "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.5.5", - "@babel/helper-split-export-declaration": "^7.4.4" + "@babel/helper-replace-supers": "^7.7.0", + "@babel/helper-split-export-declaration": "^7.7.0" } }, "@babel/helper-define-map": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.5.5.tgz", - "integrity": "sha512-fTfxx7i0B5NJqvUOBBGREnrqbTxRh7zinBANpZXAVDlsZxYdclDp467G1sQ8VZYMnAURY3RpBUAgOYT9GfzHBg==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.7.0.tgz", + "integrity": "sha512-kPKWPb0dMpZi+ov1hJiwse9dWweZsz3V9rP4KdytnX1E7z3cTNmFGglwklzFPuqIcHLIY3bgKSs4vkwXXdflQA==", "requires": { - "@babel/helper-function-name": "^7.1.0", - "@babel/types": "^7.5.5", + "@babel/helper-function-name": "^7.7.0", + "@babel/types": "^7.7.0", "lodash": "^4.17.13" } }, "@babel/helper-function-name": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", - "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.0.tgz", + "integrity": "sha512-tDsJgMUAP00Ugv8O2aGEua5I2apkaQO7lBGUq1ocwN3G23JE5Dcq0uh3GvFTChPa4b40AWiAsLvCZOA2rdnQ7Q==", "requires": { - "@babel/helper-get-function-arity": "^7.0.0", - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0" + "@babel/helper-get-function-arity": "^7.7.0", + "@babel/template": "^7.7.0", + "@babel/types": "^7.7.0" } }, "@babel/helper-get-function-arity": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", - "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.0.tgz", + "integrity": "sha512-tLdojOTz4vWcEnHWHCuPN5P85JLZWbm5Fx5ZsMEMPhF3Uoe3O7awrbM2nQ04bDOUToH/2tH/ezKEOR8zEYzqyw==", "requires": { - "@babel/types": "^7.0.0" + "@babel/types": "^7.7.0" } }, "@babel/helper-hoist-variables": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.4.tgz", - "integrity": "sha512-VYk2/H/BnYbZDDg39hr3t2kKyifAm1W6zHRfhx8jGjIHpQEBv9dry7oQ2f3+J703TLu69nYdxsovl0XYfcnK4w==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.7.0.tgz", + "integrity": "sha512-LUe/92NqsDAkJjjCEWkNe+/PcpnisvnqdlRe19FahVapa4jndeuJ+FBiTX1rcAKWKcJGE+C3Q3tuEuxkSmCEiQ==", "requires": { - "@babel/types": "^7.4.4" + "@babel/types": "^7.7.0" } }, "@babel/helper-member-expression-to-functions": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.5.5.tgz", - "integrity": "sha512-5qZ3D1uMclSNqYcXqiHoA0meVdv+xUEex9em2fqMnrk/scphGlGgg66zjMrPJESPwrFJ6sbfFQYUSa0Mz7FabA==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.7.0.tgz", + "integrity": "sha512-QaCZLO2RtBcmvO/ekOLp8p7R5X2JriKRizeDpm5ChATAFWrrYDcDxPuCIBXKyBjY+i1vYSdcUTMIb8psfxHDPA==", "requires": { - "@babel/types": "^7.5.5" + "@babel/types": "^7.7.0" } }, "@babel/helper-module-imports": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz", - "integrity": "sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.7.0.tgz", + "integrity": "sha512-Dv3hLKIC1jyfTkClvyEkYP2OlkzNvWs5+Q8WgPbxM5LMeorons7iPP91JM+DU7tRbhqA1ZeooPaMFvQrn23RHw==", "requires": { - "@babel/types": "^7.0.0" + "@babel/types": "^7.7.0" } }, "@babel/helper-module-transforms": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.5.5.tgz", - "integrity": "sha512-jBeCvETKuJqeiaCdyaheF40aXnnU1+wkSiUs/IQg3tB85up1LyL8x77ClY8qJpuRJUcXQo+ZtdNESmZl4j56Pw==", - "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/helper-simple-access": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.4.4", - "@babel/template": "^7.4.4", - "@babel/types": "^7.5.5", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.7.0.tgz", + "integrity": "sha512-rXEefBuheUYQyX4WjV19tuknrJFwyKw0HgzRwbkyTbB+Dshlq7eqkWbyjzToLrMZk/5wKVKdWFluiAsVkHXvuQ==", + "requires": { + "@babel/helper-module-imports": "^7.7.0", + "@babel/helper-simple-access": "^7.7.0", + "@babel/helper-split-export-declaration": "^7.7.0", + "@babel/template": "^7.7.0", + "@babel/types": "^7.7.0", "lodash": "^4.17.13" } }, "@babel/helper-optimise-call-expression": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz", - "integrity": "sha512-u8nd9NQePYNQV8iPWu/pLLYBqZBa4ZaY1YWRFMuxrid94wKI1QNt67NEZ7GAe5Kc/0LLScbim05xZFWkAdrj9g==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.7.0.tgz", + "integrity": "sha512-48TeqmbazjNU/65niiiJIJRc5JozB8acui1OS7bSd6PgxfuovWsvjfWSzlgx+gPFdVveNzUdpdIg5l56Pl5jqg==", "requires": { - "@babel/types": "^7.0.0" + "@babel/types": "^7.7.0" } }, "@babel/helper-plugin-utils": { @@ -163,41 +162,41 @@ "integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==" }, "@babel/helper-replace-supers": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.5.5.tgz", - "integrity": "sha512-XvRFWrNnlsow2u7jXDuH4jDDctkxbS7gXssrP4q2nUD606ukXHRvydj346wmNg+zAgpFx4MWf4+usfC93bElJg==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.7.0.tgz", + "integrity": "sha512-5ALYEul5V8xNdxEeWvRsBzLMxQksT7MaStpxjJf9KsnLxpAKBtfw5NeMKZJSYDa0lKdOcy0g+JT/f5mPSulUgg==", "requires": { - "@babel/helper-member-expression-to-functions": "^7.5.5", - "@babel/helper-optimise-call-expression": "^7.0.0", - "@babel/traverse": "^7.5.5", - "@babel/types": "^7.5.5" + "@babel/helper-member-expression-to-functions": "^7.7.0", + "@babel/helper-optimise-call-expression": "^7.7.0", + "@babel/traverse": "^7.7.0", + "@babel/types": "^7.7.0" } }, "@babel/helper-simple-access": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz", - "integrity": "sha512-Vk+78hNjRbsiu49zAPALxTb+JUQCz1aolpd8osOF16BGnLtseD21nbHgLPGUwrXEurZgiCOUmvs3ExTu4F5x6w==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.7.0.tgz", + "integrity": "sha512-AJ7IZD7Eem3zZRuj5JtzFAptBw7pMlS3y8Qv09vaBWoFsle0d1kAn5Wq6Q9MyBXITPOKnxwkZKoAm4bopmv26g==", "requires": { - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0" + "@babel/template": "^7.7.0", + "@babel/types": "^7.7.0" } }, "@babel/helper-split-export-declaration": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", - "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.0.tgz", + "integrity": "sha512-HgYSI8rH08neWlAH3CcdkFg9qX9YsZysZI5GD8LjhQib/mM0jGOZOVkoUiiV2Hu978fRtjtsGsW6w0pKHUWtqA==", "requires": { - "@babel/types": "^7.4.4" + "@babel/types": "^7.7.0" } }, "@babel/helpers": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.5.5.tgz", - "integrity": "sha512-nRq2BUhxZFnfEn/ciJuhklHvFOqjJUD5wpx+1bxUF2axL9C+v4DE/dmp5sT2dKnpOs4orZWzpAZqlCy8QqE/7g==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.7.0.tgz", + "integrity": "sha512-VnNwL4YOhbejHb7x/b5F39Zdg5vIQpUUNzJwx0ww1EcVRt41bbGRZWhAURrfY32T5zTT3qwNOQFWpn+P0i0a2g==", "requires": { - "@babel/template": "^7.4.4", - "@babel/traverse": "^7.5.5", - "@babel/types": "^7.5.5" + "@babel/template": "^7.7.0", + "@babel/traverse": "^7.7.0", + "@babel/types": "^7.7.0" } }, "@babel/highlight": { @@ -211,23 +210,23 @@ } }, "@babel/parser": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.5.5.tgz", - "integrity": "sha512-E5BN68cqR7dhKan1SfqgPGhQ178bkVKpXTPEXnFJBrEt8/DKRZlybmy+IgYLTeN7tp1R5Ccmbm2rBk17sHYU3g==" + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.3.tgz", + "integrity": "sha512-bqv+iCo9i+uLVbI0ILzKkvMorqxouI+GbV13ivcARXn9NNEabi2IEz912IgNpT/60BNXac5dgcfjb94NjsF33A==" }, "@babel/plugin-proposal-class-properties": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.5.5.tgz", - "integrity": "sha512-AF79FsnWFxjlaosgdi421vmYG6/jg79bVD0dpD44QdgobzHKuLZ6S3vl8la9qIeSwGi8i1fS0O1mfuDAAdo1/A==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.7.0.tgz", + "integrity": "sha512-tufDcFA1Vj+eWvwHN+jvMN6QsV5o+vUlytNKrbMiCeDL0F2j92RURzUsUMWE5EJkLyWxjdUslCsMQa9FWth16A==", "requires": { - "@babel/helper-create-class-features-plugin": "^7.5.5", + "@babel/helper-create-class-features-plugin": "^7.7.0", "@babel/helper-plugin-utils": "^7.0.0" } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.5.5.tgz", - "integrity": "sha512-F2DxJJSQ7f64FyTVl5cw/9MWn6naXGdk3Q3UhDbFEEHv+EilCPoeRD3Zh/Utx1CJz4uyKlQ4uH+bJPbEhMV7Zw==", + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.6.2.tgz", + "integrity": "sha512-LDBXlmADCsMZV1Y9OQwMc0MyGZ8Ta/zlD9N67BfQT8uYwkRswiu2hU6nJKrjrt/58aH/vqfQlR/9yId/7A2gWw==", "requires": { "@babel/helper-plugin-utils": "^7.0.0", "@babel/plugin-syntax-object-rest-spread": "^7.2.0" @@ -242,9 +241,9 @@ } }, "@babel/plugin-syntax-flow": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.2.0.tgz", - "integrity": "sha512-r6YMuZDWLtLlu0kqIim5o/3TNRAlWb073HwT3e2nKf9I8IIvOggPrnILYPsrrKilmn/mYEMCf/Z07w3yQJF6dg==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.7.0.tgz", + "integrity": "sha512-vQMV07p+L+jZeUnvX3pEJ9EiXGCjB5CTTvsirFD9rpEuATnoAvLBLoYbw1v5tyn3d2XxSuvEKi8cV3KqYUa0vQ==", "requires": { "@babel/helper-plugin-utils": "^7.0.0" } @@ -282,26 +281,26 @@ } }, "@babel/plugin-transform-block-scoping": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.5.5.tgz", - "integrity": "sha512-82A3CLRRdYubkG85lKwhZB0WZoHxLGsJdux/cOVaJCJpvYFl1LVzAIFyRsa7CvXqW8rBM4Zf3Bfn8PHt5DP0Sg==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.6.3.tgz", + "integrity": "sha512-7hvrg75dubcO3ZI2rjYTzUrEuh1E9IyDEhhB6qfcooxhDA33xx2MasuLVgdxzcP6R/lipAC6n9ub9maNW6RKdw==", "requires": { "@babel/helper-plugin-utils": "^7.0.0", "lodash": "^4.17.13" } }, "@babel/plugin-transform-classes": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.5.5.tgz", - "integrity": "sha512-U2htCNK/6e9K7jGyJ++1p5XRU+LJjrwtoiVn9SzRlDT2KubcZ11OOwy3s24TjHxPgxNwonCYP7U2K51uVYCMDg==", - "requires": { - "@babel/helper-annotate-as-pure": "^7.0.0", - "@babel/helper-define-map": "^7.5.5", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-optimise-call-expression": "^7.0.0", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.7.0.tgz", + "integrity": "sha512-/b3cKIZwGeUesZheU9jNYcwrEA7f/Bo4IdPmvp7oHgvks2majB5BoT5byAql44fiNQYOPzhk2w8DbgfuafkMoA==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.7.0", + "@babel/helper-define-map": "^7.7.0", + "@babel/helper-function-name": "^7.7.0", + "@babel/helper-optimise-call-expression": "^7.7.0", "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.5.5", - "@babel/helper-split-export-declaration": "^7.4.4", + "@babel/helper-replace-supers": "^7.7.0", + "@babel/helper-split-export-declaration": "^7.7.0", "globals": "^11.1.0" } }, @@ -314,17 +313,17 @@ } }, "@babel/plugin-transform-destructuring": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.5.0.tgz", - "integrity": "sha512-YbYgbd3TryYYLGyC7ZR+Tq8H/+bCmwoaxHfJHupom5ECstzbRLTch6gOQbhEY9Z4hiCNHEURgq06ykFv9JZ/QQ==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.6.0.tgz", + "integrity": "sha512-2bGIS5P1v4+sWTCnKNDZDxbGvEqi0ijeqM/YqHtVGrvG2y0ySgnEEhXErvE9dA0bnIzY9bIzdFK0jFA46ASIIQ==", "requires": { "@babel/helper-plugin-utils": "^7.0.0" } }, "@babel/plugin-transform-flow-strip-types": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.4.4.tgz", - "integrity": "sha512-WyVedfeEIILYEaWGAUWzVNyqG4sfsNooMhXWsu/YzOvVGcsnPb5PguysjJqI3t3qiaYj0BR8T2f5njdjTGe44Q==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.6.3.tgz", + "integrity": "sha512-l0ETkyEofkqFJ9LS6HChNIKtVJw2ylKbhYMlJ5C6df+ldxxaLIyXY4yOdDQQspfFpV8/vDiaWoJlvflstlYNxg==", "requires": { "@babel/helper-plugin-utils": "^7.0.0", "@babel/plugin-syntax-flow": "^7.2.0" @@ -339,11 +338,11 @@ } }, "@babel/plugin-transform-function-name": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.4.4.tgz", - "integrity": "sha512-iU9pv7U+2jC9ANQkKeNF6DrPy4GBa4NWQtl6dHB4Pb3izX2JOEvDTFarlNsBj/63ZEzNNIAMs3Qw4fNCcSOXJA==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.7.0.tgz", + "integrity": "sha512-P5HKu0d9+CzZxP5jcrWdpe7ZlFDe24bmqP6a6X8BHEBl/eizAsY8K6LX8LASZL0Jxdjm5eEfzp+FIrxCm/p8bA==", "requires": { - "@babel/helper-function-name": "^7.1.0", + "@babel/helper-function-name": "^7.7.0", "@babel/helper-plugin-utils": "^7.0.0" } }, @@ -364,13 +363,13 @@ } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.5.0.tgz", - "integrity": "sha512-xmHq0B+ytyrWJvQTc5OWAC4ii6Dhr0s22STOoydokG51JjWhyYo5mRPXoi+ZmtHQhZZwuXNN+GG5jy5UZZJxIQ==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.7.0.tgz", + "integrity": "sha512-KEMyWNNWnjOom8vR/1+d+Ocz/mILZG/eyHHO06OuBQ2aNhxT62fr4y6fGOplRx+CxCSp3IFwesL8WdINfY/3kg==", "requires": { - "@babel/helper-module-transforms": "^7.4.4", + "@babel/helper-module-transforms": "^7.7.0", "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-simple-access": "^7.1.0", + "@babel/helper-simple-access": "^7.7.0", "babel-plugin-dynamic-import-node": "^2.3.0" } }, @@ -410,11 +409,11 @@ } }, "@babel/plugin-transform-react-jsx": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.3.0.tgz", - "integrity": "sha512-a/+aRb7R06WcKvQLOu4/TpjKOdvVEKRLWFpKcNuHhiREPgGRB4TQJxq07+EZLS8LFVYpfq1a5lDUnuMdcCpBKg==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.7.0.tgz", + "integrity": "sha512-mXhBtyVB1Ujfy+0L6934jeJcSXj/VCg6whZzEcgiiZHNS0PGC7vUCsZDQCxxztkpIdF+dY1fUMcjAgEOC3ZOMQ==", "requires": { - "@babel/helper-builder-react-jsx": "^7.3.0", + "@babel/helper-builder-react-jsx": "^7.7.0", "@babel/helper-plugin-utils": "^7.0.0", "@babel/plugin-syntax-jsx": "^7.2.0" } @@ -428,9 +427,9 @@ } }, "@babel/plugin-transform-spread": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.2.tgz", - "integrity": "sha512-KWfky/58vubwtS0hLqEnrWJjsMGaOeSBn90Ezn5Jeg9Z8KKHmELbP1yGylMlm5N6TPKeY9A2+UaSYLdxahg01w==", + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.6.2.tgz", + "integrity": "sha512-DpSvPFryKdK1x+EDJYCy28nmAaIMdxmhot62jAXF/o99iA33Zj2Lmcp3vDmz+MUh0LNYVPvfj5iC3feb3/+PFg==", "requires": { "@babel/helper-plugin-utils": "^7.0.0" } @@ -444,53 +443,44 @@ "@babel/helper-plugin-utils": "^7.0.0" } }, - "@babel/polyfill": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.4.4.tgz", - "integrity": "sha512-WlthFLfhQQhh+A2Gn5NSFl0Huxz36x86Jn+E9OW7ibK8edKPq+KLy4apM1yDpQ8kJOVi1OVjpP4vSDLdrI04dg==", - "requires": { - "core-js": "^2.6.5", - "regenerator-runtime": "^0.13.2" - } - }, "@babel/runtime": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.5.5.tgz", - "integrity": "sha512-28QvEGyQyNkB0/m2B4FU7IEZGK2NUrcMtT6BZEFALTguLk+AUT6ofsHtPk5QyjAdUkpMJ+/Em+quwz4HOt30AQ==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.7.2.tgz", + "integrity": "sha512-JONRbXbTXc9WQE2mAZd1p0Z3DZ/6vaQIkgYMSTP3KjRCyd7rCZCcfhCyX+YjwcKxcZ82UrxbRD358bpExNgrjw==", "requires": { "regenerator-runtime": "^0.13.2" } }, "@babel/template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.4.tgz", - "integrity": "sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.0.tgz", + "integrity": "sha512-OKcwSYOW1mhWbnTBgQY5lvg1Fxg+VyfQGjcBduZFljfc044J5iDlnDSfhQ867O17XHiSCxYHUxHg2b7ryitbUQ==", "requires": { "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.4.4", - "@babel/types": "^7.4.4" + "@babel/parser": "^7.7.0", + "@babel/types": "^7.7.0" } }, "@babel/traverse": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.5.5.tgz", - "integrity": "sha512-MqB0782whsfffYfSjH4TM+LMjrJnhCNEDMDIjeTpl+ASaUvxcjoiVCo/sM1GhS1pHOXYfWVCYneLjMckuUxDaQ==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.7.2.tgz", + "integrity": "sha512-TM01cXib2+rgIZrGJOLaHV/iZUAxf4A0dt5auY6KNZ+cm6aschuJGqKJM3ROTt3raPUdIDk9siAufIFEleRwtw==", "requires": { "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.5.5", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.4.4", - "@babel/parser": "^7.5.5", - "@babel/types": "^7.5.5", + "@babel/generator": "^7.7.2", + "@babel/helper-function-name": "^7.7.0", + "@babel/helper-split-export-declaration": "^7.7.0", + "@babel/parser": "^7.7.2", + "@babel/types": "^7.7.2", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.13" } }, "@babel/types": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.5.5.tgz", - "integrity": "sha512-s63F9nJioLqOlW3UkyMd+BYhXt44YuaFm/VV0VwuteqjYwRrObkU7ra9pY4wAJR3oXi8hJrMcrcJdO/HH33vtw==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.2.tgz", + "integrity": "sha512-YTf6PXoh3+eZgRCBzzP25Bugd2ngmpQVrk7kXX0i5N9BO7TFBtIgZYs7WtxtOGs8e6A4ZI7ECkbBCEHeXocvOA==", "requires": { "esutils": "^2.0.2", "lodash": "^4.17.13", @@ -512,14 +502,13 @@ "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==" }, "@octokit/endpoint": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-5.3.1.tgz", - "integrity": "sha512-4mKqSQfeTRFpQMUGIUG1ewdQT64b2YpvjG2dE1x7nhQupdI/AjdgdcIsmPtRFEXlih/uLQLRWJL4FrivpQdC7A==", + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-5.5.1.tgz", + "integrity": "sha512-nBFhRUb5YzVTCX/iAK1MgQ4uWo89Gu0TH00qQHoYRCsE12dWcG1OiLd7v2EIo2+tpUKPMOQ62QFy9hy9Vg2ULg==", "requires": { - "deepmerge": "4.0.0", + "@octokit/types": "^2.0.0", "is-plain-object": "^3.0.0", - "universal-user-agent": "^3.0.0", - "url-template": "^2.0.8" + "universal-user-agent": "^4.0.0" }, "dependencies": { "is-plain-object": { @@ -536,11 +525,11 @@ "integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA==" }, "universal-user-agent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-3.0.0.tgz", - "integrity": "sha512-T3siHThqoj5X0benA5H0qcDnrKGXzU8TKoX15x/tQHw1hQBvIEBHjxQ2klizYsqBOO/Q+WuxoQUihadeeqDnoA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.0.tgz", + "integrity": "sha512-eM8knLpev67iBDizr/YtqkJsF3GK8gzDc6st/WKzrTuPtcsOKW/0IdL4cnMBsU69pOx0otavLWBDGTwg+dB0aA==", "requires": { - "os-name": "^3.0.0" + "os-name": "^3.1.0" } } } @@ -555,17 +544,18 @@ } }, "@octokit/request": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.0.1.tgz", - "integrity": "sha512-SHOk/APYpfrzV1RNf7Ux8SZi+vZXhMIB2dBr4TQR6ExMX8R4jcy/0gHw26HLe1dWV7Wxe9WzYyDSEC0XwnoCSQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.3.1.tgz", + "integrity": "sha512-5/X0AL1ZgoU32fAepTfEoggFinO3rxsMLtzhlUX+RctLrusn/CApJuGFCd0v7GMFhF+8UiCsTTfsu7Fh1HnEJg==", "requires": { - "@octokit/endpoint": "^5.1.0", + "@octokit/endpoint": "^5.5.0", "@octokit/request-error": "^1.0.1", + "@octokit/types": "^2.0.0", "deprecation": "^2.0.0", "is-plain-object": "^3.0.0", "node-fetch": "^2.3.0", "once": "^1.4.0", - "universal-user-agent": "^3.0.0" + "universal-user-agent": "^4.0.0" }, "dependencies": { "is-plain-object": { @@ -582,30 +572,31 @@ "integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA==" }, "universal-user-agent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-3.0.0.tgz", - "integrity": "sha512-T3siHThqoj5X0benA5H0qcDnrKGXzU8TKoX15x/tQHw1hQBvIEBHjxQ2klizYsqBOO/Q+WuxoQUihadeeqDnoA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.0.tgz", + "integrity": "sha512-eM8knLpev67iBDizr/YtqkJsF3GK8gzDc6st/WKzrTuPtcsOKW/0IdL4cnMBsU69pOx0otavLWBDGTwg+dB0aA==", "requires": { - "os-name": "^3.0.0" + "os-name": "^3.1.0" } } } }, "@octokit/request-error": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-1.0.4.tgz", - "integrity": "sha512-L4JaJDXn8SGT+5G0uX79rZLv0MNJmfGa4vb4vy1NnpjSnWDLJRy6m90udGwvMmavwsStgbv2QNkPzzTCMmL+ig==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-1.2.0.tgz", + "integrity": "sha512-DNBhROBYjjV/I9n7A8kVkmQNkqFAMem90dSxqvPq57e2hBr7mNTX98y3R2zDpqMQHVRpBDjsvsfIGgBzy+4PAg==", "requires": { + "@octokit/types": "^2.0.0", "deprecation": "^2.0.0", "once": "^1.4.0" } }, "@octokit/rest": { - "version": "16.28.5", - "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-16.28.5.tgz", - "integrity": "sha512-W8hHSm6103c+lNdTuQBMKdZNDCOFFXJdatj92g2d6Hqk134EMDHRc02QWI/Fs1WGnWZ8Leb0QFbXPKO2njeevQ==", + "version": "16.34.1", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-16.34.1.tgz", + "integrity": "sha512-JUoS12cdktf1fv86rgrjC/RvYLuL+o7p57W7zX1x7ANFJ7OvdV8emvUNkFlcidEaOkYrxK3SoWgQFt3FhNmabA==", "requires": { - "@octokit/request": "^5.0.0", + "@octokit/request": "^5.2.0", "@octokit/request-error": "^1.0.2", "atob-lite": "^2.0.0", "before-after-hook": "^2.0.0", @@ -616,20 +607,27 @@ "lodash.uniq": "^4.5.0", "octokit-pagination-methods": "^1.1.0", "once": "^1.4.0", - "universal-user-agent": "^3.0.0", - "url-template": "^2.0.8" + "universal-user-agent": "^4.0.0" }, "dependencies": { "universal-user-agent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-3.0.0.tgz", - "integrity": "sha512-T3siHThqoj5X0benA5H0qcDnrKGXzU8TKoX15x/tQHw1hQBvIEBHjxQ2klizYsqBOO/Q+WuxoQUihadeeqDnoA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.0.tgz", + "integrity": "sha512-eM8knLpev67iBDizr/YtqkJsF3GK8gzDc6st/WKzrTuPtcsOKW/0IdL4cnMBsU69pOx0otavLWBDGTwg+dB0aA==", "requires": { - "os-name": "^3.0.0" + "os-name": "^3.1.0" } } } }, + "@octokit/types": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.0.1.tgz", + "integrity": "sha512-YDYgV6nCzdGdOm7wy43Ce8SQ3M5DMKegB8E5sTB/1xrxOdo2yS/KgUgML2N2ZGD621mkbdrAglwTyA4NDOlFFA==", + "requires": { + "@types/node": ">= 8" + } + }, "@types/execa": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/@types/execa/-/execa-0.9.0.tgz", @@ -649,9 +647,9 @@ "integrity": "sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=" }, "@types/node": { - "version": "12.6.8", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.6.8.tgz", - "integrity": "sha512-aX+gFgA5GHcDi89KG5keey2zf0WfZk/HAQotEamsK2kbey+8yGKcson0hbK8E+v0NArlCJQCqMP161YhV6ZXLg==" + "version": "12.12.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.6.tgz", + "integrity": "sha512-FjsYUPzEJdGXjwKqSpE0/9QEh6kzhTAeObA54rn6j3rR4C/mzpI9L0KNfoeASSPMMdxIsoJuCLDWcM/rVjIsSA==" }, "@types/signale": { "version": "1.2.1", @@ -662,9 +660,9 @@ } }, "actions-toolkit": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/actions-toolkit/-/actions-toolkit-2.1.0.tgz", - "integrity": "sha512-279cx0l9uTKzBvwDzvlPPPqI5ql4vkOrn6otZAnMIYF6llGMoDn7/HPf9RMjjbV9AKVDuDcNpRoNJ0JoYT2bOQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/actions-toolkit/-/actions-toolkit-2.2.0.tgz", + "integrity": "sha512-g/GM9weEKb8DWvjVyrOnX+eroehJj3bocxxJtOlqWY2vhCzezqn91m736xQOfNNzU6GCepoJfIGiPycec1EIxA==", "requires": { "@octokit/graphql": "^2.0.1", "@octokit/rest": "^16.15.0", @@ -760,9 +758,9 @@ "integrity": "sha512-Xj9XuRuz3nTSbaTXWv3itLOcxyF4oPD8douBBmj7U9BBC6nEBYfyOJYQMf/8PJAFotC62UY5dFfIGEPr7WswzQ==" }, "babel-preset-fbjs": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/babel-preset-fbjs/-/babel-preset-fbjs-3.2.0.tgz", - "integrity": "sha512-5Jo+JeWiVz2wHUUyAlvb/sSYnXNig9r+HqGAOSfh5Fzxp7SnAaR/tEGRJ1ZX7C77kfk82658w6R5Z+uPATTD9g==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/babel-preset-fbjs/-/babel-preset-fbjs-3.3.0.tgz", + "integrity": "sha512-7QTLTCd2gwB2qGoi5epSULMHugSVgpcVt5YAeiFO9ABLrutDQzKfGwzxgZHLpugq8qMdg/DhRZDZ5CLKxBkEbw==", "requires": { "@babel/plugin-proposal-class-properties": "^7.0.0", "@babel/plugin-proposal-object-rest-spread": "^7.0.0", @@ -890,9 +888,9 @@ } }, "bser": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.0.tgz", - "integrity": "sha512-8zsjWrQkkBoLK6uxASk1nJ2SKv97ltiGDo6A3wA0/yRPz+CwmEyDo0hUrhIuukG2JHpAl3bvFIixw2/3Hi0DOg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", "requires": { "node-int64": "^0.4.0" } @@ -1019,9 +1017,9 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "convert-source-map": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", - "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", "requires": { "safe-buffer": "~5.1.1" } @@ -1032,9 +1030,9 @@ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" }, "core-js": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.9.tgz", - "integrity": "sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==" + "version": "2.6.10", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.10.tgz", + "integrity": "sha512-I39t74+4t+zau64EN1fE5v2W31Adtc/REhzWN+gWRRXg6WH5qAsZm62DHpQ1+Yhe4047T55jvzz7MUqF/dBBlA==" }, "cross-spawn": { "version": "6.0.5", @@ -1066,11 +1064,6 @@ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" }, - "deepmerge": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.0.0.tgz", - "integrity": "sha512-YZ1rOP5+kHor4hMAH+HRQnBQHg+wvS1un1hAOuIcxcBy0hzcUf6Jg2a1w65kpoOUnurOfZbERwjI1TfZxNjcww==" - }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -1130,17 +1123,17 @@ } }, "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "requires": { "once": "^1.4.0" } }, "enquirer": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.1.tgz", - "integrity": "sha512-7slmHsJY+mvnIrzD0Z0FfTFLmVJuIzRNCW72X9s35BshOoC+MI4jLJ8aPyAC/BelAirXBZB+Mu1wSqP0wpW4Kg==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.2.tgz", + "integrity": "sha512-PLhTMPUXlnaIv9D3Cq3/Zr1xb7soeDDgunobyCmYLUG19n24dvC8i+ZZgm2DekGpDnx7JvFSHV7lxfM58PMtbA==", "requires": { "ansi-colors": "^3.2.1" } @@ -1164,9 +1157,9 @@ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" }, "execa": { "version": "1.0.0", @@ -1440,9 +1433,9 @@ "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" }, "glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -1487,9 +1480,9 @@ "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==" }, "graphql": { - "version": "14.4.2", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.4.2.tgz", - "integrity": "sha512-6uQadiRgnpnSS56hdZUSvFrVcQ6OF9y6wkxJfKquFtHlnl7+KSuWwSJsdwiK1vybm1HgcdbpGkCpvhvsVQ0UZQ==", + "version": "14.5.8", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.5.8.tgz", + "integrity": "sha512-MMwmi0zlVLQKLdGiMfWkgQD7dY/TUKt4L+zgJ/aR0Howebod3aNgP5JkgvAULiR2HPVZaP2VEElqtdidHweLkg==", "requires": { "iterall": "^1.2.2" } @@ -1534,9 +1527,9 @@ } }, "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==" + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz", + "integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==" }, "iconv-lite": { "version": "0.4.24", @@ -1760,9 +1753,9 @@ "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" }, "json5": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", - "integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.1.tgz", + "integrity": "sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ==", "requires": { "minimist": "^1.2.0" } @@ -1801,9 +1794,9 @@ } }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" }, "lodash.get": { "version": "4.4.2", @@ -1864,9 +1857,9 @@ } }, "merge2": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.3.tgz", - "integrity": "sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA==" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.3.0.tgz", + "integrity": "sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw==" }, "micromatch": { "version": "3.1.10", @@ -1969,9 +1962,9 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" }, "node-fetch": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", - "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==" + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" }, "node-int64": { "version": "0.4.0", @@ -2316,33 +2309,32 @@ } }, "relay-compiler": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/relay-compiler/-/relay-compiler-5.0.0.tgz", - "integrity": "sha512-q8gKlPRTJe/TwtIokbdXehy1SxDFIyLBZdsfg60J4OcqyviIx++Vhc+h4lXzBY8LsBVaJjTuolftYcXJLhlE6g==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/relay-compiler/-/relay-compiler-7.1.0.tgz", + "integrity": "sha512-8SisbLejjob1CYI9uQP7wxtsWvT+cvbx1iFDgP5U360UBukOGWLehfmn33lygY0LYqnfMShgvL1n7lrqoohs5A==", "requires": { "@babel/core": "^7.0.0", "@babel/generator": "^7.0.0", "@babel/parser": "^7.0.0", - "@babel/polyfill": "^7.0.0", "@babel/runtime": "^7.0.0", "@babel/traverse": "^7.0.0", "@babel/types": "^7.0.0", - "babel-preset-fbjs": "^3.1.2", + "babel-preset-fbjs": "^3.3.0", "chalk": "^2.4.1", "fast-glob": "^2.2.2", "fb-watchman": "^2.0.0", "fbjs": "^1.0.0", "immutable": "~3.7.6", - "nullthrows": "^1.1.0", - "relay-runtime": "5.0.0", + "nullthrows": "^1.1.1", + "relay-runtime": "7.1.0", "signedsource": "^1.0.0", "yargs": "^9.0.0" } }, "relay-runtime": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/relay-runtime/-/relay-runtime-5.0.0.tgz", - "integrity": "sha512-lrC2CwfpWWHBAN608eENAt5Bc5zqXXE2O9HSo8tc6Gy5TxfK+fU+x9jdwXQ2mXxVPgANYtYeKzU5UTfcX0aDEw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/relay-runtime/-/relay-runtime-7.1.0.tgz", + "integrity": "sha512-19WV0dC4rcbXnVBKEA4ZL41ccfJRUZ7/KKfQsgc9SwjqCi2g3+yYIR9wJ4KoC+rEfG2yN3W1vWBEqr+igH/rzA==", "requires": { "@babel/runtime": "^7.0.0", "fbjs": "^1.0.0" @@ -2369,9 +2361,9 @@ "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" }, "resolve": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz", - "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz", + "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==", "requires": { "path-parse": "^1.0.6" } @@ -2771,11 +2763,6 @@ "repeat-string": "^1.6.1" } }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" - }, "ua-parser-js": { "version": "0.7.20", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.20.tgz", @@ -2841,11 +2828,6 @@ "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" }, - "url-template": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/url-template/-/url-template-2.0.8.tgz", - "integrity": "sha1-/FZaPMy/93MMd19WQflVV5FDnyE=" - }, "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", diff --git a/actions/schema-up/package.json b/actions/schema-up/package.json index dcaa381103..1fed2b084b 100644 --- a/actions/schema-up/package.json +++ b/actions/schema-up/package.json @@ -6,9 +6,9 @@ "start": "node ./index.js" }, "dependencies": { - "actions-toolkit": "2.1.0", - "graphql": "14.4.2", - "node-fetch": "2.6.0", - "relay-compiler": "5.0.0" + "actions-toolkit": "2.2.0", + "graphql": "14.5.8", + "node-fetch": "2.6.1", + "relay-compiler": "7.1.0" } } diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index f32faac8d2..0000000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,204 +0,0 @@ -trigger: - branches: - include: - - master - - '*-releases' -pr: - branches: - include: - - '*' - -jobs: -- job: Linux - pool: - vmImage: ubuntu-16.04 - variables: - display: ":99" - atom_channel: dev - atom_name: atom-dev - steps: - - template: script/azure-pipelines/linux-install.yml - parameters: - atom_channel: $(atom_channel) - atom_name: $(atom_name) - - bash: | - "/tmp/atom/usr/bin/${ATOM_NAME}" --test test/ - displayName: run tests - env: - TEST_JUNIT_XML_PATH: $(Agent.HomeDirectory)/test-results.xml - ATOM_GITHUB_BABEL_ENV: coverage - FORCE_COLOR: 0 - MOCHA_TIMEOUT: 60000 - UNTIL_TIMEOUT: 30000 - - task: PublishTestResults@2 - inputs: - testResultsFormat: JUnit - testResultsFiles: $(Agent.HomeDirectory)/test-results.xml - testRunTitle: Linux $(atom_channel) - condition: succeededOrFailed() - - bash: npm run report:coverage - displayName: generate code coverage reports - condition: succeededOrFailed() - - bash: > - bash <(curl -s https://codecov.io/bash) - -n "Linux $(atom_channel)" - -P "${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER:-}" - -B "${SYSTEM_PULLREQUEST_SOURCEBRANCH:-${BUILD_SOURCEBRANCH}}" - displayName: publish code coverage to CodeCov - env: - CODECOV_TOKEN: $(codecov.token) - condition: succeededOrFailed() - - task: PublishCodeCoverageResults@1 - inputs: - codeCoverageTool: cobertura - summaryFileLocation: $(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml - reportDirectory: $(System.DefaultworkingDirectory)/coverage/ - condition: succeededOrFailed() - -- job: MacOS - pool: - vmImage: macos-10.13 - variables: - atom_channel: dev - atom_app: Atom Dev.app - steps: - - template: script/azure-pipelines/macos-install.yml - parameters: - atom_channel: $(atom_channel) - atom_app: $(atom_app) - - bash: | - "/tmp/atom/${ATOM_APP}/Contents/Resources/app/atom.sh" --test test/ - displayName: run tests - env: - TEST_JUNIT_XML_PATH: $(Agent.HomeDirectory)/test-results.xml - ATOM_GITHUB_BABEL_ENV: coverage - FORCE_COLOR: 0 - MOCHA_TIMEOUT: 60000 - UNTIL_TIMEOUT: 30000 - - task: PublishTestResults@2 - inputs: - testResultsFormat: JUnit - testResultsFiles: $(Agent.HomeDirectory)/test-results.xml - testRunTitle: MacOS $(atom_channel) - condition: succeededOrFailed() - - bash: npm run report:coverage - displayName: generate code coverage reports - condition: succeededOrFailed() - - bash: > - bash <(curl -s https://codecov.io/bash) - -n "MacOS $(atom_channel)" - -P "${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER:-}" - -B "${SYSTEM_PULLREQUEST_SOURCEBRANCH:-${BUILD_SOURCEBRANCH}}" - displayName: publish code coverage to CodeCov - env: - CODECOV_TOKEN: $(codecov.token) - condition: succeededOrFailed() - - task: PublishCodeCoverageResults@1 - inputs: - codeCoverageTool: cobertura - summaryFileLocation: $(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml - reportDirectory: $(System.DefaultworkingDirectory)/coverage/ - condition: succeededOrFailed() - -- job: Windows - pool: - vmImage: vs2015-win2012r2 - variables: - atom_channel: dev - atom_directory: Atom Dev - steps: - - template: script/azure-pipelines/windows-install.yml - parameters: - atom_channel: $(atom_channel) - atom_directory: $(atom_directory) - - powershell: | - Set-StrictMode -Version Latest - $script:ATOMROOT = "$env:AGENT_HOMEDIRECTORY/atom" - $script:ATOM_SCRIPT_PATH = "$script:ATOMROOT\$env:ATOM_DIRECTORY\resources\cli\atom.cmd" - - # Normalize %TEMP% as a long (non 8.3) path. - $env:TEMP = (Get-Item -LiteralPath $env:TEMP).FullName - - $env:ELECTRON_NO_ATTACH_CONSOLE = "true" - [Environment]::SetEnvironmentVariable("ELECTRON_NO_ATTACH_CONSOLE", "true", "User") - $env:ELECTRON_ENABLE_LOGGING = "YES" - [Environment]::SetEnvironmentVariable("ELECTRON_ENABLE_LOGGING", "YES", "User") - - Write-Host "Running tests" - & "$script:ATOM_SCRIPT_PATH" --test test 2>&1 | %{ "$_" } - - if ($LASTEXITCODE -ne 0) { - Write-Host "Specs Failed" - $host.SetShouldExit($LASTEXITCODE) - exit - } - displayName: run tests - env: - TEST_JUNIT_XML_PATH: $(Agent.HomeDirectory)/test-results.xml - ATOM_GITHUB_BABEL_ENV: coverage - ATOM_GITHUB_SKIP_SYMLINKS: 1 - FORCE_COLOR: 0 - MOCHA_TIMEOUT: 60000 - UNTIL_TIMEOUT: 30000 - - task: PublishTestResults@2 - inputs: - testResultsFormat: JUnit - testResultsFiles: $(Agent.HomeDirectory)/test-results.xmlq - testRunTitle: Windows $(atom_channel) - condition: succeededOrFailed() - - powershell: npm run report:coverage - displayName: generate code coverage reports - condition: succeededOrFailed() - - bash: > - bash <(curl -s https://codecov.io/bash) - -n "Windows $(atom_channel)" - -P "${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER:-}" - -B "${SYSTEM_PULLREQUEST_SOURCEBRANCH:-${BUILD_SOURCEBRANCH}}" - displayName: publish code coverage to CodeCov - env: - CODECOV_TOKEN: $(codecov.token) - condition: succeededOrFailed() - - task: PublishCodeCoverageResults@1 - inputs: - codeCoverageTool: cobertura - summaryFileLocation: $(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml - reportDirectory: $(System.DefaultworkingDirectory)/coverage/ - condition: succeededOrFailed() - -- job: Lint - pool: - vmImage: ubuntu-16.04 - variables: - display: ":99" - atom_channel: dev - steps: - - template: script/azure-pipelines/linux-install.yml - parameters: - atom_channel: $(atom_channel) - atom_name: atom-dev - - bash: /tmp/atom/usr/share/atom-dev/resources/app/apm/node_modules/.bin/npm run lint - displayName: run the linter - -- job: Snapshot - pool: - vmImage: ubuntu-16.04 - variables: - display: ":99" - atom_channel: dev - steps: - - template: script/azure-pipelines/linux-install.yml - parameters: - atom_channel: $(atom_channel) - atom_name: atom-dev - - bash: /tmp/atom/usr/bin/atom-dev --test test/ - displayName: run tests - env: - ATOM_GITHUB_TEST_SUITE: snapshot - TEST_JUNIT_XML_PATH: $(Agent.HomeDirectory)/test-results.xml - FORCE_COLOR: 0 - - task: PublishTestResults@2 - inputs: - testResultsFormat: JUnit - testResultsFiles: $(Agent.HomeDirectory)/test-results.xml - testRunTitle: Snapshot - condition: succeededOrFailed() diff --git a/bin/git-askpass-atom.js b/bin/git-askpass-atom.js index 8b56b676cf..66fd0ef2b4 100755 --- a/bin/git-askpass-atom.js +++ b/bin/git-askpass-atom.js @@ -1,7 +1,7 @@ const net = require('net'); const {execFile} = require('child_process'); -const sockPath = process.argv[2]; +const sockAddr = process.argv[2]; const prompt = process.argv[3]; const diagnosticsEnabled = process.env.GIT_TRACE && process.env.GIT_TRACE.length !== 0; @@ -16,6 +16,28 @@ function log(message) { process.stderr.write(`git-askpass-atom: ${message}\n`); } +function getSockOptions() { + const common = { + allowHalfOpen: true, + }; + + const tcp = /tcp:(\d+)/.exec(sockAddr); + if (tcp) { + const port = parseInt(tcp[1], 10); + if (Number.isNaN(port)) { + throw new Error(`Non-integer TCP port: ${tcp[1]}`); + } + return {port, host: 'localhost', ...common}; + } + + const unix = /unix:(.+)/.exec(sockAddr); + if (unix) { + return {path: unix[1], ...common}; + } + + throw new Error(`Malformed $ATOM_GITHUB_SOCK_ADDR: ${sockAddr}`); +} + function userHelper() { return new Promise((resolve, reject) => { if (userAskPass.length === 0) { @@ -43,32 +65,34 @@ function userHelper() { } function dialog() { - const payload = {prompt, includeUsername: false, pid: process.pid}; + const sockOptions = getSockOptions(); + const query = {prompt, includeUsername: false, pid: process.pid}; log('requesting dialog through Atom socket'); log(`prompt = "${prompt}"`); return new Promise((resolve, reject) => { - const socket = net.connect(sockPath, () => { + const socket = net.connect(sockOptions, () => { log('connection established'); - const parts = []; + let payload = ''; - socket.on('data', data => parts.push(data)); + socket.on('data', data => { + payload += data; + }); socket.on('end', () => { log('Atom socket stream terminated'); try { - const replyDocument = JSON.parse(parts.join('')); + const reply = JSON.parse(payload); log('Atom reply parsed'); - resolve(replyDocument.password); + resolve(reply.password); } catch (err) { log('Unable to parse reply from Atom'); reject(err); } }); - log('writing payload'); - socket.write(JSON.stringify(payload) + '\u0000', 'utf8'); - log('payload written'); + log('writing query'); + socket.end(JSON.stringify(query), 'utf8', () => log('query written')); }); socket.setEncoding('utf8'); }); diff --git a/bin/git-askpass-atom.sh b/bin/git-askpass-atom.sh index c5823679eb..f15c0c95f9 100755 --- a/bin/git-askpass-atom.sh +++ b/bin/git-askpass-atom.sh @@ -1,2 +1,2 @@ #!/bin/sh -ELECTRON_RUN_AS_NODE=1 ELECTRON_NO_ATTACH_CONSOLE=1 "$ATOM_GITHUB_ELECTRON_PATH" "$ATOM_GITHUB_ASKPASS_PATH" "$ATOM_GITHUB_SOCK_PATH" "$@" +ELECTRON_RUN_AS_NODE=1 ELECTRON_NO_ATTACH_CONSOLE=1 "$ATOM_GITHUB_ELECTRON_PATH" "$ATOM_GITHUB_ASKPASS_PATH" "$ATOM_GITHUB_SOCK_ADDR" "$@" diff --git a/bin/git-credential-atom.js b/bin/git-credential-atom.js index 1b9898cbf6..56691964f5 100755 --- a/bin/git-credential-atom.js +++ b/bin/git-credential-atom.js @@ -11,7 +11,7 @@ const {createStrategy, UNAUTHENTICATED} = require(process.env.ATOM_GITHUB_KEYTAR const diagnosticsEnabled = process.env.GIT_TRACE && process.env.GIT_TRACE.length !== 0; const workdirPath = process.env.ATOM_GITHUB_WORKDIR_PATH; const inSpecMode = process.env.ATOM_GITHUB_SPEC_MODE === 'true'; -const sockPath = process.argv[2]; +const sockAddr = process.argv[2]; const action = process.argv[3]; const rememberFile = path.join(__dirname, 'remember'); @@ -27,6 +27,28 @@ function log(message) { process.stderr.write(`git-credential-atom: ${message}\n`); } +function getSockOptions() { + const common = { + allowHalfOpen: true, + }; + + const tcp = /tcp:(\d+)/.exec(sockAddr); + if (tcp) { + const port = parseInt(tcp[1], 10); + if (Number.isNaN(port)) { + throw new Error(`Non-integer TCP port: ${tcp[1]}`); + } + return {port, host: 'localhost', ...common}; + } + + const unix = /unix:(.+)/.exec(sockAddr); + if (unix) { + return {path: unix[1], ...common}; + } + + throw new Error(`Malformed $ATOM_GITHUB_SOCK_ADDR: ${sockAddr}`); +} + /* * Because the git within dugite was (possibly) built with a different $PREFIX than the user's native git, * credential helpers or other config settings from the system configuration may not be discovered. Attempt @@ -47,7 +69,7 @@ function systemCredentialHelpers() { log('discover credential helpers from system git configuration'); log(`PATH = ${env.PATH}`); - execFile('git', ['config', '--system', '--get-all', 'credential.helper'], {env}, (error, stdout, stderr) => { + execFile('git', ['config', '--system', '--get-all', 'credential.helper'], {env}, (error, stdout) => { if (error) { log(`failed to list credential helpers. this is ok\n${error.stack}`); @@ -279,30 +301,34 @@ async function fromKeytar(query) { /* * Request a dialog in Atom by writing a null-delimited JSON query to the socket we were given. */ -function dialog(query) { - if (query.username) { - query.auth = query.username; +function dialog(q) { + if (q.username) { + q.auth = q.username; } - const prompt = 'Please enter your credentials for ' + url.format(query); - const includeUsername = !query.username; + const prompt = 'Please enter your credentials for ' + url.format(q); + const includeUsername = !q.username; + + const query = {prompt, includeUsername, includeRemember: true, pid: process.pid}; - const payload = {prompt, includeUsername, includeRemember: true, pid: process.pid}; + const sockOptions = getSockOptions(); return new Promise((resolve, reject) => { log('requesting dialog through Atom socket'); log(`prompt = "${prompt}" includeUsername = ${includeUsername}`); - const socket = net.connect(sockPath, async () => { + const socket = net.connect(sockOptions, async () => { log('connection established'); - const parts = []; + let payload = ''; - socket.on('data', data => parts.push(data)); + socket.on('data', data => { + payload += data; + }); socket.on('end', () => { log('Atom socket stream terminated'); try { - const reply = JSON.parse(parts.join('')); + const reply = JSON.parse(payload); const writeReply = function(err) { if (err) { @@ -311,7 +337,7 @@ function dialog(query) { const lines = []; ['protocol', 'host', 'username', 'password'].forEach(k => { - const value = reply[k] !== undefined ? reply[k] : query[k]; + const value = reply[k] !== undefined ? reply[k] : q[k]; lines.push(`${k}=${value}\n`); }); @@ -325,16 +351,16 @@ function dialog(query) { writeReply(); } } catch (e) { - log(`Unable to parse reply from Atom:\n${e.stack}`); + log(`Unable to parse reply from Atom:\n${payload}\n${e.stack}`); reject(e); } }); - log('writing payload'); + log('writing query'); await new Promise(r => { - socket.write(JSON.stringify(payload) + '\u0000', 'utf8', r); + socket.end(JSON.stringify(query), 'utf8', r); }); - log('payload written'); + log('query written'); }); socket.setEncoding('utf8'); }); @@ -424,7 +450,7 @@ async function erase() { } log(`working directory = ${workdirPath}`); -log(`socket path = ${sockPath}`); +log(`socket address = ${sockAddr}`); log(`action = ${action}`); switch (action) { diff --git a/bin/git-credential-atom.sh b/bin/git-credential-atom.sh index 0cf14dee8d..30ac455e87 100755 --- a/bin/git-credential-atom.sh +++ b/bin/git-credential-atom.sh @@ -1,2 +1,2 @@ #!/bin/sh -ELECTRON_RUN_AS_NODE=1 ELECTRON_NO_ATTACH_CONSOLE=1 "$ATOM_GITHUB_ELECTRON_PATH" "$ATOM_GITHUB_CREDENTIAL_PATH" "$ATOM_GITHUB_SOCK_PATH" "$@" +ELECTRON_RUN_AS_NODE=1 ELECTRON_NO_ATTACH_CONSOLE=1 "$ATOM_GITHUB_ELECTRON_PATH" "$ATOM_GITHUB_CREDENTIAL_PATH" "$ATOM_GITHUB_SOCK_ADDR" "$@" diff --git a/docs/feature-requests/005-blank-slate.md b/docs/feature-requests/005-blank-slate.md new file mode 100644 index 0000000000..40b0b6d9cc --- /dev/null +++ b/docs/feature-requests/005-blank-slate.md @@ -0,0 +1,200 @@ + + +**_Part 1 - Required information_** + +# Improved Blank Slate Behavior + +## :memo: Summary + +Improve the behavior of the GitHub tab when no GitHub remote is detected to better guide users to start using GitHub features. + +## :checkered_flag: Motivation + +Well, for one thing, we've had TODOs in [GitHubTabView](https://github.com/atom/github/blob/cf1009243a35e2a6880ae3c969f2fe2a11d3f72d/lib/views/github-tab-view.js#L81) and [GitHubTabContainer](https://github.com/atom/github/blob/cf1009243a35e2a6880ae3c969f2fe2a11d3f72d/lib/containers/github-tab-container.js#L78-L81) for these cases since they were written. But we've also received repeated and clear feedback from UXR studies, [issues](https://github.com/atom/github/issues/1962), and [the forum](https://discuss.atom.io/t/github-link/60168) that users are confused about what to do to "link a repository with GitHub" to use our GitHub features. + +This is a roadblock that is almost certainly keeping users who want to use our package from doing so. + +## 🤯 Explanation + +Our goal is to provide prompts for useful next steps when the current repository does not have a unique remote pointing to `https://github.com`. When a user opens the GitHub tab in any of these situations, they should be presented with options to direct their next course of action. + +In each situation below, our user's goal is the same: to have the repository they wish to work on (a) cloned on their computer with a correct remote configuration and (b) on dotcom. + +## GitHub tab + +### No local repository + +We detect this state when the active repository is absent, meaning there are no project root directories. + +github tab, no local repositories + +#### ...no dotcom repository + +_Scenario:_ A user wants to start a new project published on GitHub. + +Clicking the "Create a new GitHub repository" button opens the [Create repository dialog](#create-repository-dialog). + +#### ...existing dotcom repository + +_Scenario:_ A user wishes to contribute to a project that exists on GitHub, but does not yet have a clone on their local machine. Perhaps a friend or co-worker created the repository and they wish to collaborate, or they're working on a personal project on a different machine, or there is an open-source repository they wish to contribute to. + +Clicking the "Clone an existing GitHub repository" button opens the [Clone repository dialog](#clone-repository-dialog). + +### Local repository, uninitialized + +We detect this state when the active repository is empty, meaning the current project root has no Git repository. + +local-uninitialized + +#### ...no dotcom repository + +_Scenario:_ A user has begun a project locally and now wishes to put it under version control and share it on GitHub. + +Clicking the "Publish GitHub repository" button opens the [Publish repository dialog](#publish-repository-dialog). + +### Local repository, initialized, no dotcom remotes + +We detect this state when the active repository is present but has no dotcom remotes. + +github tab, local repository with no GitHub remotes + +#### ...no dotcom repository + +_Scenario:_ A user has begun a project locally and now wishes to share it on GitHub. + +Clicking the "Publish on GitHub" button opens the [Publish repository dialog](#publish-repository-dialog). + +### Local repository, initialized, dotcom remotes + +This is the state we handle now: when an active repository is present and has one or more dotcom remotes. + +## Clone repository dialog + +The clone repository dialog begins in search mode. As you type within the text input, once more than three characters have been entered, repositories on GitHub matching the entered text appear in the result list below. Repositories may be identified by full clone URL, `owner/name` pair, or a unique substring of `owner/name`. + +clone dialog, empty search + +clone dialog, search results + +### GitHub clone mode + +Clicking on an entry in the search result list or entering the full clone URL of a GitHub repository changes the dialog to "GitHub clone" mode: + +clone dialog, GitHub mode + +Clicking the "advanced" arrow expands controls to customize cloning protocol and the created local remote name. + +clone dialog, GitHub mode, advanced section expanded + +The "protocol" toggle is initialized to match the value of the `github.preferredRemoteProtocol` config setting. If the protocol is changed, the setting is changed to match. + +### Non-GitHub clone mode + +Entering the full clone URL of a non-GitHub repository changes the dialog to "non-GitHub clone" mode. Clicking the "advanced" arrow expands controls to customize the created local remote name. (The cloning protocol is inferred from the source URL.) + +clone dialog, non-GitHub mode + +### Common behavior + +The "source remote name" input is pre-populated with the value of the Atom setting `github.cloneSourceRemoteName`. If it's changed to be empty, or to contain characters that are not valid in a git remote name, an error message is shown. + +The clone destination path is pre-populated with the directory specified as `core.projectHome` in the user's Atom settings joined with the repository name. If the destination directory already exists and is nonempty, or is not writable by the current user, the path is considered invalid and an error message is shown. Clicking the button to the right of the destination path text field opens a system directory selection or creation dialog that populates the clone destination path with on accept. + +The "Clone" button is enabled when: + +* A clone source is uniquely identified, by GitHub `name/owner` or git URL; +* The "source remote name" input is populated with a valid git remote name; +* A valid path is entered within the clone destination path input. + +Clicking the "Clone" button: + +* Clones the repository from the chosen clone source to the clone destination path. +* Adds the clone destination path as a project root. +* Ensures that the clone destination is the active GitHub package context. +* Closes the "Clone repository" dialog. + +## Create repository dialog + +create dialog + +The "owner" drop-down is populated with the user's account name and the list of organizations to which the authenticated user belongs. Organizations to which the user has insufficient permissions to create repositories are disabled with an explanatory suffix. + +The "repository name" field is initially empty and focused. As the user types, an error message appears if a repository with the chosen name and owner already exists. + +The clone destination path is pre-populated with the directory specified as `core.projectHome` in the user's Atom settings joined with the repository name. If the destination directory already exists and is nonempty, or is unwritable by the current user, the path is considered invalid and an error message is shown. Clicking the button to the right of the destination path text field opens a system directory selection or creation dialog that populates the clone destination path with on accept. + +Clicking the "advanced" arrow expands controls to customize cloning protocol and the created local remote name. The "source remote name" input is pre-populated with the value of the Atom setting `github.cloneSourceRemoteName`. If it's changed to be empty, or to contain characters that are not valid in a git remote name, an error message is shown. + +Clicking the "Create" button: + +* Creates a repository on GitHub with the chosen owner and name. +* Clones the newly created repository to the clone destination path with its source remote set to the source remote name. +* Adds the clone destination path as a project root. +* Ensures that the clone destination path is the active GitHub package context. +* Closes the "Create repository" dialog. + +## Publish repository dialog + +publish dialog + +The major difference between this dialog and the [Create repository dialog](#create-repository-dialog) is that the local repository's path is displayed in a read-only input field and the directory selection button is disabled. + +* The "source remote" field is invalid if a remote with the given name is already present in the local repository. + +Clicking the "Publish" button also behaves slightly differently from the "Create" button: + +* Initializes a git repository in the local repository path if it is not already a git repository. +* Creates a repository on GitHub with the chosen owner and name. +* Adds a remote with the specified "source remote name" and sets it to the clone URL of the newly created repository, respecting the https/ssh toggle. +* If a branch called `master` is present in the local repository, its push and fetch upstreams are configured to be the source remote. +* The local repository path is added as a project root if it is not already present. +* Ensures that the clone destination path is the active GitHub package context. +* Closes the "Publish repository" dialog. + +## Improved branch publish behavior + +If a remote is present in the current repository with a name matching the setting `github.cloneSourceRemoteName`, both clicking "publish" in the push-pull status bar tile and clicking a "publish ..." button in the GitHub tab push HEAD to the clone source remote instead of `origin`, even if the "chosen" remote differs. + +If a multiple remotes are present in the current repository, and one is present with a name matching the setting `github.upstreamRemoteName` that has a recognized GitHub URL, it will be preferred as the default remote by the `GitTabContainer` component. Otherwise, if one is present with a name matching the setting `github.cloneSourceRemoteName` and a GitHub URL, that one will be used. Finally we'll fall back to our existing `RemoveSelectorView` menu. + +When multiple remotes are present in the current repository and the push-pull status bar tile is in its "publish" state, the push-pull status bar tile's context menu includes a separate "Push" entry for each available remote. + +**_Part 2 - Additional information_** + +## :anchor: Drawbacks + +Modal dialogs are disruptive to UX flow. You can't start creating a repository, have another thought and make a quick edit, then come back to it. This design uses a lot of them. + +The "Create repository" flow is missing some of the functionality that the dotcom page has, like initializing a README and a license. We can make _some_ things nicer with the local context we have to work with - like guessing a repository name from the project directory - but we'd be unlikely to keep up with what's available on dotcom. + +There is no "create repository" mutation available in the GraphQL API, so we'll need to use the REST API for that. + +Some users don't use GitHub, but have remotes hosted elsewhere. We want to avoid being too invasive and annoying these users with prompts that will never apply to them. + +## :thinking: Rationale and alternatives + +We could open dotcom for repository creation, but then we would have no way to smoothly clone or connect the created repository. + +## :question: Unresolved questions + +* Are there better ways to intelligently identify which remotes should be used to push branches and which should be queried for pull requests? +* Are there different, common upstream-and-fork remote setups that these dialogs will support poorly? +* Is the language used in these dialogs and controls familiar enough to git newcomers? + +## :warning: Out of Scope + +This effort should not include: + +* GitHub enterprise support. ( :sad: ) We have separate issues ([#270](https://github.com/atom/github/issues/270), [#919](https://github.com/atom/github/issues/919)) to track that, although this does complicate its eventual implementation, because the clone and create dialogs need to be Enterprise-aware. +* Workflows related to fork creation and management. +* General remote management ([#555](https://github.com/atom/github/issues/555)). + +## :construction: Implementation phases + +_TODO_ + +## :white_check_mark: Feature description for Atom release blog post + +_TODO_ diff --git a/docs/installation.md b/docs/installation.md new file mode 100644 index 0000000000..714e565367 --- /dev/null +++ b/docs/installation.md @@ -0,0 +1,46 @@ +# Installation + +The GitHub package is bundled as a core package within Atom. This means that you don't have to install it separately - download Atom from [the website](https://atom.io) and it's included automatically. This carries a number of benefits. For example, because it's included in the [v8 snapshot](https://flight-manual.atom.io/behind-atom/sections/how-atom-uses-chromium-snapshots/) produced during each Atom build, it boots extremely quickly and pays very little penalty for things like requiring and bootstrapping React. + +However! The downside of this is that it can take a while for new work in this repository to make its way into your editor. Here's the full lifecycle of a change: + +1. First, the change is done via a pull request to this repository. When it's ready and has full, passing test coverage, it's merged into the default branch. +2. Periodically, we tag and publish batches of changes as new versions to [apm](https://atom.io/packages/github). Typically, this is done after a major bugfix or new feature is merged, or after merging a security-related dependency update. +3. Next, we send a pull request to [the core atom repository](https://github.com/atom/atom) to bump the versions of the GitHub package dependency in its `package.json` and `package-lock.json` files. When that pull request has a green build, we merge it. +4. The next night that the [Atom core nightly build](https://github.visualstudio.com/Atom/_build?definitionId=1) is successful, the new package version is released to the [Atom nightly channel](https://atom.io/nightly). +5. The core Atom team regularly "rolls the railcars" to tag new release. The first time that this happens after the GitHub package dependency bump is merged, it will be included on the next release of the [Atom beta channel](https://atom.io/beta). +6. The next time that the core Atom team "rolls the railcars" after that, the new GitHub package version is shipped to [Atom stable](https://atom.io/). :rocket: :tada: + +Depending on the timing, all of this can take a month and a half to two months, so when you see a pull request get merged and your issue closed, you might think you're out of luck and you'll just have to wait... but, you have a few other options here. + +## Use a non-stable Atom channel + +Instead of living at the end of the line way out on stable, you could switch to the beta or nightly channels of Atom releases. + +* The [beta channel](https://atom.io/beta) updates a little more frequently than the stable channel, but it's about a month ahead. This means that you'll have access to GitHub package work as soon as the next time the railcars are rolled (step 5 up above) - about a month sooner than you would if you stayed on stable. +* The [nightly channel](https://atom.io/nightly) is updated about daily with the latest and greatest Atom build, including everything that was merged into Atom core up to that point. If you use the nightly channel, you'll have access to GitHub package work as soon as it's published in a release and merged into Atom core (step 4 up above). + +### Benefits + +By using a "fresher" Atom channel, you'll have access to features and bug-fixes much sooner than you will if you use a stable build. Despite the names, our beta and nightly channels are pretty stable... I've (@smashwilson) personally been using a nightly build for my day to day editing for years now. + +What's more, if you _do_ experience a serious regression - with the GitHub package or any other core behavior - you can: + +* File an issue to let us know, then: +* Switch to the next channel (from nightly to beta, or beta to stable). + +That gives us a chance to respond to the issue, determine if it's serious enough to warrant delaying a release for if we can't fix it in time, and could prevent an order of magnitude more users from encountering the same problem... _and_ gives you a route to _immediately_ revert to an Atom version that unblocks you! + +## Live on the edge + +If you're using nightly builds, you can have access to fixes and improvements (often) within a few weeks to a month. But, it can take me some time to tag releases and get them into Atom core sometimes. If you're really can't wait, and you want to live on the very, very edge, you can run the absolute latest code as soon as it's merged. + +1. First, install Atom's build requirements. You don't have to clone, bootstrap and build all of Atom to do this - just install the packages and dependencies listed in the "Building" section on [the flight manual documentation](https://flight-manual.atom.io/hacking-atom/sections/hacking-on-atom-core/) for your operating system. +2. Second, run the following command at your terminal or command line prompt: + ``` + apm install atom/github + ``` + +Now you'll be running everything as soon as it's merged... and `apm` will automatically keep it that way, as we merge more work! + +:warning: Be aware! Using this method _will_ have noticeably degrade Atom's startup time. It's especially impactful the first time you launch Atom after each update, because Atom will be transpiling all of the package source. After that, you'll essentially be missing out on the benefits of having it included in the v8 snapshot. diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md new file mode 100644 index 0000000000..ea3ce1e004 --- /dev/null +++ b/docs/troubleshooting.md @@ -0,0 +1,27 @@ +# Troubleshooting guide + +So, you're having a problem with this package, and you're not sure what's going on. Here are a few tools that you can use to collect more information on your problem to help us help you faster. + +The more debugging information you can provide, the easier it will be for us to figure out what's going on, even if your problem is triggered by some configuration or local state on your machine... and the more likely it will be that we'll be able to help you out. + +## Atom debugging guide + +Be sure to look over the [Atom debugging guide](https://flight-manual.atom.io/hacking-atom/sections/debugging/), as everything written there also applies here. + +Take special note of the [section on the developer tools](https://flight-manual.atom.io/hacking-atom/sections/debugging/#check-for-errors-in-the-developer-tools). Any time that the package "crashes" (git and GitHub status bar buttons vanish, tabs go blank, commands are no longer present in the command palette) there's almost certainly a stack trace waiting for you in the developer tools. Copy and paste that into your issue within a triple-backtick code block and it will give us worlds more information about what's going on. For many problems, having a stack trace to work with almost single-handedly makes the difference between us not being able to do anything and us being able to land a fix. + +## Git diagnostics + +If your problem is related to specific git operations or interactions - like problems committing, pushing, or fetching - then it can be very helpful to collect git command diagnostics. + +To enable git diagnostic collection: + +* Open your [Settings tab](https://flight-manual.atom.io/getting-started/sections/atom-basics/#settings-and-preferences). +* Navigate to the "Packages" section on the lefthand side. +* Search for "github" in the search box. +* Click "settings" on the "github" package result. +* Check the checkbox labelled "Git diagnostics". + +Now, reproduce your problem. Every git command that's executed by this package will be logged to the developer console, including input, stdout and stderr, and exit codes, with full verbose tracing. Expand the collapsed sections corresponding to the relevant commands and copy-and-paste the results in your issue. + +:warning: While the git logging will elide things like passphrases for you, you may wish to manually remove references to usernames, paths, or repository URLs if you wish, for privacy reasons. diff --git a/graphql/schema.graphql b/graphql/schema.graphql index f313d3aca4..b91ce825c2 100644 --- a/graphql/schema.graphql +++ b/graphql/schema.graphql @@ -7,6 +7,20 @@ input AcceptEnterpriseAdministratorInvitationInput { clientMutationId: String } +"""Autogenerated return type of AcceptEnterpriseAdministratorInvitation""" +type AcceptEnterpriseAdministratorInvitationPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The invitation that was accepted.""" + invitation: EnterpriseAdministratorInvitation + + """ + A message confirming the result of accepting an administrator invitation. + """ + message: String +} + """Autogenerated input type of AcceptTopicSuggestion""" input AcceptTopicSuggestionInput { """The Node ID of the repository.""" @@ -203,8 +217,11 @@ type AddProjectColumnPayload { """Autogenerated input type of AddPullRequestReviewComment""" input AddPullRequestReviewCommentInput { + """The node ID of the pull request reviewing""" + pullRequestId: ID + """The Node ID of the review to modify.""" - pullRequestReviewId: ID! + pullRequestReviewId: ID """The SHA of the commit to comment on.""" commitOID: GitObjectID @@ -254,6 +271,9 @@ input AddPullRequestReviewInput { """The review line comments.""" comments: [DraftPullRequestReviewComment] + """The review line comment threads.""" + threads: [DraftPullRequestReviewThread] + """A unique identifier for the client performing the mutation.""" clientMutationId: String } @@ -270,6 +290,49 @@ type AddPullRequestReviewPayload { reviewEdge: PullRequestReviewEdge } +"""Autogenerated input type of AddPullRequestReviewThread""" +input AddPullRequestReviewThreadInput { + """Path to the file being commented on.""" + path: String! + + """Body of the thread's first comment.""" + body: String! + + """The node ID of the pull request reviewing""" + pullRequestId: ID + + """The Node ID of the review to modify.""" + pullRequestReviewId: ID + + """ + The line of the blob to which the thread refers. The end of the line range for multi-line comments. + """ + line: Int! + + """ + The side of the diff on which the line resides. For multi-line comments, this is the side for the end of the line range. + """ + side: DiffSide = RIGHT + + """The first line of the range to which the comment refers.""" + startLine: Int + + """The side of the diff on which the start line resides.""" + startSide: DiffSide = RIGHT + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of AddPullRequestReviewThread""" +type AddPullRequestReviewThreadPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The newly created thread.""" + thread: PullRequestReviewThread +} + """Autogenerated input type of AddReaction""" input AddReactionInput { """The Node ID of the subject to modify.""" @@ -346,13 +409,22 @@ type App implements Node { url: URI! } -"""An edge in a connection.""" -type AppEdge { - """A cursor for use in pagination.""" - cursor: String! +"""Autogenerated input type of ArchiveRepository""" +input ArchiveRepositoryInput { + """The ID of the repository to mark as archived.""" + repositoryId: ID! - """The item at the end of the edge.""" - node: App + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of ArchiveRepository""" +type ArchiveRepositoryPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The repository that was marked as archived.""" + repository: Repository } """An object that can have users assigned to it.""" @@ -420,6 +492,9 @@ interface AuditEntry { """The time the action was initiated""" createdAt: PreciseDateTime! + """The corresponding operation type for the action""" + operationType: OperationType + """The user affected by the action""" user: User @@ -453,6 +528,48 @@ enum AuditLogOrderField { CREATED_AT } +""" +Represents a 'automatic_base_change_failed' event on a given pull request. +""" +type AutomaticBaseChangeFailedEvent implements Node { + """Identifies the actor who performed the event.""" + actor: Actor + + """Identifies the date and time when the object was created.""" + createdAt: DateTime! + id: ID! + + """The new base for this PR""" + newBase: String! + + """The old base for this PR""" + oldBase: String! + + """PullRequest referenced by event.""" + pullRequest: PullRequest! +} + +""" +Represents a 'automatic_base_change_succeeded' event on a given pull request. +""" +type AutomaticBaseChangeSucceededEvent implements Node { + """Identifies the actor who performed the event.""" + actor: Actor + + """Identifies the date and time when the object was created.""" + createdAt: DateTime! + id: ID! + + """The new base for this PR""" + newBase: String! + + """The old base for this PR""" + oldBase: String! + + """PullRequest referenced by event.""" + pullRequest: PullRequest! +} + """ Represents a 'base_ref_changed' event on a given issue or pull request. """ @@ -463,9 +580,40 @@ type BaseRefChangedEvent implements Node { """Identifies the date and time when the object was created.""" createdAt: DateTime! + """ + Identifies the name of the base ref for the pull request after it was changed. + """ + currentRefName: String! + """Identifies the primary key from the database.""" databaseId: Int id: ID! + + """ + Identifies the name of the base ref for the pull request before it was changed. + """ + previousRefName: String! + + """PullRequest referenced by event.""" + pullRequest: PullRequest! +} + +"""Represents a 'base_ref_deleted' event on a given pull request.""" +type BaseRefDeletedEvent implements Node { + """Identifies the actor who performed the event.""" + actor: Actor + + """ + Identifies the name of the Ref associated with the `base_ref_deleted` event. + """ + baseRefName: String + + """Identifies the date and time when the object was created.""" + createdAt: DateTime! + id: ID! + + """PullRequest referenced by event.""" + pullRequest: PullRequest } """Represents a 'base_ref_force_pushed' event on a given pull request.""" @@ -535,8 +683,10 @@ type Blob implements Node & GitObject { commitUrl: URI! id: ID! - """Indicates whether the Blob is binary or text""" - isBinary: Boolean! + """ + Indicates whether the Blob is binary or text. Returns null if unable to determine the encoding. + """ + isBinary: Boolean """Indicates whether the contents is truncated""" isTruncated: Boolean! @@ -581,6 +731,12 @@ type Bot implements Node & Actor & UniformResourceLocatable { """A branch protection rule.""" type BranchProtectionRule implements Node { + """Can this branch be deleted.""" + allowsDeletions: Boolean! + + """Are force pushes allowed on this branch.""" + allowsForcePushes: Boolean! + """ A list of conflicts matching branches protection rule and other branch protection rules """ @@ -617,6 +773,9 @@ type BranchProtectionRule implements Node { """Repository refs that are protected by this rule""" matchingRefs( + """Filters refs with query on name""" + query: String + """Returns the elements in the list that come after the specified cursor.""" after: String @@ -672,6 +831,9 @@ type BranchProtectionRule implements Node { """Are commits required to be signed.""" requiresCommitSignatures: Boolean! + """Are merge commits prohibited from being pushed to this branch.""" + requiresLinearHistory: Boolean! + """Are status checks required to update matching branches.""" requiresStatusChecks: Boolean! @@ -771,6 +933,20 @@ input CancelEnterpriseAdminInvitationInput { clientMutationId: String } +"""Autogenerated return type of CancelEnterpriseAdminInvitation""" +type CancelEnterpriseAdminInvitationPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The invitation that was canceled.""" + invitation: EnterpriseAdministratorInvitation + + """ + A message confirming the result of canceling an administrator invitation. + """ + message: String +} + """Autogenerated input type of ChangeUserStatus""" input ChangeUserStatusInput { """ @@ -944,6 +1120,17 @@ enum CheckConclusionState { """The check suite or run was neutral.""" NEUTRAL + + """The check suite or run was skipped.""" + SKIPPED + + """The check suite or run has failed at startup.""" + STARTUP_FAILURE + + """ + The check suite or run was marked stale by GitHub. Only GitHub can use this conclusion. + """ + STALE } """A check run.""" @@ -1333,6 +1520,12 @@ input CloneTemplateRepositoryInput { """Indicates the repository's visibility level.""" visibility: RepositoryVisibility! + """ + Whether to copy all branches from the template to the new repository. Defaults + to copying only the default branch of the template. + """ + includeAllBranches: Boolean = false + """A unique identifier for the client performing the mutation.""" clientMutationId: String } @@ -1451,9 +1644,6 @@ enum CollaboratorAffiliation { ALL } -"""Types that can be inside Collection Items.""" -union CollectionItemContent = Repository | Organization | User - """Represents a comment.""" interface Comment { """The actor who authored the comment.""" @@ -1524,6 +1714,9 @@ enum CommentAuthorAssociation { """Author is the owner of the repository.""" OWNER + """Author is a placeholder for an unclaimed user.""" + MANNEQUIN + """Author has been invited to collaborate on the repository.""" COLLABORATOR @@ -1542,6 +1735,9 @@ enum CommentAuthorAssociation { """The possible errors that will prevent a user from updating a comment.""" enum CommentCannotUpdateReason { + """Unable to create comment because repository is archived.""" + ARCHIVED + """ You must be the author or have write access to this repository to update this comment. """ @@ -1573,6 +1769,9 @@ type CommentDeletedEvent implements Node { """Identifies the primary key from the database.""" databaseId: Int + + """The user who authored the deleted comment.""" + deletedCommentAuthor: Actor id: ID! } @@ -1601,7 +1800,7 @@ type Commit implements Node & GitObject & Subscribable & UniformResourceLocatabl last: Int """Ordering options for pull requests.""" - orderBy: PullRequestOrder + orderBy: PullRequestOrder = {field: CREATED_AT, direction: ASC} ): PullRequestConnection """Authorship details of the commit.""" @@ -1613,6 +1812,27 @@ type Commit implements Node & GitObject & Subscribable & UniformResourceLocatabl """The datetime when this commit was authored.""" authoredDate: DateTime! + """ + The list of authors for this commit based on the git author and the Co-authored-by + message trailer. The git author will always be first. + + """ + authors( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + ): GitActorConnection! + """Fetches `git blame` information.""" blame( """The file whose Git blame information you want.""" @@ -1683,7 +1903,7 @@ type Commit implements Node & GitObject & Subscribable & UniformResourceLocatabl environments: [String!] """Ordering options for deployments returned from the connection.""" - orderBy: DeploymentOrder + orderBy: DeploymentOrder = {field: CREATED_AT, direction: ASC} """Returns the elements in the list that come after the specified cursor.""" after: String @@ -1700,6 +1920,12 @@ type Commit implements Node & GitObject & Subscribable & UniformResourceLocatabl last: Int ): DeploymentConnection + """The tree entry representing the file located at the given path.""" + file( + """The path for the file""" + path: String! + ): TreeEntry + """ The linear commit history starting from (and including) this commit, in the same order as `git log`. """ @@ -1754,6 +1980,9 @@ type Commit implements Node & GitObject & Subscribable & UniformResourceLocatabl """The Git object ID""" oid: GitObjectID! + """The organization this commit was made on behalf of.""" + onBehalfOf: Organization + """The parents of a commit.""" parents( """Returns the elements in the list that come after the specified cursor.""" @@ -1786,6 +2015,28 @@ type Commit implements Node & GitObject & Subscribable & UniformResourceLocatabl """Status information for this commit""" status: Status + """Check and Status rollup information for this commit.""" + statusCheckRollup: StatusCheckRollup + + """ + Returns a list of all submodules in this repository as of this Commit parsed from the .gitmodules file. + """ + submodules( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + ): SubmoduleConnection! + """ Returns a URL to download a tarball archive for a repository. Note: For private repositories, these links are temporary and expire after five minutes. @@ -1836,7 +2087,7 @@ input CommitAuthor { } """Represents a comment on a given Commit.""" -type CommitComment implements Node & Comment & Deletable & Updatable & UpdatableComment & Reactable & RepositoryNode { +type CommitComment implements Node & Comment & Deletable & Minimizable & Updatable & UpdatableComment & Reactable & RepositoryNode { """The actor who authored the comment.""" author: Actor @@ -1846,7 +2097,7 @@ type CommitComment implements Node & Comment & Deletable & Updatable & Updatable """Identifies the comment body.""" body: String! - """Identifies the comment body rendered to HTML.""" + """The body rendered to HTML.""" bodyHTML: HTML! """The body rendered to text.""" @@ -2011,7 +2262,7 @@ type CommitCommentThread implements Node & RepositoryNode { ): CommitCommentConnection! """The commit the comments were made on.""" - commit: Commit! + commit: Commit id: ID! """The file the comments were made on.""" @@ -2078,7 +2329,7 @@ type CommitContributionsByRepository { """ Ordering options for commit contributions returned from the connection. """ - orderBy: CommitContributionOrder + orderBy: CommitContributionOrder = {field: OCCURRED_AT, direction: DESC} ): CreatedCommitContributionConnection! """The repository in which the commits were made.""" @@ -2119,32 +2370,23 @@ type CommitHistoryConnection { totalCount: Int! } -"""A content attachment""" -type ContentAttachment { - """ - The body text of the content attachment. This parameter supports markdown. - """ - body: String! - - """The content reference that the content attachment is attached to.""" - contentReference: ContentReference! +"""Represents a 'connected' event on a given issue or pull request.""" +type ConnectedEvent implements Node { + """Identifies the actor who performed the event.""" + actor: Actor - """Identifies the primary key from the database.""" - databaseId: Int! + """Identifies the date and time when the object was created.""" + createdAt: DateTime! id: ID! - """The title of the content attachment.""" - title: String! -} + """Reference originated in a different repository.""" + isCrossRepository: Boolean! -"""A content reference""" -type ContentReference { - """Identifies the primary key from the database.""" - databaseId: Int! - id: ID! + """Issue or pull request that made the reference.""" + source: ReferencedSubject! - """The reference of the content reference.""" - reference: String! + """Issue or pull request which was connected.""" + subject: ReferencedSubject! } """ @@ -2242,26 +2484,10 @@ type ContributionCalendarWeek { """Ordering options for contribution connections.""" input ContributionOrder { - """ - The field by which to order contributions. - - **Upcoming Change on 2019-10-01 UTC** - **Description:** `field` will be removed. Only one order field is supported. - **Reason:** `field` will be removed. - - """ - field: ContributionOrderField - """The ordering direction.""" direction: OrderDirection! } -"""Properties by which contribution connections can be ordered.""" -enum ContributionOrderField { - """Order contributions by when they were made.""" - OCCURRED_AT -} - """ A contributions collection aggregates contributions such as opened issues and commits created by a user. """ @@ -2360,7 +2586,7 @@ type ContributionsCollection { excludePopular: Boolean = false """Ordering options for contributions returned from the connection.""" - orderBy: ContributionOrder + orderBy: ContributionOrder = {direction: DESC} ): CreatedIssueContributionConnection! """Issue contributions made by the user, grouped by repository.""" @@ -2440,7 +2666,7 @@ type ContributionsCollection { excludePopular: Boolean = false """Ordering options for contributions returned from the connection.""" - orderBy: ContributionOrder + orderBy: ContributionOrder = {direction: DESC} ): CreatedPullRequestContributionConnection! """Pull request contributions made by the user, grouped by repository.""" @@ -2474,7 +2700,7 @@ type ContributionsCollection { last: Int """Ordering options for contributions returned from the connection.""" - orderBy: ContributionOrder + orderBy: ContributionOrder = {direction: DESC} ): CreatedPullRequestReviewContributionConnection! """ @@ -2507,7 +2733,7 @@ type ContributionsCollection { excludeFirst: Boolean = false """Ordering options for contributions returned from the connection.""" - orderBy: ContributionOrder + orderBy: ContributionOrder = {direction: DESC} ): CreatedRepositoryContributionConnection! """ @@ -2625,6 +2851,25 @@ type ConvertProjectCardNoteToIssuePayload { projectCard: ProjectCard } +"""Represents a 'convert_to_draft' event on a given pull request.""" +type ConvertToDraftEvent implements Node & UniformResourceLocatable { + """Identifies the actor who performed the event.""" + actor: Actor + + """Identifies the date and time when the object was created.""" + createdAt: DateTime! + id: ID! + + """PullRequest referenced by event.""" + pullRequest: PullRequest! + + """The HTTP path for this convert to draft event.""" + resourcePath: URI! + + """The HTTP URL for this convert to draft event.""" + url: URI! +} + """Autogenerated input type of CreateBranchProtectionRule""" input CreateBranchProtectionRuleInput { """ @@ -2644,6 +2889,15 @@ input CreateBranchProtectionRuleInput { """Are commits required to be signed.""" requiresCommitSignatures: Boolean + """Are merge commits prohibited from being pushed to this branch.""" + requiresLinearHistory: Boolean + + """Are force pushes allowed on this branch.""" + allowsForcePushes: Boolean + + """Can this branch be deleted.""" + allowsDeletions: Boolean + """Can admins overwrite branch protection.""" isAdminEnforced: Boolean @@ -2672,7 +2926,7 @@ input CreateBranchProtectionRuleInput { """Is pushing to matching branches restricted.""" restrictsPushes: Boolean - """A list of User or Team IDs allowed to push to matching branches.""" + """A list of User, Team or App IDs allowed to push to matching branches.""" pushActorIds: [ID!] """ @@ -2766,21 +3020,6 @@ type CreateCheckSuitePayload { clientMutationId: String } -"""Autogenerated input type of CreateContentAttachment""" -input CreateContentAttachmentInput { - """The node ID of the content_reference.""" - contentReferenceId: ID! - - """The title of the content attachment.""" - title: String! - - """The body of the content attachment, which may contain markdown.""" - body: String! - - """A unique identifier for the client performing the mutation.""" - clientMutationId: String -} - """Represents the contribution a user made by committing to a repository.""" type CreatedCommitContribution implements Contribution { """How many commits were made on this day to this repository by the user.""" @@ -3100,6 +3339,47 @@ input CreateEnterpriseOrganizationInput { clientMutationId: String } +"""Autogenerated return type of CreateEnterpriseOrganization""" +type CreateEnterpriseOrganizationPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The enterprise that owns the created organization.""" + enterprise: Enterprise + + """The organization that was created.""" + organization: Organization +} + +"""Autogenerated input type of CreateIpAllowListEntry""" +input CreateIpAllowListEntryInput { + """The ID of the owner for which to create the new IP allow list entry.""" + ownerId: ID! + + """An IP address or range of addresses in CIDR notation.""" + allowListValue: String! + + """An optional name for the IP allow list entry.""" + name: String + + """ + Whether the IP allow list entry is active when an IP allow list is enabled. + """ + isActive: Boolean! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of CreateIpAllowListEntry""" +type CreateIpAllowListEntryPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The IP allow list entry that was created.""" + ipAllowListEntry: IpAllowListEntry +} + """Autogenerated input type of CreateIssue""" input CreateIssueInput { """The Node ID of the repository.""" @@ -3123,6 +3403,11 @@ input CreateIssueInput { """An array of Node IDs for projects associated with this issue.""" projectIds: [ID!] + """ + The name of an issue template in the repository, assigns labels and assignees from the template to the issue + """ + issueTemplate: String + """A unique identifier for the client performing the mutation.""" clientMutationId: String } @@ -3197,6 +3482,9 @@ input CreatePullRequestInput { """Indicates whether maintainers can modify the pull request.""" maintainerCanModify: Boolean = true + """Indicates whether this pull request should be a draft.""" + draft: Boolean = false + """A unique identifier for the client performing the mutation.""" clientMutationId: String } @@ -3284,6 +3572,58 @@ type CreateRepositoryPayload { repository: Repository } +"""Autogenerated input type of CreateTeamDiscussionComment""" +input CreateTeamDiscussionCommentInput { + """The ID of the discussion to which the comment belongs.""" + discussionId: ID! + + """The content of the comment.""" + body: String! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of CreateTeamDiscussionComment""" +type CreateTeamDiscussionCommentPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The new comment.""" + teamDiscussionComment: TeamDiscussionComment +} + +"""Autogenerated input type of CreateTeamDiscussion""" +input CreateTeamDiscussionInput { + """The ID of the team to which the discussion belongs.""" + teamId: ID! + + """The title of the discussion.""" + title: String! + + """The content of the discussion.""" + body: String! + + """ + If true, restricts the visiblity of this discussion to team members and + organization admins. If false or not specified, allows any organization member + to view this discussion. + """ + private: Boolean + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of CreateTeamDiscussion""" +type CreateTeamDiscussionPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The new discussion.""" + teamDiscussion: TeamDiscussion +} + """Represents a mention made by one issue or pull request to another.""" type CrossReferencedEvent implements Node & UniformResourceLocatable { """Identifies the actor who performed the event.""" @@ -3381,6 +3721,39 @@ type DeleteBranchProtectionRulePayload { clientMutationId: String } +"""Autogenerated input type of DeleteDeployment""" +input DeleteDeploymentInput { + """The Node ID of the deployment to be deleted.""" + id: ID! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of DeleteDeployment""" +type DeleteDeploymentPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated input type of DeleteIpAllowListEntry""" +input DeleteIpAllowListEntryInput { + """The ID of the IP allow list entry to delete.""" + ipAllowListEntryId: ID! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of DeleteIpAllowListEntry""" +type DeleteIpAllowListEntryPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The IP allow list entry that was deleted.""" + ipAllowListEntry: IpAllowListEntry +} + """Autogenerated input type of DeleteIssueComment""" input DeleteIssueCommentInput { """The ID of the comment to delete.""" @@ -3525,6 +3898,36 @@ type DeleteRefPayload { clientMutationId: String } +"""Autogenerated input type of DeleteTeamDiscussionComment""" +input DeleteTeamDiscussionCommentInput { + """The ID of the comment to delete.""" + id: ID! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of DeleteTeamDiscussionComment""" +type DeleteTeamDiscussionCommentPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated input type of DeleteTeamDiscussion""" +input DeleteTeamDiscussionInput { + """The discussion ID to delete.""" + id: ID! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of DeleteTeamDiscussion""" +type DeleteTeamDiscussionPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + """Represents a 'demilestoned' event on a given issue or pull request.""" type DemilestonedEvent implements Node { """Identifies the actor who performed the event.""" @@ -3622,7 +4025,7 @@ type Deployment implements Node { createdAt: DateTime! """Identifies the actor who triggered the deployment.""" - creator: Actor + creator: Actor! """Identifies the primary key from the database.""" databaseId: Int @@ -3630,13 +4033,19 @@ type Deployment implements Node { """The deployment description.""" description: String - """The environment to which this deployment was made.""" + """The latest environment to which this deployment was made.""" environment: String id: ID! + """The latest environment to which this deployment was made.""" + latestEnvironment: String + """The latest status of this deployment.""" latestStatus: DeploymentStatus + """The original environment to which this deployment was made.""" + originalEnvironment: String + """Extra information that a deployment system might need.""" payload: String @@ -3760,6 +4169,9 @@ enum DeploymentState { """The deployment is in progress.""" IN_PROGRESS + + """The deployment is waiting.""" + WAITING } """Describes the status of a given deployment attempt.""" @@ -3768,7 +4180,7 @@ type DeploymentStatus implements Node { createdAt: DateTime! """Identifies the actor who triggered the deployment.""" - creator: Actor + creator: Actor! """Identifies the deployment associated with status.""" deployment: Deployment! @@ -3838,6 +4250,34 @@ enum DeploymentStatusState { IN_PROGRESS } +"""The possible sides of a diff.""" +enum DiffSide { + """The left side of the diff.""" + LEFT + + """The right side of the diff.""" + RIGHT +} + +"""Represents a 'disconnected' event on a given issue or pull request.""" +type DisconnectedEvent implements Node { + """Identifies the actor who performed the event.""" + actor: Actor + + """Identifies the date and time when the object was created.""" + createdAt: DateTime! + id: ID! + + """Reference originated in a different repository.""" + isCrossRepository: Boolean! + + """Issue or pull request from which the issue was disconnected.""" + source: ReferencedSubject! + + """Issue or pull request which was disconnected.""" + subject: ReferencedSubject! +} + """Autogenerated input type of DismissPullRequestReview""" input DismissPullRequestReviewInput { """The Node ID of the pull request review to modify.""" @@ -3871,109 +4311,79 @@ input DraftPullRequestReviewComment { body: String! } -"""Metadata for an audit entry containing enterprise account information.""" -interface EnterpriseAuditEntryData { - """The HTTP path for this enterprise.""" - enterpriseResourcePath: URI - - """The slug of the enterprise.""" - enterpriseSlug: String - - """The HTTP URL for this enterprise.""" - enterpriseUrl: URI -} - -"""An external identity provisioned by SAML SSO or SCIM.""" -type ExternalIdentity implements Node { - """The GUID for this identity""" - guid: String! - id: ID! - - """Organization invitation for this SCIM-provisioned external identity""" - organizationInvitation: OrganizationInvitation - - """SAML Identity attributes""" - samlIdentity: ExternalIdentitySamlAttributes - - """SCIM Identity attributes""" - scimIdentity: ExternalIdentityScimAttributes +""" +Specifies a review comment thread to be left with a Pull Request Review. +""" +input DraftPullRequestReviewThread { + """Path to the file being commented on.""" + path: String! """ - User linked to this external identity. Will be NULL if this identity has not been claimed by an organization member. + The line of the blob to which the thread refers. The end of the line range for multi-line comments. """ - user: User -} + line: Int! -"""The connection type for ExternalIdentity.""" -type ExternalIdentityConnection { - """A list of edges.""" - edges: [ExternalIdentityEdge] + """ + The side of the diff on which the line resides. For multi-line comments, this is the side for the end of the line range. + """ + side: DiffSide = RIGHT - """A list of nodes.""" - nodes: [ExternalIdentity] + """The first line of the range to which the comment refers.""" + startLine: Int - """Information to aid in pagination.""" - pageInfo: PageInfo! + """The side of the diff on which the start line resides.""" + startSide: DiffSide = RIGHT - """Identifies the total count of items in the connection.""" - totalCount: Int! + """Body of the comment to leave.""" + body: String! } -"""An edge in a connection.""" -type ExternalIdentityEdge { - """A cursor for use in pagination.""" - cursor: String! +""" +An account to manage multiple organizations with consolidated policy and billing. +""" +type Enterprise implements Node { + """A URL pointing to the enterprise's public avatar.""" + avatarUrl( + """The size of the resulting square image.""" + size: Int + ): URI! - """The item at the end of the edge.""" - node: ExternalIdentity -} + """Enterprise billing information visible to enterprise billing managers.""" + billingInfo: EnterpriseBillingInfo -"""SAML attributes for the External Identity""" -type ExternalIdentitySamlAttributes { - """The NameID of the SAML identity""" - nameId: String -} + """Identifies the date and time when the object was created.""" + createdAt: DateTime! -"""SCIM attributes for the External Identity""" -type ExternalIdentityScimAttributes { - """The userName of the SCIM identity""" - username: String -} + """Identifies the primary key from the database.""" + databaseId: Int -"""The connection type for User.""" -type FollowerConnection { - """A list of edges.""" - edges: [UserEdge] + """The description of the enterprise.""" + description: String - """A list of nodes.""" - nodes: [User] + """The description of the enterprise as HTML.""" + descriptionHTML: HTML! + id: ID! - """Information to aid in pagination.""" - pageInfo: PageInfo! + """The location of the enterprise.""" + location: String - """Identifies the total count of items in the connection.""" - totalCount: Int! -} + """A list of users who are members of this enterprise.""" + members( + """Only return members within the organizations with these logins""" + organizationLogins: [String!] -"""The connection type for User.""" -type FollowingConnection { - """A list of edges.""" - edges: [UserEdge] + """The search string to look for.""" + query: String - """A list of nodes.""" - nodes: [User] + """Ordering options for members returned from the connection.""" + orderBy: EnterpriseMemberOrder = {field: LOGIN, direction: ASC} - """Information to aid in pagination.""" - pageInfo: PageInfo! + """The role of the user in the enterprise organization or server.""" + role: EnterpriseUserAccountMembershipRole - """Identifies the total count of items in the connection.""" - totalCount: Int! -} + """Only return members within the selected GitHub Enterprise deployment""" + deployment: EnterpriseUserDeployment -"""A Gist.""" -type Gist implements Node & Starrable & UniformResourceLocatable { - """A list of comments associated with the gist""" - comments( """Returns the elements in the list that come after the specified cursor.""" after: String @@ -3987,25 +4397,19 @@ type Gist implements Node & Starrable & UniformResourceLocatable { """Returns the last _n_ elements from the list.""" last: Int - ): GistCommentConnection! - - """Identifies the date and time when the object was created.""" - createdAt: DateTime! + ): EnterpriseMemberConnection! - """The gist description.""" - description: String + """The name of the enterprise.""" + name: String! - """The files in this gist.""" - files( - """The maximum number of files to return.""" - limit: Int = 10 + """A list of organizations that belong to this enterprise.""" + organizations( + """The search string to look for.""" + query: String - """The oid of the files to return""" - oid: GitObjectID - ): [GistFile] + """Ordering options for organizations returned from the connection.""" + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} - """A list of forks associated with the gist""" - forks( """Returns the elements in the list that come after the specified cursor.""" after: String @@ -4019,32 +4423,22 @@ type Gist implements Node & Starrable & UniformResourceLocatable { """Returns the last _n_ elements from the list.""" last: Int + ): OrganizationConnection! - """Ordering options for gists returned from the connection""" - orderBy: GistOrder - ): GistConnection! - id: ID! - - """Identifies if the gist is a fork.""" - isFork: Boolean! - - """Whether the gist is public or not.""" - isPublic: Boolean! - - """The gist name.""" - name: String! + """Enterprise information only visible to enterprise owners.""" + ownerInfo: EnterpriseOwnerInfo - """The gist owner.""" - owner: RepositoryOwner + """The HTTP path for this enterprise.""" + resourcePath: URI! - """Identifies when the gist was last pushed to.""" - pushedAt: DateTime + """The URL-friendly identifier for the enterprise.""" + slug: String! - """The HTML path to this resource.""" - resourcePath: URI! + """The HTTP URL for this enterprise.""" + url: URI! - """A list of users who have starred this starrable.""" - stargazers( + """A list of user accounts on this enterprise.""" + userAccounts( """Returns the elements in the list that come after the specified cursor.""" after: String @@ -4058,78 +4452,238 @@ type Gist implements Node & Starrable & UniformResourceLocatable { """Returns the last _n_ elements from the list.""" last: Int + ): EnterpriseUserAccountConnection! - """Order for connection""" - orderBy: StarOrder - ): StargazerConnection! + """Is the current viewer an admin of this enterprise?""" + viewerIsAdmin: Boolean! - """Identifies the date and time when the object was last updated.""" - updatedAt: DateTime! + """The URL of the enterprise website.""" + websiteUrl: URI +} - """The HTTP URL for this Gist.""" - url: URI! +"""The connection type for User.""" +type EnterpriseAdministratorConnection { + """A list of edges.""" + edges: [EnterpriseAdministratorEdge] + + """A list of nodes.""" + nodes: [User] + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """Identifies the total count of items in the connection.""" + totalCount: Int! +} + +"""A User who is an administrator of an enterprise.""" +type EnterpriseAdministratorEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of the edge.""" + node: User + + """The role of the administrator.""" + role: EnterpriseAdministratorRole! +} + +""" +An invitation for a user to become an owner or billing manager of an enterprise. +""" +type EnterpriseAdministratorInvitation implements Node { + """Identifies the date and time when the object was created.""" + createdAt: DateTime! + + """The email of the person who was invited to the enterprise.""" + email: String + + """The enterprise the invitation is for.""" + enterprise: Enterprise! + id: ID! + + """The user who was invited to the enterprise.""" + invitee: User + + """The user who created the invitation.""" + inviter: User """ - Returns a boolean indicating whether the viewing user has starred this starrable. + The invitee's pending role in the enterprise (owner or billing_manager). """ - viewerHasStarred: Boolean! + role: EnterpriseAdministratorRole! } -"""Represents a comment on an Gist.""" -type GistComment implements Node & Comment & Deletable & Updatable & UpdatableComment { - """The actor who authored the comment.""" - author: Actor +"""The connection type for EnterpriseAdministratorInvitation.""" +type EnterpriseAdministratorInvitationConnection { + """A list of edges.""" + edges: [EnterpriseAdministratorInvitationEdge] - """Author's association with the gist.""" - authorAssociation: CommentAuthorAssociation! + """A list of nodes.""" + nodes: [EnterpriseAdministratorInvitation] - """Identifies the comment body.""" - body: String! + """Information to aid in pagination.""" + pageInfo: PageInfo! - """The comment body rendered to HTML.""" - bodyHTML: HTML! + """Identifies the total count of items in the connection.""" + totalCount: Int! +} - """The body rendered to text.""" - bodyText: String! +"""An edge in a connection.""" +type EnterpriseAdministratorInvitationEdge { + """A cursor for use in pagination.""" + cursor: String! - """Identifies the date and time when the object was created.""" - createdAt: DateTime! + """The item at the end of the edge.""" + node: EnterpriseAdministratorInvitation +} - """Check if this comment was created via an email reply.""" - createdViaEmail: Boolean! +"""Ordering options for enterprise administrator invitation connections""" +input EnterpriseAdministratorInvitationOrder { + """The field to order enterprise administrator invitations by.""" + field: EnterpriseAdministratorInvitationOrderField! - """Identifies the primary key from the database.""" - databaseId: Int + """The ordering direction.""" + direction: OrderDirection! +} - """The actor who edited the comment.""" - editor: Actor +""" +Properties by which enterprise administrator invitation connections can be ordered. +""" +enum EnterpriseAdministratorInvitationOrderField { + """Order enterprise administrator member invitations by creation time""" + CREATED_AT +} - """The associated gist.""" - gist: Gist! - id: ID! +"""The possible administrator roles in an enterprise account.""" +enum EnterpriseAdministratorRole { + """Represents an owner of the enterprise account.""" + OWNER + + """Represents a billing manager of the enterprise account.""" + BILLING_MANAGER +} + +"""Metadata for an audit entry containing enterprise account information.""" +interface EnterpriseAuditEntryData { + """The HTTP path for this enterprise.""" + enterpriseResourcePath: URI + + """The slug of the enterprise.""" + enterpriseSlug: String + + """The HTTP URL for this enterprise.""" + enterpriseUrl: URI +} + +""" +Enterprise billing information visible to enterprise billing managers and owners. +""" +type EnterpriseBillingInfo { + """The number of licenseable users/emails across the enterprise.""" + allLicensableUsersCount: Int! """ - Check if this comment was edited and includes an edit with the creation data + The number of data packs used by all organizations owned by the enterprise. """ - includesCreatedEdit: Boolean! + assetPacks: Int! - """Returns whether or not a comment has been minimized.""" - isMinimized: Boolean! + """ + The bandwidth quota in GB for all organizations owned by the enterprise. + """ + bandwidthQuota: Float! - """The moment the editor made the last edit""" - lastEditedAt: DateTime + """ + The bandwidth usage in GB for all organizations owned by the enterprise. + """ + bandwidthUsage: Float! - """Returns why the comment was minimized.""" - minimizedReason: String + """The bandwidth usage as a percentage of the bandwidth quota.""" + bandwidthUsagePercentage: Int! - """Identifies when the comment was published at.""" - publishedAt: DateTime + """The storage quota in GB for all organizations owned by the enterprise.""" + storageQuota: Float! - """Identifies the date and time when the object was last updated.""" - updatedAt: DateTime! + """The storage usage in GB for all organizations owned by the enterprise.""" + storageUsage: Float! - """A list of edits to this content.""" - userContentEdits( + """The storage usage as a percentage of the storage quota.""" + storageUsagePercentage: Int! + + """ + The number of available licenses across all owned organizations based on the unique number of billable users. + """ + totalAvailableLicenses: Int! + + """The total number of licenses allocated.""" + totalLicenses: Int! +} + +""" +The possible values for the enterprise default repository permission setting. +""" +enum EnterpriseDefaultRepositoryPermissionSettingValue { + """ + Organizations in the enterprise choose default repository permissions for their members. + """ + NO_POLICY + + """ + Organization members will be able to clone, pull, push, and add new collaborators to all organization repositories. + """ + ADMIN + + """ + Organization members will be able to clone, pull, and push all organization repositories. + """ + WRITE + + """ + Organization members will be able to clone and pull all organization repositories. + """ + READ + + """ + Organization members will only be able to clone and pull public repositories. + """ + NONE +} + +"""The possible values for an enabled/disabled enterprise setting.""" +enum EnterpriseEnabledDisabledSettingValue { + """The setting is enabled for organizations in the enterprise.""" + ENABLED + + """The setting is disabled for organizations in the enterprise.""" + DISABLED + + """There is no policy set for organizations in the enterprise.""" + NO_POLICY +} + +"""The possible values for an enabled/no policy enterprise setting.""" +enum EnterpriseEnabledSettingValue { + """The setting is enabled for organizations in the enterprise.""" + ENABLED + + """There is no policy set for organizations in the enterprise.""" + NO_POLICY +} + +""" +An identity provider configured to provision identities for an enterprise. +""" +type EnterpriseIdentityProvider implements Node { + """ + The digest algorithm used to sign SAML requests for the identity provider. + """ + digestMethod: SamlDigestAlgorithm + + """The enterprise this identity provider belongs to.""" + enterprise: Enterprise + + """ExternalIdentities provisioned by this identity provider.""" + externalIdentities( """Returns the elements in the list that come after the specified cursor.""" after: String @@ -4143,31 +4697,41 @@ type GistComment implements Node & Comment & Deletable & Updatable & UpdatableCo """Returns the last _n_ elements from the list.""" last: Int - ): UserContentEditConnection + ): ExternalIdentityConnection! + id: ID! - """Check if the current viewer can delete this object.""" - viewerCanDelete: Boolean! + """ + The x509 certificate used by the identity provider to sign assertions and responses. + """ + idpCertificate: X509Certificate - """Check if the current viewer can minimize this object.""" - viewerCanMinimize: Boolean! + """The Issuer Entity ID for the SAML identity provider.""" + issuer: String - """Check if the current viewer can update this object.""" - viewerCanUpdate: Boolean! + """ + Recovery codes that can be used by admins to access the enterprise if the identity provider is unavailable. + """ + recoveryCodes: [String!] - """Reasons why the current viewer can not update this comment.""" - viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! + """ + The signature algorithm used to sign SAML requests for the identity provider. + """ + signatureMethod: SamlSignatureAlgorithm - """Did the viewer author this comment.""" - viewerDidAuthor: Boolean! + """The URL endpoint for the identity provider's SAML SSO.""" + ssoUrl: URI } -"""The connection type for GistComment.""" -type GistCommentConnection { +"""An object that is a member of an enterprise.""" +union EnterpriseMember = EnterpriseUserAccount | User + +"""The connection type for EnterpriseMember.""" +type EnterpriseMemberConnection { """A list of edges.""" - edges: [GistCommentEdge] + edges: [EnterpriseMemberEdge] """A list of nodes.""" - nodes: [GistComment] + nodes: [EnterpriseMember] """Information to aid in pagination.""" pageInfo: PageInfo! @@ -4176,22 +4740,73 @@ type GistCommentConnection { totalCount: Int! } -"""An edge in a connection.""" -type GistCommentEdge { +""" +A User who is a member of an enterprise through one or more organizations. +""" +type EnterpriseMemberEdge { """A cursor for use in pagination.""" cursor: String! """The item at the end of the edge.""" - node: GistComment + node: EnterpriseMember } -"""The connection type for Gist.""" -type GistConnection { +"""Ordering options for enterprise member connections.""" +input EnterpriseMemberOrder { + """The field to order enterprise members by.""" + field: EnterpriseMemberOrderField! + + """The ordering direction.""" + direction: OrderDirection! +} + +"""Properties by which enterprise member connections can be ordered.""" +enum EnterpriseMemberOrderField { + """Order enterprise members by login""" + LOGIN + + """Order enterprise members by creation time""" + CREATED_AT +} + +""" +The possible values for the enterprise members can create repositories setting. +""" +enum EnterpriseMembersCanCreateRepositoriesSettingValue { + """ + Organization administrators choose whether to allow members to create repositories. + """ + NO_POLICY + + """Members will be able to create public and private repositories.""" + ALL + + """Members will be able to create only public repositories.""" + PUBLIC + + """Members will be able to create only private repositories.""" + PRIVATE + + """Members will not be able to create public or private repositories.""" + DISABLED +} + +"""The possible values for the members can make purchases setting.""" +enum EnterpriseMembersCanMakePurchasesSettingValue { + """The setting is enabled for organizations in the enterprise.""" + ENABLED + + """The setting is disabled for organizations in the enterprise.""" + DISABLED +} + +"""The connection type for Organization.""" +type EnterpriseOrganizationMembershipConnection { """A list of edges.""" - edges: [GistEdge] + edges: [EnterpriseOrganizationMembershipEdge] """A list of nodes.""" - nodes: [Gist] + nodes: [Organization] """Information to aid in pagination.""" pageInfo: PageInfo! @@ -4200,416 +4815,353 @@ type GistConnection { totalCount: Int! } -"""An edge in a connection.""" -type GistEdge { +"""An enterprise organization that a user is a member of.""" +type EnterpriseOrganizationMembershipEdge { """A cursor for use in pagination.""" cursor: String! """The item at the end of the edge.""" - node: Gist + node: Organization + + """The role of the user in the enterprise membership.""" + role: EnterpriseUserAccountMembershipRole! } -"""A file in a gist.""" -type GistFile { - """ - The file name encoded to remove characters that are invalid in URL paths. - """ - encodedName: String +"""The connection type for User.""" +type EnterpriseOutsideCollaboratorConnection { + """A list of edges.""" + edges: [EnterpriseOutsideCollaboratorEdge] - """The gist file encoding.""" - encoding: String + """A list of nodes.""" + nodes: [User] - """The file extension from the file name.""" - extension: String + """Information to aid in pagination.""" + pageInfo: PageInfo! - """Indicates if this file is an image.""" - isImage: Boolean! + """Identifies the total count of items in the connection.""" + totalCount: Int! +} - """Whether the file's contents were truncated.""" - isTruncated: Boolean! +""" +A User who is an outside collaborator of an enterprise through one or more organizations. +""" +type EnterpriseOutsideCollaboratorEdge { + """A cursor for use in pagination.""" + cursor: String! - """The programming language this file is written in.""" - language: Language + """The item at the end of the edge.""" + node: User - """The gist file name.""" - name: String + """The enterprise organization repositories this user is a member of.""" + repositories( + """Returns the elements in the list that come after the specified cursor.""" + after: String - """The gist file size in bytes.""" - size: Int + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String - """UTF8 text data or null if the file is binary""" - text( - """Optionally truncate the returned file to this length.""" - truncate: Int - ): String -} + """Returns the first _n_ elements from the list.""" + first: Int -"""Ordering options for gist connections""" -input GistOrder { - """The field to order repositories by.""" - field: GistOrderField! + """Returns the last _n_ elements from the list.""" + last: Int - """The ordering direction.""" - direction: OrderDirection! + """Ordering options for repositories.""" + orderBy: RepositoryOrder = {field: NAME, direction: ASC} + ): EnterpriseRepositoryInfoConnection! } -"""Properties by which gist connections can be ordered.""" -enum GistOrderField { - """Order gists by creation time""" - CREATED_AT +"""Enterprise information only visible to enterprise owners.""" +type EnterpriseOwnerInfo { + """A list of all of the administrators for this enterprise.""" + admins( + """The search string to look for.""" + query: String - """Order gists by update time""" - UPDATED_AT + """The role to filter by.""" + role: EnterpriseAdministratorRole - """Order gists by push time""" - PUSHED_AT -} + """Ordering options for administrators returned from the connection.""" + orderBy: EnterpriseMemberOrder = {field: LOGIN, direction: ASC} -"""The privacy of a Gist""" -enum GistPrivacy { - """Public""" - PUBLIC + """Returns the elements in the list that come after the specified cursor.""" + after: String - """Secret""" - SECRET + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String - """Gists that are public and secret""" - ALL -} + """Returns the first _n_ elements from the list.""" + first: Int -"""Represents an actor in a Git commit (ie. an author or committer).""" -type GitActor { - """A URL pointing to the author's public avatar.""" - avatarUrl( - """The size of the resulting square image.""" - size: Int - ): URI! + """Returns the last _n_ elements from the list.""" + last: Int + ): EnterpriseAdministratorConnection! - """The timestamp of the Git action (authoring or committing).""" - date: GitTimestamp + """ + A list of users in the enterprise who currently have two-factor authentication disabled. + """ + affiliatedUsersWithTwoFactorDisabled( + """Returns the elements in the list that come after the specified cursor.""" + after: String - """The email in the Git commit.""" - email: String + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String - """The name in the Git commit.""" - name: String + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + ): UserConnection! """ - The GitHub user corresponding to the email field. Null if no such user exists. + Whether or not affiliated users with two-factor authentication disabled exist in the enterprise. """ - user: User -} + affiliatedUsersWithTwoFactorDisabledExist: Boolean! -"""An edge in a connection.""" -type GitActorEdge { - """A cursor for use in pagination.""" - cursor: String! + """ + The setting value for whether private repository forking is enabled for repositories in organizations in this enterprise. + """ + allowPrivateRepositoryForkingSetting: EnterpriseEnabledDisabledSettingValue! - """The item at the end of the edge.""" - node: GitActor -} + """ + A list of enterprise organizations configured with the provided private repository forking setting value. + """ + allowPrivateRepositoryForkingSettingOrganizations( + """Returns the elements in the list that come after the specified cursor.""" + after: String -"""Represents information about the GitHub instance.""" -type GitHubMetadata { - """Returns a String that's a SHA of `github-services`""" - gitHubServicesSha: GitObjectID! + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String - """IP addresses that users connect to for git operations""" - gitIpAddresses: [String!] + """Returns the first _n_ elements from the list.""" + first: Int - """IP addresses that service hooks are sent from""" - hookIpAddresses: [String!] + """Returns the last _n_ elements from the list.""" + last: Int - """IP addresses that the importer connects from""" - importerIpAddresses: [String!] + """The setting value to find organizations for.""" + value: Boolean! - """Whether or not users are verified""" - isPasswordAuthenticationVerifiable: Boolean! + """Ordering options for organizations with this setting.""" + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + ): OrganizationConnection! - """IP addresses for GitHub Pages' A records""" - pagesIpAddresses: [String!] -} + """ + The setting value for base repository permissions for organizations in this enterprise. + """ + defaultRepositoryPermissionSetting: EnterpriseDefaultRepositoryPermissionSettingValue! -"""Represents a Git object.""" -interface GitObject { - """An abbreviated version of the Git object ID""" - abbreviatedOid: String! + """ + A list of enterprise organizations configured with the provided default repository permission. + """ + defaultRepositoryPermissionSettingOrganizations( + """Returns the elements in the list that come after the specified cursor.""" + after: String - """The HTTP path for this Git object""" - commitResourcePath: URI! + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String - """The HTTP URL for this Git object""" - commitUrl: URI! - id: ID! + """Returns the first _n_ elements from the list.""" + first: Int - """The Git object ID""" - oid: GitObjectID! + """Returns the last _n_ elements from the list.""" + last: Int - """The Repository the Git object belongs to""" - repository: Repository! -} + """The permission to find organizations for.""" + value: DefaultRepositoryPermissionField! -"""A Git object ID.""" -scalar GitObjectID + """Ordering options for organizations with this setting.""" + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + ): OrganizationConnection! -"""Information about a signature (GPG or S/MIME) on a Commit or Tag.""" -interface GitSignature { - """Email used to sign this object.""" - email: String! + """Enterprise Server installations owned by the enterprise.""" + enterpriseServerInstallations( + """Returns the elements in the list that come after the specified cursor.""" + after: String - """True if the signature is valid and verified by GitHub.""" - isValid: Boolean! + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String - """ - Payload for GPG signing object. Raw ODB object without the signature header. - """ - payload: String! + """Returns the first _n_ elements from the list.""" + first: Int - """ASCII-armored signature header from object.""" - signature: String! + """Returns the last _n_ elements from the list.""" + last: Int - """GitHub user corresponding to the email signing this commit.""" - signer: User + """ + Whether or not to only return installations discovered via GitHub Connect. + """ + connectedOnly: Boolean = false + + """Ordering options for Enterprise Server installations returned.""" + orderBy: EnterpriseServerInstallationOrder = {field: HOST_NAME, direction: ASC} + ): EnterpriseServerInstallationConnection! """ - The state of this signature. `VALID` if signature is valid and verified by - GitHub, otherwise represents reason why signature is considered invalid. + The setting value for whether the enterprise has an IP allow list enabled. """ - state: GitSignatureState! - - """True if the signature was made with GitHub's signing key.""" - wasSignedByGitHub: Boolean! -} - -"""The state of a Git signature.""" -enum GitSignatureState { - """Valid signature and verified by GitHub""" - VALID + ipAllowListEnabledSetting: IpAllowListEnabledSettingValue! - """Invalid signature""" - INVALID + """ + The IP addresses that are allowed to access resources owned by the enterprise. + """ + ipAllowListEntries( + """Returns the elements in the list that come after the specified cursor.""" + after: String - """Malformed signature""" - MALFORMED_SIG + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String - """Key used for signing not known to GitHub""" - UNKNOWN_KEY + """Returns the first _n_ elements from the list.""" + first: Int - """Invalid email used for signing""" - BAD_EMAIL + """Returns the last _n_ elements from the list.""" + last: Int - """Email used for signing unverified on GitHub""" - UNVERIFIED_EMAIL + """Ordering options for IP allow list entries returned.""" + orderBy: IpAllowListEntryOrder = {field: ALLOW_LIST_VALUE, direction: ASC} + ): IpAllowListEntryConnection! - """Email used for signing not known to GitHub""" - NO_USER + """ + Whether or not the default repository permission is currently being updated. + """ + isUpdatingDefaultRepositoryPermission: Boolean! - """Unknown signature type""" - UNKNOWN_SIG_TYPE + """ + Whether the two-factor authentication requirement is currently being enforced. + """ + isUpdatingTwoFactorRequirement: Boolean! - """Unsigned""" - UNSIGNED + """ + The setting value for whether organization members with admin permissions on a + repository can change repository visibility. + """ + membersCanChangeRepositoryVisibilitySetting: EnterpriseEnabledDisabledSettingValue! """ - Internal error - the GPG verification service is unavailable at the moment + A list of enterprise organizations configured with the provided can change repository visibility setting value. """ - GPGVERIFY_UNAVAILABLE + membersCanChangeRepositoryVisibilitySettingOrganizations( + """Returns the elements in the list that come after the specified cursor.""" + after: String - """Internal error - the GPG verification service misbehaved""" - GPGVERIFY_ERROR + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String - """The usage flags for the key that signed this don't allow signing""" - NOT_SIGNING_KEY + """Returns the first _n_ elements from the list.""" + first: Int - """Signing key expired""" - EXPIRED_KEY + """Returns the last _n_ elements from the list.""" + last: Int - """Valid signature, pending certificate revocation checking""" - OCSP_PENDING + """The setting value to find organizations for.""" + value: Boolean! - """Valid siganture, though certificate revocation check failed""" - OCSP_ERROR - - """The signing certificate or its chain could not be verified""" - BAD_CERT - - """One or more certificates in chain has been revoked""" - OCSP_REVOKED -} - -"""Git SSH string""" -scalar GitSSHRemote - -""" -An ISO-8601 encoded date string. Unlike the DateTime type, GitTimestamp is not converted in UTC. -""" -scalar GitTimestamp - -"""Represents a GPG signature on a Commit or Tag.""" -type GpgSignature implements GitSignature { - """Email used to sign this object.""" - email: String! - - """True if the signature is valid and verified by GitHub.""" - isValid: Boolean! - - """Hex-encoded ID of the key that signed this object.""" - keyId: String + """Ordering options for organizations with this setting.""" + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + ): OrganizationConnection! """ - Payload for GPG signing object. Raw ODB object without the signature header. + The setting value for whether members of organizations in the enterprise can create internal repositories. """ - payload: String! - - """ASCII-armored signature header from object.""" - signature: String! - - """GitHub user corresponding to the email signing this commit.""" - signer: User + membersCanCreateInternalRepositoriesSetting: Boolean """ - The state of this signature. `VALID` if signature is valid and verified by - GitHub, otherwise represents reason why signature is considered invalid. + The setting value for whether members of organizations in the enterprise can create private repositories. """ - state: GitSignatureState! - - """True if the signature was made with GitHub's signing key.""" - wasSignedByGitHub: Boolean! -} - -"""Represents a 'head_ref_deleted' event on a given pull request.""" -type HeadRefDeletedEvent implements Node { - """Identifies the actor who performed the event.""" - actor: Actor - - """Identifies the date and time when the object was created.""" - createdAt: DateTime! - - """Identifies the Ref associated with the `head_ref_deleted` event.""" - headRef: Ref + membersCanCreatePrivateRepositoriesSetting: Boolean """ - Identifies the name of the Ref associated with the `head_ref_deleted` event. + The setting value for whether members of organizations in the enterprise can create public repositories. """ - headRefName: String! - id: ID! - - """PullRequest referenced by event.""" - pullRequest: PullRequest! -} - -"""Represents a 'head_ref_force_pushed' event on a given pull request.""" -type HeadRefForcePushedEvent implements Node { - """Identifies the actor who performed the event.""" - actor: Actor - - """Identifies the after commit SHA for the 'head_ref_force_pushed' event.""" - afterCommit: Commit + membersCanCreatePublicRepositoriesSetting: Boolean """ - Identifies the before commit SHA for the 'head_ref_force_pushed' event. + The setting value for whether members of organizations in the enterprise can create repositories. """ - beforeCommit: Commit - - """Identifies the date and time when the object was created.""" - createdAt: DateTime! - id: ID! - - """PullRequest referenced by event.""" - pullRequest: PullRequest! + membersCanCreateRepositoriesSetting: EnterpriseMembersCanCreateRepositoriesSettingValue """ - Identifies the fully qualified ref name for the 'head_ref_force_pushed' event. + A list of enterprise organizations configured with the provided repository creation setting value. """ - ref: Ref -} + membersCanCreateRepositoriesSettingOrganizations( + """Returns the elements in the list that come after the specified cursor.""" + after: String -"""Represents a 'head_ref_restored' event on a given pull request.""" -type HeadRefRestoredEvent implements Node { - """Identifies the actor who performed the event.""" - actor: Actor + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String - """Identifies the date and time when the object was created.""" - createdAt: DateTime! - id: ID! + """Returns the first _n_ elements from the list.""" + first: Int - """PullRequest referenced by event.""" - pullRequest: PullRequest! -} + """Returns the last _n_ elements from the list.""" + last: Int -"""A string containing HTML code.""" -scalar HTML + """The setting to find organizations for.""" + value: OrganizationMembersCanCreateRepositoriesSettingValue! -""" -The possible states in which authentication can be configured with an identity provider. -""" -enum IdentityProviderConfigurationState { - """Authentication with an identity provider is configured and enforced.""" - ENFORCED + """Ordering options for organizations with this setting.""" + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + ): OrganizationConnection! """ - Authentication with an identity provider is configured but not enforced. + The setting value for whether members with admin permissions for repositories can delete issues. """ - CONFIGURED - - """Authentication with an identity provider is not configured.""" - UNCONFIGURED -} - -"""Autogenerated input type of ImportProject""" -input ImportProjectInput { - """The name of the Organization or User to create the Project under.""" - ownerName: String! - - """The name of Project.""" - name: String! - - """The description of Project.""" - body: String - - """Whether the Project is public or not.""" - public: Boolean = false - - """A list of columns containing issues and pull requests.""" - columnImports: [ProjectColumnImport!]! + membersCanDeleteIssuesSetting: EnterpriseEnabledDisabledSettingValue! - """A unique identifier for the client performing the mutation.""" - clientMutationId: String -} - -"""An installation on a repository""" -type InstalledAppEdge { - """A cursor for use in pagination.""" - cursor: String! + """ + A list of enterprise organizations configured with the provided members can delete issues setting value. + """ + membersCanDeleteIssuesSettingOrganizations( + """Returns the elements in the list that come after the specified cursor.""" + after: String - """The item at the end of the edge.""" - node: App -} + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String -"""Autogenerated input type of InviteEnterpriseAdmin""" -input InviteEnterpriseAdminInput { - """The ID of the enterprise to which you want to invite an administrator.""" - enterpriseId: ID! + """Returns the first _n_ elements from the list.""" + first: Int - """The login of a user to invite as an administrator.""" - invitee: String + """Returns the last _n_ elements from the list.""" + last: Int - """The email of the person to invite as an administrator.""" - email: String + """The setting value to find organizations for.""" + value: Boolean! - """A unique identifier for the client performing the mutation.""" - clientMutationId: String -} + """Ordering options for organizations with this setting.""" + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + ): OrganizationConnection! -""" -An Issue is a place to discuss ideas, enhancements, tasks, and bugs for a project. -""" -type Issue implements Node & Assignable & Closable & Comment & Updatable & UpdatableComment & Labelable & Lockable & Reactable & RepositoryNode & Subscribable & UniformResourceLocatable { - """Reason that the conversation was locked.""" - activeLockReason: LockReason + """ + The setting value for whether members with admin permissions for repositories can delete or transfer repositories. + """ + membersCanDeleteRepositoriesSetting: EnterpriseEnabledDisabledSettingValue! - """A list of Users assigned to this object.""" - assignees( + """ + A list of enterprise organizations configured with the provided members can delete repositories setting value. + """ + membersCanDeleteRepositoriesSettingOrganizations( """Returns the elements in the list that come after the specified cursor.""" after: String @@ -4623,33 +5175,23 @@ type Issue implements Node & Assignable & Closable & Comment & Updatable & Updat """Returns the last _n_ elements from the list.""" last: Int - ): UserConnection! - - """The actor who authored the comment.""" - author: Actor - """Author's association with the subject of the comment.""" - authorAssociation: CommentAuthorAssociation! - - """Identifies the body of the issue.""" - body: String! - - """Identifies the body of the issue rendered to HTML.""" - bodyHTML: HTML! + """The setting value to find organizations for.""" + value: Boolean! - """Identifies the body of the issue rendered to text.""" - bodyText: String! + """Ordering options for organizations with this setting.""" + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + ): OrganizationConnection! """ - `true` if the object is closed (definition of closed may depend on type) + The setting value for whether members of organizations in the enterprise can invite outside collaborators. """ - closed: Boolean! + membersCanInviteCollaboratorsSetting: EnterpriseEnabledDisabledSettingValue! - """Identifies the date and time when the object was closed.""" - closedAt: DateTime - - """A list of comments associated with the Issue.""" - comments( + """ + A list of enterprise organizations configured with the provided members can invite collaborators setting value. + """ + membersCanInviteCollaboratorsSettingOrganizations( """Returns the elements in the list that come after the specified cursor.""" after: String @@ -4663,28 +5205,28 @@ type Issue implements Node & Assignable & Closable & Comment & Updatable & Updat """Returns the last _n_ elements from the list.""" last: Int - ): IssueCommentConnection! - """Identifies the date and time when the object was created.""" - createdAt: DateTime! - - """Check if this comment was created via an email reply.""" - createdViaEmail: Boolean! + """The setting value to find organizations for.""" + value: Boolean! - """Identifies the primary key from the database.""" - databaseId: Int + """Ordering options for organizations with this setting.""" + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + ): OrganizationConnection! - """The actor who edited the comment.""" - editor: Actor - id: ID! + """ + Indicates whether members of this enterprise's organizations can purchase additional services for those organizations. + """ + membersCanMakePurchasesSetting: EnterpriseMembersCanMakePurchasesSettingValue! """ - Check if this comment was edited and includes an edit with the creation data + The setting value for whether members with admin permissions for repositories can update protected branches. """ - includesCreatedEdit: Boolean! + membersCanUpdateProtectedBranchesSetting: EnterpriseEnabledDisabledSettingValue! - """A list of labels associated with the object.""" - labels( + """ + A list of enterprise organizations configured with the provided members can update protected branches setting value. + """ + membersCanUpdateProtectedBranchesSettingOrganizations( """Returns the elements in the list that come after the specified cursor.""" after: String @@ -4698,22 +5240,21 @@ type Issue implements Node & Assignable & Closable & Comment & Updatable & Updat """Returns the last _n_ elements from the list.""" last: Int - ): LabelConnection - """The moment the editor made the last edit""" - lastEditedAt: DateTime - - """`true` if the object is locked""" - locked: Boolean! + """The setting value to find organizations for.""" + value: Boolean! - """Identifies the milestone associated with the issue.""" - milestone: Milestone + """Ordering options for organizations with this setting.""" + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + ): OrganizationConnection! - """Identifies the issue number.""" - number: Int! + """The setting value for whether members can view dependency insights.""" + membersCanViewDependencyInsightsSetting: EnterpriseEnabledDisabledSettingValue! - """A list of Users that are participating in the Issue conversation.""" - participants( + """ + A list of enterprise organizations configured with the provided members can view dependency insights setting value. + """ + membersCanViewDependencyInsightsSettingOrganizations( """Returns the elements in the list that come after the specified cursor.""" after: String @@ -4727,10 +5268,23 @@ type Issue implements Node & Assignable & Closable & Comment & Updatable & Updat """Returns the last _n_ elements from the list.""" last: Int - ): UserConnection! - """List of project cards associated with this issue.""" - projectCards( + """The setting value to find organizations for.""" + value: Boolean! + + """Ordering options for organizations with this setting.""" + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + ): OrganizationConnection! + + """ + The setting value for whether organization projects are enabled for organizations in this enterprise. + """ + organizationProjectsSetting: EnterpriseEnabledDisabledSettingValue! + + """ + A list of enterprise organizations configured with the provided organization projects setting value. + """ + organizationProjectsSettingOrganizations( """Returns the elements in the list that come after the specified cursor.""" after: String @@ -4745,18 +5299,33 @@ type Issue implements Node & Assignable & Closable & Comment & Updatable & Updat """Returns the last _n_ elements from the list.""" last: Int - """A list of archived states to filter the cards by""" - archivedStates: [ProjectCardArchivedState] = [ARCHIVED, NOT_ARCHIVED] - ): ProjectCardConnection! + """The setting value to find organizations for.""" + value: Boolean! - """Identifies when the comment was published at.""" - publishedAt: DateTime + """Ordering options for organizations with this setting.""" + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + ): OrganizationConnection! - """A list of reactions grouped by content left on the subject.""" - reactionGroups: [ReactionGroup!] + """ + A list of outside collaborators across the repositories in the enterprise. + """ + outsideCollaborators( + """The login of one specific outside collaborator.""" + login: String + + """The search string to look for.""" + query: String + + """ + Ordering options for outside collaborators returned from the connection. + """ + orderBy: EnterpriseMemberOrder = {field: LOGIN, direction: ASC} + + """ + Only return outside collaborators on repositories with this visibility. + """ + visibility: RepositoryVisibility - """A list of Reactions left on the Issue.""" - reactions( """Returns the elements in the list that come after the specified cursor.""" after: String @@ -4770,33 +5339,47 @@ type Issue implements Node & Assignable & Closable & Comment & Updatable & Updat """Returns the last _n_ elements from the list.""" last: Int + ): EnterpriseOutsideCollaboratorConnection! - """Allows filtering Reactions by emoji.""" - content: ReactionContent + """A list of pending administrator invitations for the enterprise.""" + pendingAdminInvitations( + """The search string to look for.""" + query: String - """Allows specifying the order in which reactions are returned.""" - orderBy: ReactionOrder - ): ReactionConnection! + """ + Ordering options for pending enterprise administrator invitations returned from the connection. + """ + orderBy: EnterpriseAdministratorInvitationOrder = {field: CREATED_AT, direction: DESC} - """The repository associated with this node.""" - repository: Repository! + """The role to filter by.""" + role: EnterpriseAdministratorRole - """The HTTP path for this issue""" - resourcePath: URI! + """Returns the elements in the list that come after the specified cursor.""" + after: String - """Identifies the state of the issue.""" - state: IssueState! + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String - """A list of events, comments, commits, etc. associated with the issue.""" - timelineItems( - """Filter timeline items by a `since` timestamp.""" - since: DateTime + """Returns the first _n_ elements from the list.""" + first: Int - """Skips the first _n_ elements in the list.""" - skip: Int + """Returns the last _n_ elements from the list.""" + last: Int + ): EnterpriseAdministratorInvitationConnection! - """Filter timeline items by type.""" - itemTypes: [IssueTimelineItemsItemType!] + """ + A list of pending collaborator invitations across the repositories in the enterprise. + """ + pendingCollaboratorInvitations( + """The search string to look for.""" + query: String + + """ + Ordering options for pending repository collaborator invitations returned from the connection. + """ + orderBy: RepositoryInvitationOrder = {field: CREATED_AT, direction: DESC} """Returns the elements in the list that come after the specified cursor.""" after: String @@ -4811,19 +5394,15 @@ type Issue implements Node & Assignable & Closable & Comment & Updatable & Updat """Returns the last _n_ elements from the list.""" last: Int - ): IssueTimelineItemsConnection! - - """Identifies the issue title.""" - title: String! - - """Identifies the date and time when the object was last updated.""" - updatedAt: DateTime! + ): RepositoryInvitationConnection! - """The HTTP URL for this issue""" - url: URI! + """ + A list of pending member invitations for organizations in the enterprise. + """ + pendingMemberInvitations( + """The search string to look for.""" + query: String - """A list of edits to this content.""" - userContentEdits( """Returns the elements in the list that come after the specified cursor.""" after: String @@ -4837,93 +5416,105 @@ type Issue implements Node & Assignable & Closable & Comment & Updatable & Updat """Returns the last _n_ elements from the list.""" last: Int - ): UserContentEditConnection + ): EnterprisePendingMemberInvitationConnection! - """Can user react to this subject""" - viewerCanReact: Boolean! + """ + The setting value for whether repository projects are enabled in this enterprise. + """ + repositoryProjectsSetting: EnterpriseEnabledDisabledSettingValue! """ - Check if the viewer is able to change their subscription status for the repository. + A list of enterprise organizations configured with the provided repository projects setting value. """ - viewerCanSubscribe: Boolean! + repositoryProjectsSettingOrganizations( + """Returns the elements in the list that come after the specified cursor.""" + after: String - """Check if the current viewer can update this object.""" - viewerCanUpdate: Boolean! + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String - """Reasons why the current viewer can not update this comment.""" - viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! + """Returns the first _n_ elements from the list.""" + first: Int - """Did the viewer author this comment.""" - viewerDidAuthor: Boolean! + """Returns the last _n_ elements from the list.""" + last: Int - """ - Identifies if the viewer is watching, not watching, or ignoring the subscribable entity. - """ - viewerSubscription: SubscriptionState -} + """The setting value to find organizations for.""" + value: Boolean! -"""Represents a comment on an Issue.""" -type IssueComment implements Node & Comment & Deletable & Updatable & UpdatableComment & Reactable & RepositoryNode { - """The actor who authored the comment.""" - author: Actor + """Ordering options for organizations with this setting.""" + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + ): OrganizationConnection! - """Author's association with the subject of the comment.""" - authorAssociation: CommentAuthorAssociation! + """The SAML Identity Provider for the enterprise.""" + samlIdentityProvider: EnterpriseIdentityProvider - """The body as Markdown.""" - body: String! + """ + A list of enterprise organizations configured with the SAML single sign-on setting value. + """ + samlIdentityProviderSettingOrganizations( + """Returns the elements in the list that come after the specified cursor.""" + after: String - """The body rendered to HTML.""" - bodyHTML: HTML! + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String - """The body rendered to text.""" - bodyText: String! + """Returns the first _n_ elements from the list.""" + first: Int - """Identifies the date and time when the object was created.""" - createdAt: DateTime! + """Returns the last _n_ elements from the list.""" + last: Int - """Check if this comment was created via an email reply.""" - createdViaEmail: Boolean! + """The setting value to find organizations for.""" + value: IdentityProviderConfigurationState! - """Identifies the primary key from the database.""" - databaseId: Int + """Ordering options for organizations with this setting.""" + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + ): OrganizationConnection! - """The actor who edited the comment.""" - editor: Actor - id: ID! + """ + The setting value for whether team discussions are enabled for organizations in this enterprise. + """ + teamDiscussionsSetting: EnterpriseEnabledDisabledSettingValue! """ - Check if this comment was edited and includes an edit with the creation data + A list of enterprise organizations configured with the provided team discussions setting value. """ - includesCreatedEdit: Boolean! + teamDiscussionsSettingOrganizations( + """Returns the elements in the list that come after the specified cursor.""" + after: String - """Returns whether or not a comment has been minimized.""" - isMinimized: Boolean! + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String - """Identifies the issue associated with the comment.""" - issue: Issue! + """Returns the first _n_ elements from the list.""" + first: Int - """The moment the editor made the last edit""" - lastEditedAt: DateTime + """Returns the last _n_ elements from the list.""" + last: Int - """Returns why the comment was minimized.""" - minimizedReason: String + """The setting value to find organizations for.""" + value: Boolean! - """Identifies when the comment was published at.""" - publishedAt: DateTime + """Ordering options for organizations with this setting.""" + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + ): OrganizationConnection! """ - Returns the pull request associated with the comment, if this comment was made on a - pull request. - + The setting value for whether the enterprise requires two-factor authentication for its organizations and users. """ - pullRequest: PullRequest + twoFactorRequiredSetting: EnterpriseEnabledSettingValue! - """A list of reactions grouped by content left on the subject.""" - reactionGroups: [ReactionGroup!] - - """A list of Reactions left on the Issue.""" - reactions( + """ + A list of enterprise organizations configured with the two-factor authentication setting value. + """ + twoFactorRequiredSettingOrganizations( """Returns the elements in the list that come after the specified cursor.""" after: String @@ -4938,27 +5529,41 @@ type IssueComment implements Node & Comment & Deletable & Updatable & UpdatableC """Returns the last _n_ elements from the list.""" last: Int - """Allows filtering Reactions by emoji.""" - content: ReactionContent + """The setting value to find organizations for.""" + value: Boolean! - """Allows specifying the order in which reactions are returned.""" - orderBy: ReactionOrder - ): ReactionConnection! + """Ordering options for organizations with this setting.""" + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} + ): OrganizationConnection! +} - """The repository associated with this node.""" - repository: Repository! +"""The connection type for User.""" +type EnterprisePendingCollaboratorConnection { + """A list of edges.""" + edges: [EnterprisePendingCollaboratorEdge] - """The HTTP path for this issue comment""" - resourcePath: URI! + """A list of nodes.""" + nodes: [User] - """Identifies the date and time when the object was last updated.""" - updatedAt: DateTime! + """Information to aid in pagination.""" + pageInfo: PageInfo! - """The HTTP URL for this issue comment""" - url: URI! + """Identifies the total count of items in the connection.""" + totalCount: Int! +} - """A list of edits to this content.""" - userContentEdits( +""" +A user with an invitation to be a collaborator on a repository owned by an organization in an enterprise. +""" +type EnterprisePendingCollaboratorEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of the edge.""" + node: User + + """The enterprise organization repositories this user is a member of.""" + repositories( """Returns the elements in the list that come after the specified cursor.""" after: String @@ -4972,58 +5577,60 @@ type IssueComment implements Node & Comment & Deletable & Updatable & UpdatableC """Returns the last _n_ elements from the list.""" last: Int - ): UserContentEditConnection - - """Check if the current viewer can delete this object.""" - viewerCanDelete: Boolean! - - """Check if the current viewer can minimize this object.""" - viewerCanMinimize: Boolean! - - """Can user react to this subject""" - viewerCanReact: Boolean! - - """Check if the current viewer can update this object.""" - viewerCanUpdate: Boolean! - - """Reasons why the current viewer can not update this comment.""" - viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! - """Did the viewer author this comment.""" - viewerDidAuthor: Boolean! + """Ordering options for repositories.""" + orderBy: RepositoryOrder = {field: NAME, direction: ASC} + ): EnterpriseRepositoryInfoConnection! } -"""The connection type for IssueComment.""" -type IssueCommentConnection { +"""The connection type for OrganizationInvitation.""" +type EnterprisePendingMemberInvitationConnection { """A list of edges.""" - edges: [IssueCommentEdge] + edges: [EnterprisePendingMemberInvitationEdge] """A list of nodes.""" - nodes: [IssueComment] + nodes: [OrganizationInvitation] """Information to aid in pagination.""" pageInfo: PageInfo! """Identifies the total count of items in the connection.""" totalCount: Int! + + """Identifies the total count of unique users in the connection.""" + totalUniqueUserCount: Int! } -"""An edge in a connection.""" -type IssueCommentEdge { +"""An invitation to be a member in an enterprise organization.""" +type EnterprisePendingMemberInvitationEdge { """A cursor for use in pagination.""" cursor: String! """The item at the end of the edge.""" - node: IssueComment + node: OrganizationInvitation } -"""The connection type for Issue.""" -type IssueConnection { +"""A subset of repository information queryable from an enterprise.""" +type EnterpriseRepositoryInfo implements Node { + id: ID! + + """Identifies if the repository is private.""" + isPrivate: Boolean! + + """The repository's name.""" + name: String! + + """The repository's name with owner.""" + nameWithOwner: String! +} + +"""The connection type for EnterpriseRepositoryInfo.""" +type EnterpriseRepositoryInfoConnection { """A list of edges.""" - edges: [IssueEdge] + edges: [EnterpriseRepositoryInfoEdge] """A list of nodes.""" - nodes: [Issue] + nodes: [EnterpriseRepositoryInfo] """Information to aid in pagination.""" pageInfo: PageInfo! @@ -5032,10 +5639,42 @@ type IssueConnection { totalCount: Int! } -"""This aggregates issues opened by a user within one repository.""" -type IssueContributionsByRepository { - """The issue contributions.""" - contributions( +"""An edge in a connection.""" +type EnterpriseRepositoryInfoEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of the edge.""" + node: EnterpriseRepositoryInfo +} + +"""An Enterprise Server installation.""" +type EnterpriseServerInstallation implements Node { + """Identifies the date and time when the object was created.""" + createdAt: DateTime! + + """The customer name to which the Enterprise Server installation belongs.""" + customerName: String! + + """The host name of the Enterprise Server installation.""" + hostName: String! + id: ID! + + """ + Whether or not the installation is connected to an Enterprise Server installation via GitHub Connect. + """ + isConnected: Boolean! + + """Identifies the date and time when the object was last updated.""" + updatedAt: DateTime! + + """User accounts on this Enterprise Server installation.""" + userAccounts( + """ + Ordering options for Enterprise Server user accounts returned from the connection. + """ + orderBy: EnterpriseServerUserAccountOrder = {field: LOGIN, direction: ASC} + """Returns the elements in the list that come after the specified cursor.""" after: String @@ -5049,122 +5688,188 @@ type IssueContributionsByRepository { """Returns the last _n_ elements from the list.""" last: Int + ): EnterpriseServerUserAccountConnection! - """Ordering options for contributions returned from the connection.""" - orderBy: ContributionOrder - ): CreatedIssueContributionConnection! + """User accounts uploads for the Enterprise Server installation.""" + userAccountsUploads( + """ + Ordering options for Enterprise Server user accounts uploads returned from the connection. + """ + orderBy: EnterpriseServerUserAccountsUploadOrder = {field: CREATED_AT, direction: DESC} - """The repository in which the issues were opened.""" - repository: Repository! + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + ): EnterpriseServerUserAccountsUploadConnection! +} + +"""The connection type for EnterpriseServerInstallation.""" +type EnterpriseServerInstallationConnection { + """A list of edges.""" + edges: [EnterpriseServerInstallationEdge] + + """A list of nodes.""" + nodes: [EnterpriseServerInstallation] + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """Identifies the total count of items in the connection.""" + totalCount: Int! } """An edge in a connection.""" -type IssueEdge { +type EnterpriseServerInstallationEdge { """A cursor for use in pagination.""" cursor: String! """The item at the end of the edge.""" - node: Issue + node: EnterpriseServerInstallation } -"""Ways in which to filter lists of issues.""" -input IssueFilters { - """ - List issues assigned to given name. Pass in `null` for issues with no assigned - user, and `*` for issues assigned to any user. - """ - assignee: String +"""Ordering options for Enterprise Server installation connections.""" +input EnterpriseServerInstallationOrder { + """The field to order Enterprise Server installations by.""" + field: EnterpriseServerInstallationOrderField! - """List issues created by given name.""" - createdBy: String + """The ordering direction.""" + direction: OrderDirection! +} - """List issues where the list of label names exist on the issue.""" - labels: [String!] +""" +Properties by which Enterprise Server installation connections can be ordered. +""" +enum EnterpriseServerInstallationOrderField { + """Order Enterprise Server installations by host name""" + HOST_NAME - """List issues where the given name is mentioned in the issue.""" - mentioned: String + """Order Enterprise Server installations by customer name""" + CUSTOMER_NAME + + """Order Enterprise Server installations by creation time""" + CREATED_AT +} + +"""A user account on an Enterprise Server installation.""" +type EnterpriseServerUserAccount implements Node { + """Identifies the date and time when the object was created.""" + createdAt: DateTime! + + """User emails belonging to this user account.""" + emails( + """ + Ordering options for Enterprise Server user account emails returned from the connection. + """ + orderBy: EnterpriseServerUserAccountEmailOrder = {field: EMAIL, direction: ASC} + + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + ): EnterpriseServerUserAccountEmailConnection! + + """The Enterprise Server installation on which this user account exists.""" + enterpriseServerInstallation: EnterpriseServerInstallation! + id: ID! """ - List issues by given milestone argument. If an string representation of an - integer is passed, it should refer to a milestone by its number field. Pass in - `null` for issues with no milestone, and `*` for issues that are assigned to any milestone. + Whether the user account is a site administrator on the Enterprise Server installation. """ - milestone: String + isSiteAdmin: Boolean! - """List issues that have been updated at or after the given date.""" - since: DateTime + """The login of the user account on the Enterprise Server installation.""" + login: String! - """List issues filtered by the list of states given.""" - states: [IssueState!] + """ + The profile name of the user account on the Enterprise Server installation. + """ + profileName: String - """List issues subscribed to by viewer.""" - viewerSubscribed: Boolean = false -} + """ + The date and time when the user account was created on the Enterprise Server installation. + """ + remoteCreatedAt: DateTime! -"""Ways in which lists of issues can be ordered upon return.""" -input IssueOrder { - """The field in which to order issues by.""" - field: IssueOrderField! + """The ID of the user account on the Enterprise Server installation.""" + remoteUserId: Int! - """The direction in which to order issues by the specified field.""" - direction: OrderDirection! + """Identifies the date and time when the object was last updated.""" + updatedAt: DateTime! } -"""Properties by which issue connections can be ordered.""" -enum IssueOrderField { - """Order issues by creation time""" - CREATED_AT +"""The connection type for EnterpriseServerUserAccount.""" +type EnterpriseServerUserAccountConnection { + """A list of edges.""" + edges: [EnterpriseServerUserAccountEdge] - """Order issues by update time""" - UPDATED_AT + """A list of nodes.""" + nodes: [EnterpriseServerUserAccount] - """Order issues by comment count""" - COMMENTS -} + """Information to aid in pagination.""" + pageInfo: PageInfo! -"""Used for return value of Repository.issueOrPullRequest.""" -union IssueOrPullRequest = Issue | PullRequest + """Identifies the total count of items in the connection.""" + totalCount: Int! +} """An edge in a connection.""" -type IssueOrPullRequestEdge { +type EnterpriseServerUserAccountEdge { """A cursor for use in pagination.""" cursor: String! """The item at the end of the edge.""" - node: IssueOrPullRequest + node: EnterpriseServerUserAccount } -"""The possible PubSub channels for an issue.""" -enum IssuePubSubTopic { - """The channel ID for observing issue updates.""" - UPDATED - - """The channel ID for marking an issue as read.""" - MARKASREAD +""" +An email belonging to a user account on an Enterprise Server installation. +""" +type EnterpriseServerUserAccountEmail implements Node { + """Identifies the date and time when the object was created.""" + createdAt: DateTime! - """The channel ID for updating items on the issue timeline.""" - TIMELINE + """The email address.""" + email: String! + id: ID! - """The channel ID for observing issue state updates.""" - STATE -} + """ + Indicates whether this is the primary email of the associated user account. + """ + isPrimary: Boolean! -"""The possible states of an issue.""" -enum IssueState { - """An issue that is still open""" - OPEN + """Identifies the date and time when the object was last updated.""" + updatedAt: DateTime! - """An issue that has been closed""" - CLOSED + """The user account to which the email belongs.""" + userAccount: EnterpriseServerUserAccount! } -"""The connection type for IssueTimelineItem.""" -type IssueTimelineConnection { +"""The connection type for EnterpriseServerUserAccountEmail.""" +type EnterpriseServerUserAccountEmailConnection { """A list of edges.""" - edges: [IssueTimelineItemEdge] + edges: [EnterpriseServerUserAccountEmailEdge] """A list of nodes.""" - nodes: [IssueTimelineItem] + nodes: [EnterpriseServerUserAccountEmail] """Information to aid in pagination.""" pageInfo: PageInfo! @@ -5173,297 +5878,357 @@ type IssueTimelineConnection { totalCount: Int! } -"""An item in an issue timeline""" -union IssueTimelineItem = Commit | IssueComment | CrossReferencedEvent | ClosedEvent | ReopenedEvent | SubscribedEvent | UnsubscribedEvent | ReferencedEvent | AssignedEvent | UnassignedEvent | LabeledEvent | UnlabeledEvent | UserBlockedEvent | MilestonedEvent | DemilestonedEvent | RenamedTitleEvent | LockedEvent | UnlockedEvent | TransferredEvent - """An edge in a connection.""" -type IssueTimelineItemEdge { +type EnterpriseServerUserAccountEmailEdge { """A cursor for use in pagination.""" cursor: String! """The item at the end of the edge.""" - node: IssueTimelineItem + node: EnterpriseServerUserAccountEmail } -"""An item in an issue timeline""" -union IssueTimelineItems = IssueComment | CrossReferencedEvent | AddedToProjectEvent | AssignedEvent | ClosedEvent | CommentDeletedEvent | ConvertedNoteToIssueEvent | DemilestonedEvent | LabeledEvent | LockedEvent | MarkedAsDuplicateEvent | MentionedEvent | MilestonedEvent | MovedColumnsInProjectEvent | PinnedEvent | ReferencedEvent | RemovedFromProjectEvent | RenamedTitleEvent | ReopenedEvent | SubscribedEvent | TransferredEvent | UnassignedEvent | UnlabeledEvent | UnlockedEvent | UserBlockedEvent | UnpinnedEvent | UnsubscribedEvent +"""Ordering options for Enterprise Server user account email connections.""" +input EnterpriseServerUserAccountEmailOrder { + """The field to order emails by.""" + field: EnterpriseServerUserAccountEmailOrderField! -"""The connection type for IssueTimelineItems.""" -type IssueTimelineItemsConnection { - """A list of edges.""" - edges: [IssueTimelineItemsEdge] + """The ordering direction.""" + direction: OrderDirection! +} + +""" +Properties by which Enterprise Server user account email connections can be ordered. +""" +enum EnterpriseServerUserAccountEmailOrderField { + """Order emails by email""" + EMAIL +} + +"""Ordering options for Enterprise Server user account connections.""" +input EnterpriseServerUserAccountOrder { + """The field to order user accounts by.""" + field: EnterpriseServerUserAccountOrderField! + + """The ordering direction.""" + direction: OrderDirection! +} + +""" +Properties by which Enterprise Server user account connections can be ordered. +""" +enum EnterpriseServerUserAccountOrderField { + """Order user accounts by login""" + LOGIN """ - Identifies the count of items after applying `before` and `after` filters. + Order user accounts by creation time on the Enterprise Server installation """ - filteredCount: Int! + REMOTE_CREATED_AT +} - """A list of nodes.""" - nodes: [IssueTimelineItems] +"""A user accounts upload from an Enterprise Server installation.""" +type EnterpriseServerUserAccountsUpload implements Node { + """Identifies the date and time when the object was created.""" + createdAt: DateTime! + + """The enterprise to which this upload belongs.""" + enterprise: Enterprise! """ - Identifies the count of items after applying `before`/`after` filters and `first`/`last`/`skip` slicing. + The Enterprise Server installation for which this upload was generated. """ - pageCount: Int! + enterpriseServerInstallation: EnterpriseServerInstallation! + id: ID! + + """The name of the file uploaded.""" + name: String! + + """The synchronization state of the upload""" + syncState: EnterpriseServerUserAccountsUploadSyncState! + + """Identifies the date and time when the object was last updated.""" + updatedAt: DateTime! +} + +"""The connection type for EnterpriseServerUserAccountsUpload.""" +type EnterpriseServerUserAccountsUploadConnection { + """A list of edges.""" + edges: [EnterpriseServerUserAccountsUploadEdge] + + """A list of nodes.""" + nodes: [EnterpriseServerUserAccountsUpload] """Information to aid in pagination.""" pageInfo: PageInfo! """Identifies the total count of items in the connection.""" totalCount: Int! - - """Identifies the date and time when the timeline was last updated.""" - updatedAt: DateTime! } """An edge in a connection.""" -type IssueTimelineItemsEdge { +type EnterpriseServerUserAccountsUploadEdge { """A cursor for use in pagination.""" cursor: String! """The item at the end of the edge.""" - node: IssueTimelineItems + node: EnterpriseServerUserAccountsUpload } -"""The possible item types found in a timeline.""" -enum IssueTimelineItemsItemType { - """Represents a comment on an Issue.""" - ISSUE_COMMENT - - """Represents a mention made by one issue or pull request to another.""" - CROSS_REFERENCED_EVENT +""" +Ordering options for Enterprise Server user accounts upload connections. +""" +input EnterpriseServerUserAccountsUploadOrder { + """The field to order user accounts uploads by.""" + field: EnterpriseServerUserAccountsUploadOrderField! - """ - Represents a 'added_to_project' event on a given issue or pull request. - """ - ADDED_TO_PROJECT_EVENT + """The ordering direction.""" + direction: OrderDirection! +} - """Represents an 'assigned' event on any assignable object.""" - ASSIGNED_EVENT +""" +Properties by which Enterprise Server user accounts upload connections can be ordered. +""" +enum EnterpriseServerUserAccountsUploadOrderField { + """Order user accounts uploads by creation time""" + CREATED_AT +} - """Represents a 'closed' event on any `Closable`.""" - CLOSED_EVENT +"""Synchronization state of the Enterprise Server user accounts upload""" +enum EnterpriseServerUserAccountsUploadSyncState { + """The synchronization of the upload is pending.""" + PENDING - """Represents a 'comment_deleted' event on a given issue or pull request.""" - COMMENT_DELETED_EVENT + """The synchronization of the upload succeeded.""" + SUCCESS - """ - Represents a 'converted_note_to_issue' event on a given issue or pull request. - """ - CONVERTED_NOTE_TO_ISSUE_EVENT + """The synchronization of the upload failed.""" + FAILURE +} - """Represents a 'demilestoned' event on a given issue or pull request.""" - DEMILESTONED_EVENT +""" +An account for a user who is an admin of an enterprise or a member of an enterprise through one or more organizations. +""" +type EnterpriseUserAccount implements Node & Actor { + """A URL pointing to the enterprise user account's public avatar.""" + avatarUrl( + """The size of the resulting square image.""" + size: Int + ): URI! - """Represents a 'labeled' event on a given issue or pull request.""" - LABELED_EVENT + """Identifies the date and time when the object was created.""" + createdAt: DateTime! - """Represents a 'locked' event on a given issue or pull request.""" - LOCKED_EVENT + """The enterprise in which this user account exists.""" + enterprise: Enterprise! + id: ID! """ - Represents a 'marked_as_duplicate' event on a given issue or pull request. + An identifier for the enterprise user account, a login or email address """ - MARKED_AS_DUPLICATE_EVENT + login: String! - """Represents a 'mentioned' event on a given issue or pull request.""" - MENTIONED_EVENT + """The name of the enterprise user account""" + name: String - """Represents a 'milestoned' event on a given issue or pull request.""" - MILESTONED_EVENT + """A list of enterprise organizations this user is a member of.""" + organizations( + """The search string to look for.""" + query: String - """ - Represents a 'moved_columns_in_project' event on a given issue or pull request. - """ - MOVED_COLUMNS_IN_PROJECT_EVENT + """Ordering options for organizations returned from the connection.""" + orderBy: OrganizationOrder = {field: LOGIN, direction: ASC} - """Represents a 'pinned' event on a given issue or pull request.""" - PINNED_EVENT + """The role of the user in the enterprise organization.""" + role: EnterpriseUserAccountMembershipRole - """Represents a 'referenced' event on a given `ReferencedSubject`.""" - REFERENCED_EVENT + """Returns the elements in the list that come after the specified cursor.""" + after: String - """ - Represents a 'removed_from_project' event on a given issue or pull request. - """ - REMOVED_FROM_PROJECT_EVENT + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String - """Represents a 'renamed' event on a given issue or pull request""" - RENAMED_TITLE_EVENT + """Returns the first _n_ elements from the list.""" + first: Int - """Represents a 'reopened' event on any `Closable`.""" - REOPENED_EVENT + """Returns the last _n_ elements from the list.""" + last: Int + ): EnterpriseOrganizationMembershipConnection! - """Represents a 'subscribed' event on a given `Subscribable`.""" - SUBSCRIBED_EVENT + """The HTTP path for this user.""" + resourcePath: URI! - """Represents a 'transferred' event on a given issue or pull request.""" - TRANSFERRED_EVENT + """Identifies the date and time when the object was last updated.""" + updatedAt: DateTime! - """Represents an 'unassigned' event on any assignable object.""" - UNASSIGNED_EVENT + """The HTTP URL for this user.""" + url: URI! - """Represents an 'unlabeled' event on a given issue or pull request.""" - UNLABELED_EVENT + """The user within the enterprise.""" + user: User +} - """Represents an 'unlocked' event on a given issue or pull request.""" - UNLOCKED_EVENT +"""The connection type for EnterpriseUserAccount.""" +type EnterpriseUserAccountConnection { + """A list of edges.""" + edges: [EnterpriseUserAccountEdge] - """Represents a 'user_blocked' event on a given user.""" - USER_BLOCKED_EVENT + """A list of nodes.""" + nodes: [EnterpriseUserAccount] - """Represents an 'unpinned' event on a given issue or pull request.""" - UNPINNED_EVENT + """Information to aid in pagination.""" + pageInfo: PageInfo! - """Represents an 'unsubscribed' event on a given `Subscribable`.""" - UNSUBSCRIBED_EVENT + """Identifies the total count of items in the connection.""" + totalCount: Int! } -"""Represents a user signing up for a GitHub account.""" -type JoinedGitHubContribution implements Contribution { - """ - Whether this contribution is associated with a record you do not have access to. For - example, your own 'first issue' contribution may have been made on a repository you can no - longer access. - - """ - isRestricted: Boolean! - - """When this contribution was made.""" - occurredAt: DateTime! +"""An edge in a connection.""" +type EnterpriseUserAccountEdge { + """A cursor for use in pagination.""" + cursor: String! - """The HTTP path for this contribution.""" - resourcePath: URI! + """The item at the end of the edge.""" + node: EnterpriseUserAccount +} - """The HTTP URL for this contribution.""" - url: URI! +"""The possible roles for enterprise membership.""" +enum EnterpriseUserAccountMembershipRole { + """The user is a member of the enterprise membership.""" + MEMBER - """ - The user who made this contribution. - - """ - user: User! + """The user is an owner of the enterprise membership.""" + OWNER } -"""A label for categorizing Issues or Milestones with a given Repository.""" -type Label implements Node { - """Identifies the label color.""" - color: String! +"""The possible GitHub Enterprise deployments where this user can exist.""" +enum EnterpriseUserDeployment { + """The user is part of a GitHub Enterprise Cloud deployment.""" + CLOUD - """Identifies the date and time when the label was created.""" - createdAt: DateTime + """The user is part of a GitHub Enterprise Server deployment.""" + SERVER +} - """A brief description of this label.""" - description: String +"""An external identity provisioned by SAML SSO or SCIM.""" +type ExternalIdentity implements Node { + """The GUID for this identity""" + guid: String! id: ID! - """Indicates whether or not this is a default label.""" - isDefault: Boolean! + """Organization invitation for this SCIM-provisioned external identity""" + organizationInvitation: OrganizationInvitation - """A list of issues associated with this label.""" - issues( - """Ordering options for issues returned from the connection.""" - orderBy: IssueOrder + """SAML Identity attributes""" + samlIdentity: ExternalIdentitySamlAttributes - """A list of label names to filter the pull requests by.""" - labels: [String!] + """SCIM Identity attributes""" + scimIdentity: ExternalIdentityScimAttributes - """A list of states to filter the issues by.""" - states: [IssueState!] + """ + User linked to this external identity. Will be NULL if this identity has not been claimed by an organization member. + """ + user: User +} - """Filtering options for issues returned from the connection.""" - filterBy: IssueFilters +"""The connection type for ExternalIdentity.""" +type ExternalIdentityConnection { + """A list of edges.""" + edges: [ExternalIdentityEdge] - """Returns the elements in the list that come after the specified cursor.""" - after: String + """A list of nodes.""" + nodes: [ExternalIdentity] - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String + """Information to aid in pagination.""" + pageInfo: PageInfo! - """Returns the first _n_ elements from the list.""" - first: Int + """Identifies the total count of items in the connection.""" + totalCount: Int! +} - """Returns the last _n_ elements from the list.""" - last: Int - ): IssueConnection! +"""An edge in a connection.""" +type ExternalIdentityEdge { + """A cursor for use in pagination.""" + cursor: String! - """Identifies the label name.""" - name: String! + """The item at the end of the edge.""" + node: ExternalIdentity +} - """A list of pull requests associated with this label.""" - pullRequests( - """A list of states to filter the pull requests by.""" - states: [PullRequestState!] +"""SAML attributes for the External Identity""" +type ExternalIdentitySamlAttributes { + """The emails associated with the SAML identity""" + emails: [UserEmailMetadata!] - """A list of label names to filter the pull requests by.""" - labels: [String!] + """Family name of the SAML identity""" + familyName: String - """The head ref name to filter the pull requests by.""" - headRefName: String + """Given name of the SAML identity""" + givenName: String - """The base ref name to filter the pull requests by.""" - baseRefName: String + """The groups linked to this identity in IDP""" + groups: [String!] - """Ordering options for pull requests returned from the connection.""" - orderBy: IssueOrder + """The NameID of the SAML identity""" + nameId: String - """Returns the elements in the list that come after the specified cursor.""" - after: String + """The userName of the SAML identity""" + username: String +} - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String +"""SCIM attributes for the External Identity""" +type ExternalIdentityScimAttributes { + """The emails associated with the SCIM identity""" + emails: [UserEmailMetadata!] - """Returns the first _n_ elements from the list.""" - first: Int + """Family name of the SCIM identity""" + familyName: String - """Returns the last _n_ elements from the list.""" - last: Int - ): PullRequestConnection! + """Given name of the SCIM identity""" + givenName: String - """The repository associated with this label.""" - repository: Repository! + """The groups linked to this identity in IDP""" + groups: [String!] - """The HTTP path for this label.""" - resourcePath: URI! + """The userName of the SCIM identity""" + username: String +} - """Identifies the date and time when the label was last updated.""" - updatedAt: DateTime +"""The possible viewed states of a file .""" +enum FileViewedState { + """The file has new changes since last viewed.""" + DISMISSED - """The HTTP URL for this label.""" - url: URI! + """The file has been marked as viewed.""" + VIEWED + + """The file has not been marked as viewed.""" + UNVIEWED } -"""An object that can have labels assigned to it.""" -interface Labelable { - """A list of labels associated with the object.""" - labels( - """Returns the elements in the list that come after the specified cursor.""" - after: String +"""The connection type for User.""" +type FollowerConnection { + """A list of edges.""" + edges: [UserEdge] - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String + """A list of nodes.""" + nodes: [User] - """Returns the first _n_ elements from the list.""" - first: Int + """Information to aid in pagination.""" + pageInfo: PageInfo! - """Returns the last _n_ elements from the list.""" - last: Int - ): LabelConnection + """Identifies the total count of items in the connection.""" + totalCount: Int! } -"""The connection type for Label.""" -type LabelConnection { +"""The connection type for User.""" +type FollowingConnection { """A list of edges.""" - edges: [LabelEdge] + edges: [UserEdge] """A list of nodes.""" - nodes: [Label] + nodes: [User] """Information to aid in pagination.""" pageInfo: PageInfo! @@ -5472,40 +6237,1766 @@ type LabelConnection { totalCount: Int! } -"""Represents a 'labeled' event on a given issue or pull request.""" -type LabeledEvent implements Node { - """Identifies the actor who performed the event.""" - actor: Actor +"""Autogenerated input type of FollowUser""" +input FollowUserInput { + """ID of the user to follow.""" + userId: ID! - """Identifies the date and time when the object was created.""" - createdAt: DateTime! - id: ID! + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} - """Identifies the label associated with the 'labeled' event.""" - label: Label! +"""Autogenerated return type of FollowUser""" +type FollowUserPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String - """Identifies the `Labelable` associated with the event.""" - labelable: Labelable! + """The user that was followed.""" + user: User } -"""An edge in a connection.""" -type LabelEdge { - """A cursor for use in pagination.""" - cursor: String! +"""A funding platform link for a repository.""" +type FundingLink { + """The funding platform this link is for.""" + platform: FundingPlatform! - """The item at the end of the edge.""" - node: Label + """The configured URL for this funding link.""" + url: URI! } -"""Represents a given language found in repositories.""" -type Language implements Node { - """The color defined for the current language.""" - color: String - id: ID! +"""The possible funding platforms for repository funding links.""" +enum FundingPlatform { + """GitHub funding platform.""" + GITHUB - """The name of the current language.""" - name: String! -} + """Patreon funding platform.""" + PATREON + + """Open Collective funding platform.""" + OPEN_COLLECTIVE + + """Ko-fi funding platform.""" + KO_FI + + """Tidelift funding platform.""" + TIDELIFT + + """Community Bridge funding platform.""" + COMMUNITY_BRIDGE + + """Liberapay funding platform.""" + LIBERAPAY + + """IssueHunt funding platform.""" + ISSUEHUNT + + """Otechie funding platform.""" + OTECHIE + + """Custom funding platform.""" + CUSTOM +} + +"""A generic hovercard context with a message and icon""" +type GenericHovercardContext implements HovercardContext { + """A string describing this context""" + message: String! + + """An octicon to accompany this context""" + octicon: String! +} + +"""A Gist.""" +type Gist implements Node & Starrable & UniformResourceLocatable { + """A list of comments associated with the gist""" + comments( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + ): GistCommentConnection! + + """Identifies the date and time when the object was created.""" + createdAt: DateTime! + + """The gist description.""" + description: String + + """The files in this gist.""" + files( + """The maximum number of files to return.""" + limit: Int = 10 + + """The oid of the files to return""" + oid: GitObjectID + ): [GistFile] + + """A list of forks associated with the gist""" + forks( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + + """Ordering options for gists returned from the connection""" + orderBy: GistOrder + ): GistConnection! + id: ID! + + """Identifies if the gist is a fork.""" + isFork: Boolean! + + """Whether the gist is public or not.""" + isPublic: Boolean! + + """The gist name.""" + name: String! + + """The gist owner.""" + owner: RepositoryOwner + + """Identifies when the gist was last pushed to.""" + pushedAt: DateTime + + """The HTML path to this resource.""" + resourcePath: URI! + + """ + Returns a count of how many stargazers there are on this object + + """ + stargazerCount: Int! + + """A list of users who have starred this starrable.""" + stargazers( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + + """Order for connection""" + orderBy: StarOrder + ): StargazerConnection! + + """Identifies the date and time when the object was last updated.""" + updatedAt: DateTime! + + """The HTTP URL for this Gist.""" + url: URI! + + """ + Returns a boolean indicating whether the viewing user has starred this starrable. + """ + viewerHasStarred: Boolean! +} + +"""Represents a comment on an Gist.""" +type GistComment implements Node & Comment & Deletable & Minimizable & Updatable & UpdatableComment { + """The actor who authored the comment.""" + author: Actor + + """Author's association with the gist.""" + authorAssociation: CommentAuthorAssociation! + + """Identifies the comment body.""" + body: String! + + """The body rendered to HTML.""" + bodyHTML: HTML! + + """The body rendered to text.""" + bodyText: String! + + """Identifies the date and time when the object was created.""" + createdAt: DateTime! + + """Check if this comment was created via an email reply.""" + createdViaEmail: Boolean! + + """Identifies the primary key from the database.""" + databaseId: Int + + """The actor who edited the comment.""" + editor: Actor + + """The associated gist.""" + gist: Gist! + id: ID! + + """ + Check if this comment was edited and includes an edit with the creation data + """ + includesCreatedEdit: Boolean! + + """Returns whether or not a comment has been minimized.""" + isMinimized: Boolean! + + """The moment the editor made the last edit""" + lastEditedAt: DateTime + + """Returns why the comment was minimized.""" + minimizedReason: String + + """Identifies when the comment was published at.""" + publishedAt: DateTime + + """Identifies the date and time when the object was last updated.""" + updatedAt: DateTime! + + """A list of edits to this content.""" + userContentEdits( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + ): UserContentEditConnection + + """Check if the current viewer can delete this object.""" + viewerCanDelete: Boolean! + + """Check if the current viewer can minimize this object.""" + viewerCanMinimize: Boolean! + + """Check if the current viewer can update this object.""" + viewerCanUpdate: Boolean! + + """Reasons why the current viewer can not update this comment.""" + viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! + + """Did the viewer author this comment.""" + viewerDidAuthor: Boolean! +} + +"""The connection type for GistComment.""" +type GistCommentConnection { + """A list of edges.""" + edges: [GistCommentEdge] + + """A list of nodes.""" + nodes: [GistComment] + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """Identifies the total count of items in the connection.""" + totalCount: Int! +} + +"""An edge in a connection.""" +type GistCommentEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of the edge.""" + node: GistComment +} + +"""The connection type for Gist.""" +type GistConnection { + """A list of edges.""" + edges: [GistEdge] + + """A list of nodes.""" + nodes: [Gist] + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """Identifies the total count of items in the connection.""" + totalCount: Int! +} + +"""An edge in a connection.""" +type GistEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of the edge.""" + node: Gist +} + +"""A file in a gist.""" +type GistFile { + """ + The file name encoded to remove characters that are invalid in URL paths. + """ + encodedName: String + + """The gist file encoding.""" + encoding: String + + """The file extension from the file name.""" + extension: String + + """Indicates if this file is an image.""" + isImage: Boolean! + + """Whether the file's contents were truncated.""" + isTruncated: Boolean! + + """The programming language this file is written in.""" + language: Language + + """The gist file name.""" + name: String + + """The gist file size in bytes.""" + size: Int + + """UTF8 text data or null if the file is binary""" + text( + """Optionally truncate the returned file to this length.""" + truncate: Int + ): String +} + +"""Ordering options for gist connections""" +input GistOrder { + """The field to order repositories by.""" + field: GistOrderField! + + """The ordering direction.""" + direction: OrderDirection! +} + +"""Properties by which gist connections can be ordered.""" +enum GistOrderField { + """Order gists by creation time""" + CREATED_AT + + """Order gists by update time""" + UPDATED_AT + + """Order gists by push time""" + PUSHED_AT +} + +"""The privacy of a Gist""" +enum GistPrivacy { + """Public""" + PUBLIC + + """Secret""" + SECRET + + """Gists that are public and secret""" + ALL +} + +"""Represents an actor in a Git commit (ie. an author or committer).""" +type GitActor { + """A URL pointing to the author's public avatar.""" + avatarUrl( + """The size of the resulting square image.""" + size: Int + ): URI! + + """The timestamp of the Git action (authoring or committing).""" + date: GitTimestamp + + """The email in the Git commit.""" + email: String + + """The name in the Git commit.""" + name: String + + """ + The GitHub user corresponding to the email field. Null if no such user exists. + """ + user: User +} + +"""The connection type for GitActor.""" +type GitActorConnection { + """A list of edges.""" + edges: [GitActorEdge] + + """A list of nodes.""" + nodes: [GitActor] + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """Identifies the total count of items in the connection.""" + totalCount: Int! +} + +"""An edge in a connection.""" +type GitActorEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of the edge.""" + node: GitActor +} + +"""Represents information about the GitHub instance.""" +type GitHubMetadata { + """Returns a String that's a SHA of `github-services`""" + gitHubServicesSha: GitObjectID! + + """IP addresses that users connect to for git operations""" + gitIpAddresses: [String!] + + """IP addresses that service hooks are sent from""" + hookIpAddresses: [String!] + + """IP addresses that the importer connects from""" + importerIpAddresses: [String!] + + """Whether or not users are verified""" + isPasswordAuthenticationVerifiable: Boolean! + + """IP addresses for GitHub Pages' A records""" + pagesIpAddresses: [String!] +} + +"""Represents a Git object.""" +interface GitObject { + """An abbreviated version of the Git object ID""" + abbreviatedOid: String! + + """The HTTP path for this Git object""" + commitResourcePath: URI! + + """The HTTP URL for this Git object""" + commitUrl: URI! + id: ID! + + """The Git object ID""" + oid: GitObjectID! + + """The Repository the Git object belongs to""" + repository: Repository! +} + +"""A Git object ID.""" +scalar GitObjectID + +"""Information about a signature (GPG or S/MIME) on a Commit or Tag.""" +interface GitSignature { + """Email used to sign this object.""" + email: String! + + """True if the signature is valid and verified by GitHub.""" + isValid: Boolean! + + """ + Payload for GPG signing object. Raw ODB object without the signature header. + """ + payload: String! + + """ASCII-armored signature header from object.""" + signature: String! + + """GitHub user corresponding to the email signing this commit.""" + signer: User + + """ + The state of this signature. `VALID` if signature is valid and verified by + GitHub, otherwise represents reason why signature is considered invalid. + """ + state: GitSignatureState! + + """True if the signature was made with GitHub's signing key.""" + wasSignedByGitHub: Boolean! +} + +"""The state of a Git signature.""" +enum GitSignatureState { + """Valid signature and verified by GitHub""" + VALID + + """Invalid signature""" + INVALID + + """Malformed signature""" + MALFORMED_SIG + + """Key used for signing not known to GitHub""" + UNKNOWN_KEY + + """Invalid email used for signing""" + BAD_EMAIL + + """Email used for signing unverified on GitHub""" + UNVERIFIED_EMAIL + + """Email used for signing not known to GitHub""" + NO_USER + + """Unknown signature type""" + UNKNOWN_SIG_TYPE + + """Unsigned""" + UNSIGNED + + """ + Internal error - the GPG verification service is unavailable at the moment + """ + GPGVERIFY_UNAVAILABLE + + """Internal error - the GPG verification service misbehaved""" + GPGVERIFY_ERROR + + """The usage flags for the key that signed this don't allow signing""" + NOT_SIGNING_KEY + + """Signing key expired""" + EXPIRED_KEY + + """Valid signature, pending certificate revocation checking""" + OCSP_PENDING + + """Valid siganture, though certificate revocation check failed""" + OCSP_ERROR + + """The signing certificate or its chain could not be verified""" + BAD_CERT + + """One or more certificates in chain has been revoked""" + OCSP_REVOKED +} + +"""Git SSH string""" +scalar GitSSHRemote + +""" +An ISO-8601 encoded date string. Unlike the DateTime type, GitTimestamp is not converted in UTC. +""" +scalar GitTimestamp + +"""Represents a GPG signature on a Commit or Tag.""" +type GpgSignature implements GitSignature { + """Email used to sign this object.""" + email: String! + + """True if the signature is valid and verified by GitHub.""" + isValid: Boolean! + + """Hex-encoded ID of the key that signed this object.""" + keyId: String + + """ + Payload for GPG signing object. Raw ODB object without the signature header. + """ + payload: String! + + """ASCII-armored signature header from object.""" + signature: String! + + """GitHub user corresponding to the email signing this commit.""" + signer: User + + """ + The state of this signature. `VALID` if signature is valid and verified by + GitHub, otherwise represents reason why signature is considered invalid. + """ + state: GitSignatureState! + + """True if the signature was made with GitHub's signing key.""" + wasSignedByGitHub: Boolean! +} + +"""Represents a 'head_ref_deleted' event on a given pull request.""" +type HeadRefDeletedEvent implements Node { + """Identifies the actor who performed the event.""" + actor: Actor + + """Identifies the date and time when the object was created.""" + createdAt: DateTime! + + """Identifies the Ref associated with the `head_ref_deleted` event.""" + headRef: Ref + + """ + Identifies the name of the Ref associated with the `head_ref_deleted` event. + """ + headRefName: String! + id: ID! + + """PullRequest referenced by event.""" + pullRequest: PullRequest! +} + +"""Represents a 'head_ref_force_pushed' event on a given pull request.""" +type HeadRefForcePushedEvent implements Node { + """Identifies the actor who performed the event.""" + actor: Actor + + """Identifies the after commit SHA for the 'head_ref_force_pushed' event.""" + afterCommit: Commit + + """ + Identifies the before commit SHA for the 'head_ref_force_pushed' event. + """ + beforeCommit: Commit + + """Identifies the date and time when the object was created.""" + createdAt: DateTime! + id: ID! + + """PullRequest referenced by event.""" + pullRequest: PullRequest! + + """ + Identifies the fully qualified ref name for the 'head_ref_force_pushed' event. + """ + ref: Ref +} + +"""Represents a 'head_ref_restored' event on a given pull request.""" +type HeadRefRestoredEvent implements Node { + """Identifies the actor who performed the event.""" + actor: Actor + + """Identifies the date and time when the object was created.""" + createdAt: DateTime! + id: ID! + + """PullRequest referenced by event.""" + pullRequest: PullRequest! +} + +"""Detail needed to display a hovercard for a user""" +type Hovercard { + """Each of the contexts for this hovercard""" + contexts: [HovercardContext!]! +} + +"""An individual line of a hovercard""" +interface HovercardContext { + """A string describing this context""" + message: String! + + """An octicon to accompany this context""" + octicon: String! +} + +"""A string containing HTML code.""" +scalar HTML + +""" +The possible states in which authentication can be configured with an identity provider. +""" +enum IdentityProviderConfigurationState { + """Authentication with an identity provider is configured and enforced.""" + ENFORCED + + """ + Authentication with an identity provider is configured but not enforced. + """ + CONFIGURED + + """Authentication with an identity provider is not configured.""" + UNCONFIGURED +} + +"""Autogenerated input type of InviteEnterpriseAdmin""" +input InviteEnterpriseAdminInput { + """The ID of the enterprise to which you want to invite an administrator.""" + enterpriseId: ID! + + """The login of a user to invite as an administrator.""" + invitee: String + + """The email of the person to invite as an administrator.""" + email: String + + """The role of the administrator.""" + role: EnterpriseAdministratorRole + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of InviteEnterpriseAdmin""" +type InviteEnterpriseAdminPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The created enterprise administrator invitation.""" + invitation: EnterpriseAdministratorInvitation +} + +"""The possible values for the IP allow list enabled setting.""" +enum IpAllowListEnabledSettingValue { + """The setting is enabled for the owner.""" + ENABLED + + """The setting is disabled for the owner.""" + DISABLED +} + +""" +An IP address or range of addresses that is allowed to access an owner's resources. +""" +type IpAllowListEntry implements Node { + """A single IP address or range of IP addresses in CIDR notation.""" + allowListValue: String! + + """Identifies the date and time when the object was created.""" + createdAt: DateTime! + id: ID! + + """Whether the entry is currently active.""" + isActive: Boolean! + + """The name of the IP allow list entry.""" + name: String + + """The owner of the IP allow list entry.""" + owner: IpAllowListOwner! + + """Identifies the date and time when the object was last updated.""" + updatedAt: DateTime! +} + +"""The connection type for IpAllowListEntry.""" +type IpAllowListEntryConnection { + """A list of edges.""" + edges: [IpAllowListEntryEdge] + + """A list of nodes.""" + nodes: [IpAllowListEntry] + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """Identifies the total count of items in the connection.""" + totalCount: Int! +} + +"""An edge in a connection.""" +type IpAllowListEntryEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of the edge.""" + node: IpAllowListEntry +} + +"""Ordering options for IP allow list entry connections.""" +input IpAllowListEntryOrder { + """The field to order IP allow list entries by.""" + field: IpAllowListEntryOrderField! + + """The ordering direction.""" + direction: OrderDirection! +} + +"""Properties by which IP allow list entry connections can be ordered.""" +enum IpAllowListEntryOrderField { + """Order IP allow list entries by creation time.""" + CREATED_AT + + """Order IP allow list entries by the allow list value.""" + ALLOW_LIST_VALUE +} + +"""Types that can own an IP allow list.""" +union IpAllowListOwner = Enterprise | Organization + +""" +An Issue is a place to discuss ideas, enhancements, tasks, and bugs for a project. +""" +type Issue implements Node & Assignable & Closable & Comment & Updatable & UpdatableComment & Labelable & Lockable & Reactable & RepositoryNode & Subscribable & UniformResourceLocatable { + """Reason that the conversation was locked.""" + activeLockReason: LockReason + + """A list of Users assigned to this object.""" + assignees( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + ): UserConnection! + + """The actor who authored the comment.""" + author: Actor + + """Author's association with the subject of the comment.""" + authorAssociation: CommentAuthorAssociation! + + """Identifies the body of the issue.""" + body: String! + + """The body rendered to HTML.""" + bodyHTML: HTML! + + """The http path for this issue body""" + bodyResourcePath: URI! + + """Identifies the body of the issue rendered to text.""" + bodyText: String! + + """The http URL for this issue body""" + bodyUrl: URI! + + """ + `true` if the object is closed (definition of closed may depend on type) + """ + closed: Boolean! + + """Identifies the date and time when the object was closed.""" + closedAt: DateTime + + """A list of comments associated with the Issue.""" + comments( + """Ordering options for issue comments returned from the connection.""" + orderBy: IssueCommentOrder + + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + ): IssueCommentConnection! + + """Identifies the date and time when the object was created.""" + createdAt: DateTime! + + """Check if this comment was created via an email reply.""" + createdViaEmail: Boolean! + + """Identifies the primary key from the database.""" + databaseId: Int + + """The actor who edited the comment.""" + editor: Actor + + """The hovercard information for this issue""" + hovercard( + """Whether or not to include notification contexts""" + includeNotificationContexts: Boolean = true + ): Hovercard! + id: ID! + + """ + Check if this comment was edited and includes an edit with the creation data + """ + includesCreatedEdit: Boolean! + + """Is this issue read by the viewer""" + isReadByViewer: Boolean + + """A list of labels associated with the object.""" + labels( + """Ordering options for labels returned from the connection.""" + orderBy: LabelOrder = {field: CREATED_AT, direction: ASC} + + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + ): LabelConnection + + """The moment the editor made the last edit""" + lastEditedAt: DateTime + + """`true` if the object is locked""" + locked: Boolean! + + """Identifies the milestone associated with the issue.""" + milestone: Milestone + + """Identifies the issue number.""" + number: Int! + + """A list of Users that are participating in the Issue conversation.""" + participants( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + ): UserConnection! + + """List of project cards associated with this issue.""" + projectCards( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + + """A list of archived states to filter the cards by""" + archivedStates: [ProjectCardArchivedState] = [ARCHIVED, NOT_ARCHIVED] + ): ProjectCardConnection! + + """Identifies when the comment was published at.""" + publishedAt: DateTime + + """A list of reactions grouped by content left on the subject.""" + reactionGroups: [ReactionGroup!] + + """A list of Reactions left on the Issue.""" + reactions( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + + """Allows filtering Reactions by emoji.""" + content: ReactionContent + + """Allows specifying the order in which reactions are returned.""" + orderBy: ReactionOrder + ): ReactionConnection! + + """The repository associated with this node.""" + repository: Repository! + + """The HTTP path for this issue""" + resourcePath: URI! + + """Identifies the state of the issue.""" + state: IssueState! + + """A list of events, comments, commits, etc. associated with the issue.""" + timelineItems( + """Filter timeline items by a `since` timestamp.""" + since: DateTime + + """Skips the first _n_ elements in the list.""" + skip: Int + + """Filter timeline items by type.""" + itemTypes: [IssueTimelineItemsItemType!] + + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + ): IssueTimelineItemsConnection! + + """Identifies the issue title.""" + title: String! + + """Identifies the date and time when the object was last updated.""" + updatedAt: DateTime! + + """The HTTP URL for this issue""" + url: URI! + + """A list of edits to this content.""" + userContentEdits( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + ): UserContentEditConnection + + """Can user react to this subject""" + viewerCanReact: Boolean! + + """ + Check if the viewer is able to change their subscription status for the repository. + """ + viewerCanSubscribe: Boolean! + + """Check if the current viewer can update this object.""" + viewerCanUpdate: Boolean! + + """Reasons why the current viewer can not update this comment.""" + viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! + + """Did the viewer author this comment.""" + viewerDidAuthor: Boolean! + + """ + Identifies if the viewer is watching, not watching, or ignoring the subscribable entity. + """ + viewerSubscription: SubscriptionState +} + +"""Represents a comment on an Issue.""" +type IssueComment implements Node & Comment & Deletable & Minimizable & Updatable & UpdatableComment & Reactable & RepositoryNode { + """The actor who authored the comment.""" + author: Actor + + """Author's association with the subject of the comment.""" + authorAssociation: CommentAuthorAssociation! + + """The body as Markdown.""" + body: String! + + """The body rendered to HTML.""" + bodyHTML: HTML! + + """The body rendered to text.""" + bodyText: String! + + """Identifies the date and time when the object was created.""" + createdAt: DateTime! + + """Check if this comment was created via an email reply.""" + createdViaEmail: Boolean! + + """Identifies the primary key from the database.""" + databaseId: Int + + """The actor who edited the comment.""" + editor: Actor + id: ID! + + """ + Check if this comment was edited and includes an edit with the creation data + """ + includesCreatedEdit: Boolean! + + """Returns whether or not a comment has been minimized.""" + isMinimized: Boolean! + + """Identifies the issue associated with the comment.""" + issue: Issue! + + """The moment the editor made the last edit""" + lastEditedAt: DateTime + + """Returns why the comment was minimized.""" + minimizedReason: String + + """Identifies when the comment was published at.""" + publishedAt: DateTime + + """ + Returns the pull request associated with the comment, if this comment was made on a + pull request. + + """ + pullRequest: PullRequest + + """A list of reactions grouped by content left on the subject.""" + reactionGroups: [ReactionGroup!] + + """A list of Reactions left on the Issue.""" + reactions( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + + """Allows filtering Reactions by emoji.""" + content: ReactionContent + + """Allows specifying the order in which reactions are returned.""" + orderBy: ReactionOrder + ): ReactionConnection! + + """The repository associated with this node.""" + repository: Repository! + + """The HTTP path for this issue comment""" + resourcePath: URI! + + """Identifies the date and time when the object was last updated.""" + updatedAt: DateTime! + + """The HTTP URL for this issue comment""" + url: URI! + + """A list of edits to this content.""" + userContentEdits( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + ): UserContentEditConnection + + """Check if the current viewer can delete this object.""" + viewerCanDelete: Boolean! + + """Check if the current viewer can minimize this object.""" + viewerCanMinimize: Boolean! + + """Can user react to this subject""" + viewerCanReact: Boolean! + + """Check if the current viewer can update this object.""" + viewerCanUpdate: Boolean! + + """Reasons why the current viewer can not update this comment.""" + viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! + + """Did the viewer author this comment.""" + viewerDidAuthor: Boolean! +} + +"""The connection type for IssueComment.""" +type IssueCommentConnection { + """A list of edges.""" + edges: [IssueCommentEdge] + + """A list of nodes.""" + nodes: [IssueComment] + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """Identifies the total count of items in the connection.""" + totalCount: Int! +} + +"""An edge in a connection.""" +type IssueCommentEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of the edge.""" + node: IssueComment +} + +"""Ways in which lists of issue comments can be ordered upon return.""" +input IssueCommentOrder { + """The field in which to order issue comments by.""" + field: IssueCommentOrderField! + + """The direction in which to order issue comments by the specified field.""" + direction: OrderDirection! +} + +"""Properties by which issue comment connections can be ordered.""" +enum IssueCommentOrderField { + """Order issue comments by update time""" + UPDATED_AT +} + +"""The connection type for Issue.""" +type IssueConnection { + """A list of edges.""" + edges: [IssueEdge] + + """A list of nodes.""" + nodes: [Issue] + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """Identifies the total count of items in the connection.""" + totalCount: Int! +} + +"""This aggregates issues opened by a user within one repository.""" +type IssueContributionsByRepository { + """The issue contributions.""" + contributions( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + + """Ordering options for contributions returned from the connection.""" + orderBy: ContributionOrder = {direction: DESC} + ): CreatedIssueContributionConnection! + + """The repository in which the issues were opened.""" + repository: Repository! +} + +"""An edge in a connection.""" +type IssueEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of the edge.""" + node: Issue +} + +"""Ways in which to filter lists of issues.""" +input IssueFilters { + """ + List issues assigned to given name. Pass in `null` for issues with no assigned + user, and `*` for issues assigned to any user. + """ + assignee: String + + """List issues created by given name.""" + createdBy: String + + """List issues where the list of label names exist on the issue.""" + labels: [String!] + + """List issues where the given name is mentioned in the issue.""" + mentioned: String + + """ + List issues by given milestone argument. If an string representation of an + integer is passed, it should refer to a milestone by its number field. Pass in + `null` for issues with no milestone, and `*` for issues that are assigned to any milestone. + """ + milestone: String + + """List issues that have been updated at or after the given date.""" + since: DateTime + + """List issues filtered by the list of states given.""" + states: [IssueState!] + + """List issues subscribed to by viewer.""" + viewerSubscribed: Boolean = false +} + +"""Ways in which lists of issues can be ordered upon return.""" +input IssueOrder { + """The field in which to order issues by.""" + field: IssueOrderField! + + """The direction in which to order issues by the specified field.""" + direction: OrderDirection! +} + +"""Properties by which issue connections can be ordered.""" +enum IssueOrderField { + """Order issues by creation time""" + CREATED_AT + + """Order issues by update time""" + UPDATED_AT + + """Order issues by comment count""" + COMMENTS +} + +"""Used for return value of Repository.issueOrPullRequest.""" +union IssueOrPullRequest = Issue | PullRequest + +"""The possible states of an issue.""" +enum IssueState { + """An issue that is still open""" + OPEN + + """An issue that has been closed""" + CLOSED +} + +"""A repository issue template.""" +type IssueTemplate { + """The template purpose.""" + about: String + + """The suggested issue body.""" + body: String + + """The template name.""" + name: String! + + """The suggested issue title.""" + title: String +} + +"""The connection type for IssueTimelineItem.""" +type IssueTimelineConnection { + """A list of edges.""" + edges: [IssueTimelineItemEdge] + + """A list of nodes.""" + nodes: [IssueTimelineItem] + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """Identifies the total count of items in the connection.""" + totalCount: Int! +} + +"""An item in an issue timeline""" +union IssueTimelineItem = AssignedEvent | ClosedEvent | Commit | CrossReferencedEvent | DemilestonedEvent | IssueComment | LabeledEvent | LockedEvent | MilestonedEvent | ReferencedEvent | RenamedTitleEvent | ReopenedEvent | SubscribedEvent | TransferredEvent | UnassignedEvent | UnlabeledEvent | UnlockedEvent | UnsubscribedEvent | UserBlockedEvent + +"""An edge in a connection.""" +type IssueTimelineItemEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of the edge.""" + node: IssueTimelineItem +} + +"""An item in an issue timeline""" +union IssueTimelineItems = AddedToProjectEvent | AssignedEvent | ClosedEvent | CommentDeletedEvent | ConnectedEvent | ConvertedNoteToIssueEvent | CrossReferencedEvent | DemilestonedEvent | DisconnectedEvent | IssueComment | LabeledEvent | LockedEvent | MarkedAsDuplicateEvent | MentionedEvent | MilestonedEvent | MovedColumnsInProjectEvent | PinnedEvent | ReferencedEvent | RemovedFromProjectEvent | RenamedTitleEvent | ReopenedEvent | SubscribedEvent | TransferredEvent | UnassignedEvent | UnlabeledEvent | UnlockedEvent | UnmarkedAsDuplicateEvent | UnpinnedEvent | UnsubscribedEvent | UserBlockedEvent + +"""The connection type for IssueTimelineItems.""" +type IssueTimelineItemsConnection { + """A list of edges.""" + edges: [IssueTimelineItemsEdge] + + """ + Identifies the count of items after applying `before` and `after` filters. + """ + filteredCount: Int! + + """A list of nodes.""" + nodes: [IssueTimelineItems] + + """ + Identifies the count of items after applying `before`/`after` filters and `first`/`last`/`skip` slicing. + """ + pageCount: Int! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """Identifies the total count of items in the connection.""" + totalCount: Int! + + """Identifies the date and time when the timeline was last updated.""" + updatedAt: DateTime! +} + +"""An edge in a connection.""" +type IssueTimelineItemsEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of the edge.""" + node: IssueTimelineItems +} + +"""The possible item types found in a timeline.""" +enum IssueTimelineItemsItemType { + """Represents a comment on an Issue.""" + ISSUE_COMMENT + + """Represents a mention made by one issue or pull request to another.""" + CROSS_REFERENCED_EVENT + + """ + Represents a 'added_to_project' event on a given issue or pull request. + """ + ADDED_TO_PROJECT_EVENT + + """Represents an 'assigned' event on any assignable object.""" + ASSIGNED_EVENT + + """Represents a 'closed' event on any `Closable`.""" + CLOSED_EVENT + + """Represents a 'comment_deleted' event on a given issue or pull request.""" + COMMENT_DELETED_EVENT + + """Represents a 'connected' event on a given issue or pull request.""" + CONNECTED_EVENT + + """ + Represents a 'converted_note_to_issue' event on a given issue or pull request. + """ + CONVERTED_NOTE_TO_ISSUE_EVENT + + """Represents a 'demilestoned' event on a given issue or pull request.""" + DEMILESTONED_EVENT + + """Represents a 'disconnected' event on a given issue or pull request.""" + DISCONNECTED_EVENT + + """Represents a 'labeled' event on a given issue or pull request.""" + LABELED_EVENT + + """Represents a 'locked' event on a given issue or pull request.""" + LOCKED_EVENT + + """ + Represents a 'marked_as_duplicate' event on a given issue or pull request. + """ + MARKED_AS_DUPLICATE_EVENT + + """Represents a 'mentioned' event on a given issue or pull request.""" + MENTIONED_EVENT + + """Represents a 'milestoned' event on a given issue or pull request.""" + MILESTONED_EVENT + + """ + Represents a 'moved_columns_in_project' event on a given issue or pull request. + """ + MOVED_COLUMNS_IN_PROJECT_EVENT + + """Represents a 'pinned' event on a given issue or pull request.""" + PINNED_EVENT + + """Represents a 'referenced' event on a given `ReferencedSubject`.""" + REFERENCED_EVENT + + """ + Represents a 'removed_from_project' event on a given issue or pull request. + """ + REMOVED_FROM_PROJECT_EVENT + + """Represents a 'renamed' event on a given issue or pull request""" + RENAMED_TITLE_EVENT + + """Represents a 'reopened' event on any `Closable`.""" + REOPENED_EVENT + + """Represents a 'subscribed' event on a given `Subscribable`.""" + SUBSCRIBED_EVENT + + """Represents a 'transferred' event on a given issue or pull request.""" + TRANSFERRED_EVENT + + """Represents an 'unassigned' event on any assignable object.""" + UNASSIGNED_EVENT + + """Represents an 'unlabeled' event on a given issue or pull request.""" + UNLABELED_EVENT + + """Represents an 'unlocked' event on a given issue or pull request.""" + UNLOCKED_EVENT + + """Represents a 'user_blocked' event on a given user.""" + USER_BLOCKED_EVENT + + """ + Represents an 'unmarked_as_duplicate' event on a given issue or pull request. + """ + UNMARKED_AS_DUPLICATE_EVENT + + """Represents an 'unpinned' event on a given issue or pull request.""" + UNPINNED_EVENT + + """Represents an 'unsubscribed' event on a given `Subscribable`.""" + UNSUBSCRIBED_EVENT +} + +"""Represents a user signing up for a GitHub account.""" +type JoinedGitHubContribution implements Contribution { + """ + Whether this contribution is associated with a record you do not have access to. For + example, your own 'first issue' contribution may have been made on a repository you can no + longer access. + + """ + isRestricted: Boolean! + + """When this contribution was made.""" + occurredAt: DateTime! + + """The HTTP path for this contribution.""" + resourcePath: URI! + + """The HTTP URL for this contribution.""" + url: URI! + + """ + The user who made this contribution. + + """ + user: User! +} + +"""A label for categorizing Issues or Milestones with a given Repository.""" +type Label implements Node { + """Identifies the label color.""" + color: String! + + """Identifies the date and time when the label was created.""" + createdAt: DateTime + + """A brief description of this label.""" + description: String + id: ID! + + """Indicates whether or not this is a default label.""" + isDefault: Boolean! + + """A list of issues associated with this label.""" + issues( + """Ordering options for issues returned from the connection.""" + orderBy: IssueOrder + + """A list of label names to filter the pull requests by.""" + labels: [String!] + + """A list of states to filter the issues by.""" + states: [IssueState!] + + """Filtering options for issues returned from the connection.""" + filterBy: IssueFilters + + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + ): IssueConnection! + + """Identifies the label name.""" + name: String! + + """A list of pull requests associated with this label.""" + pullRequests( + """A list of states to filter the pull requests by.""" + states: [PullRequestState!] + + """A list of label names to filter the pull requests by.""" + labels: [String!] + + """The head ref name to filter the pull requests by.""" + headRefName: String + + """The base ref name to filter the pull requests by.""" + baseRefName: String + + """Ordering options for pull requests returned from the connection.""" + orderBy: IssueOrder + + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + ): PullRequestConnection! + + """The repository associated with this label.""" + repository: Repository! + + """The HTTP path for this label.""" + resourcePath: URI! + + """Identifies the date and time when the label was last updated.""" + updatedAt: DateTime + + """The HTTP URL for this label.""" + url: URI! +} + +"""An object that can have labels assigned to it.""" +interface Labelable { + """A list of labels associated with the object.""" + labels( + """Ordering options for labels returned from the connection.""" + orderBy: LabelOrder = {field: CREATED_AT, direction: ASC} + + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + ): LabelConnection +} + +"""The connection type for Label.""" +type LabelConnection { + """A list of edges.""" + edges: [LabelEdge] + + """A list of nodes.""" + nodes: [Label] + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """Identifies the total count of items in the connection.""" + totalCount: Int! +} + +"""Represents a 'labeled' event on a given issue or pull request.""" +type LabeledEvent implements Node { + """Identifies the actor who performed the event.""" + actor: Actor + + """Identifies the date and time when the object was created.""" + createdAt: DateTime! + id: ID! + + """Identifies the label associated with the 'labeled' event.""" + label: Label! + + """Identifies the `Labelable` associated with the event.""" + labelable: Labelable! +} + +"""An edge in a connection.""" +type LabelEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of the edge.""" + node: Label +} + +"""Ways in which lists of labels can be ordered upon return.""" +input LabelOrder { + """The field in which to order labels by.""" + field: LabelOrderField! + + """The direction in which to order labels by the specified field.""" + direction: OrderDirection! +} + +"""Properties by which label connections can be ordered.""" +enum LabelOrderField { + """Order labels by name """ + NAME + + """Order labels by creation time""" + CREATED_AT +} + +"""Represents a given language found in repositories.""" +type Language implements Node { + """The color defined for the current language.""" + color: String + id: ID! + + """The name of the current language.""" + name: String! +} """A list of languages associated with the parent.""" type LanguageConnection { @@ -5660,10 +8151,10 @@ type LockedEvent implements Node { """Autogenerated input type of LockLockable""" input LockLockableInput { - """ID of the issue or pull request to be locked.""" + """ID of the item to be locked.""" lockableId: ID! - """A reason for why the issue or pull request will be locked.""" + """A reason for why the item will be locked.""" lockReason: LockReason """A unique identifier for the client performing the mutation.""" @@ -5672,6 +8163,9 @@ input LockLockableInput { """Autogenerated return type of LockLockable""" type LockLockablePayload { + """Identifies the actor who performed the event.""" + actor: Actor + """A unique identifier for the client performing the mutation.""" clientMutationId: String @@ -5715,6 +8209,9 @@ type Mannequin implements Node & Actor & UniformResourceLocatable { """Identifies the primary key from the database.""" databaseId: Int + + """The mannequin's email on the source instance.""" + email: String id: ID! """The username of the actor.""" @@ -5737,9 +8234,22 @@ type MarkedAsDuplicateEvent implements Node { """Identifies the actor who performed the event.""" actor: Actor + """ + The authoritative issue or pull request which has been duplicated by another. + """ + canonical: IssueOrPullRequest + """Identifies the date and time when the object was created.""" createdAt: DateTime! + + """ + The issue or pull request which has been marked as a duplicate of another. + """ + duplicate: IssueOrPullRequest id: ID! + + """Canonical and duplicate belong to different repositories.""" + isCrossRepository: Boolean! } """A public description of a Marketplace category.""" @@ -5811,6 +8321,9 @@ type MarketplaceListing implements Node { """Does this listing have a terms of service link?""" hasTermsOfService: Boolean! + """Whether the creator of the app is a verified org""" + hasVerifiedOwner: Boolean! + """A technical description of how this app works with GitHub.""" howItWorks: String @@ -6019,6 +8532,45 @@ type MarketplaceListingEdge { node: MarketplaceListing } +"""Autogenerated input type of MarkFileAsViewed""" +input MarkFileAsViewedInput { + """The Node ID of the pull request.""" + pullRequestId: ID! + + """The path of the file to mark as viewed""" + path: String! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of MarkFileAsViewed""" +type MarkFileAsViewedPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The updated pull request.""" + pullRequest: PullRequest +} + +"""Autogenerated input type of MarkPullRequestReadyForReview""" +input MarkPullRequestReadyForReviewInput { + """ID of the pull request to be marked as ready for review.""" + pullRequestId: ID! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of MarkPullRequestReadyForReview""" +type MarkPullRequestReadyForReviewPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The pull request that is ready for review.""" + pullRequest: PullRequest +} + """Audit log entry for a members_can_delete_repos.clear event.""" type MembersCanDeleteReposClearAuditEntry implements Node & AuditEntry & EnterpriseAuditEntryData & OrganizationAuditEntryData { """The action name""" @@ -6055,6 +8607,9 @@ type MembersCanDeleteReposClearAuditEntry implements Node & AuditEntry & Enterpr enterpriseUrl: URI id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -6118,6 +8673,9 @@ type MembersCanDeleteReposDisableAuditEntry implements Node & AuditEntry & Enter enterpriseUrl: URI id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -6181,6 +8739,9 @@ type MembersCanDeleteReposEnableAuditEntry implements Node & AuditEntry & Enterp enterpriseUrl: URI id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -6229,7 +8790,7 @@ interface MemberStatusable { last: Int """Ordering options for user statuses returned from the connection.""" - orderBy: UserStatusOrder + orderBy: UserStatusOrder = {field: UPDATED_AT, direction: DESC} ): UserStatusConnection! } @@ -6280,6 +8841,9 @@ input MergeBranchInput { """ commitMessage: String + """The email address to associate with this commit.""" + authorEmail: String + """A unique identifier for the client performing the mutation.""" clientMutationId: String } @@ -6341,12 +8905,21 @@ input MergePullRequestInput { """ expectedHeadOid: GitObjectID + """The merge method to use. If omitted, defaults to 'MERGE'""" + mergeMethod: PullRequestMergeMethod = MERGE + + """The email address to associate with this merge.""" + authorEmail: String + """A unique identifier for the client performing the mutation.""" clientMutationId: String } """Autogenerated return type of MergePullRequest""" type MergePullRequestPayload { + """Identifies the actor who performed the event.""" + actor: Actor + """A unique identifier for the client performing the mutation.""" clientMutationId: String @@ -6377,9 +8950,6 @@ type Milestone implements Node & Closable & UniformResourceLocatable { dueOn: DateTime id: ID! - """Just for debugging on review-lab""" - issuePrioritiesDebug: String! - """A list of issues associated with the milestone.""" issues( """Ordering options for issues returned from the connection.""" @@ -6412,6 +8982,9 @@ type Milestone implements Node & Closable & UniformResourceLocatable { """Identifies the number of the milestone.""" number: Int! + """Indentifies the percentage complete for the milestone""" + progressPercentage: Float! + """A list of pull requests associated with the milestone.""" pullRequests( """A list of states to filter the pull requests by.""" @@ -6539,6 +9112,18 @@ enum MilestoneState { CLOSED } +"""Entities that can be minimized.""" +interface Minimizable { + """Returns whether or not a comment has been minimized.""" + isMinimized: Boolean! + + """Returns why the comment was minimized.""" + minimizedReason: String + + """Check if the current viewer can minimize this object.""" + viewerCanMinimize: Boolean! +} + """Autogenerated input type of MinimizeComment""" input MinimizeCommentInput { """The Node ID of the subject to modify.""" @@ -6551,6 +9136,15 @@ input MinimizeCommentInput { clientMutationId: String } +"""Autogenerated return type of MinimizeComment""" +type MinimizeCommentPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The comment that was minimized.""" + minimizedComment: Minimizable +} + """ Represents a 'moved_columns_in_project' event on a given issue or pull request. """ @@ -6617,6 +9211,11 @@ type MoveProjectColumnPayload { """The root query for implementing GraphQL mutations.""" type Mutation { + """ + Accepts a pending invitation for a user to become an administrator of an enterprise. + """ + acceptEnterpriseAdministratorInvitation(input: AcceptEnterpriseAdministratorInvitationInput!): AcceptEnterpriseAdministratorInvitationPayload + """Applies a suggested topic to the repository.""" acceptTopicSuggestion(input: AcceptTopicSuggestionInput!): AcceptTopicSuggestionPayload @@ -6643,12 +9242,23 @@ type Mutation { """Adds a comment to a review.""" addPullRequestReviewComment(input: AddPullRequestReviewCommentInput!): AddPullRequestReviewCommentPayload + """Adds a new thread to a pending Pull Request Review.""" + addPullRequestReviewThread(input: AddPullRequestReviewThreadInput!): AddPullRequestReviewThreadPayload + """Adds a reaction to a subject.""" addReaction(input: AddReactionInput!): AddReactionPayload """Adds a star to a Starrable.""" addStar(input: AddStarInput!): AddStarPayload + """Marks a repository as archived.""" + archiveRepository(input: ArchiveRepositoryInput!): ArchiveRepositoryPayload + + """ + Cancels a pending invitation for an administrator to join an enterprise. + """ + cancelEnterpriseAdminInvitation(input: CancelEnterpriseAdminInvitationInput!): CancelEnterpriseAdminInvitationPayload + """Update your status on GitHub.""" changeUserStatus(input: ChangeUserStatusInput!): ChangeUserStatusPayload @@ -6685,6 +9295,12 @@ type Mutation { """Create a check suite""" createCheckSuite(input: CreateCheckSuiteInput!): CreateCheckSuitePayload + """Creates an organization as part of an enterprise account.""" + createEnterpriseOrganization(input: CreateEnterpriseOrganizationInput!): CreateEnterpriseOrganizationPayload + + """Creates a new IP allow list entry.""" + createIpAllowListEntry(input: CreateIpAllowListEntryInput!): CreateIpAllowListEntryPayload + """Creates a new issue.""" createIssue(input: CreateIssueInput!): CreateIssuePayload @@ -6700,12 +9316,24 @@ type Mutation { """Create a new repository.""" createRepository(input: CreateRepositoryInput!): CreateRepositoryPayload + """Creates a new team discussion.""" + createTeamDiscussion(input: CreateTeamDiscussionInput!): CreateTeamDiscussionPayload + + """Creates a new team discussion comment.""" + createTeamDiscussionComment(input: CreateTeamDiscussionCommentInput!): CreateTeamDiscussionCommentPayload + """Rejects a suggested topic for the repository.""" declineTopicSuggestion(input: DeclineTopicSuggestionInput!): DeclineTopicSuggestionPayload """Delete a branch protection rule""" deleteBranchProtectionRule(input: DeleteBranchProtectionRuleInput!): DeleteBranchProtectionRulePayload + """Deletes a deployment.""" + deleteDeployment(input: DeleteDeploymentInput!): DeleteDeploymentPayload + + """Deletes an IP allow list entry.""" + deleteIpAllowListEntry(input: DeleteIpAllowListEntryInput!): DeleteIpAllowListEntryPayload + """Deletes an Issue object.""" deleteIssue(input: DeleteIssueInput!): DeleteIssuePayload @@ -6730,30 +9358,63 @@ type Mutation { """Delete a Git Ref.""" deleteRef(input: DeleteRefInput!): DeleteRefPayload + """Deletes a team discussion.""" + deleteTeamDiscussion(input: DeleteTeamDiscussionInput!): DeleteTeamDiscussionPayload + + """Deletes a team discussion comment.""" + deleteTeamDiscussionComment(input: DeleteTeamDiscussionCommentInput!): DeleteTeamDiscussionCommentPayload + """Dismisses an approved or rejected pull request review.""" dismissPullRequestReview(input: DismissPullRequestReviewInput!): DismissPullRequestReviewPayload + """Follow a user.""" + followUser(input: FollowUserInput!): FollowUserPayload + + """Invite someone to become an administrator of the enterprise.""" + inviteEnterpriseAdmin(input: InviteEnterpriseAdminInput!): InviteEnterpriseAdminPayload + """Creates a repository link for a project.""" linkRepositoryToProject(input: LinkRepositoryToProjectInput!): LinkRepositoryToProjectPayload """Lock a lockable object""" lockLockable(input: LockLockableInput!): LockLockablePayload + """Mark a pull request file as viewed""" + markFileAsViewed(input: MarkFileAsViewedInput!): MarkFileAsViewedPayload + + """Marks a pull request ready for review.""" + markPullRequestReadyForReview(input: MarkPullRequestReadyForReviewInput!): MarkPullRequestReadyForReviewPayload + """Merge a head into a branch.""" mergeBranch(input: MergeBranchInput!): MergeBranchPayload """Merge a pull request.""" mergePullRequest(input: MergePullRequestInput!): MergePullRequestPayload + """Minimizes a comment on an Issue, Commit, Pull Request, or Gist""" + minimizeComment(input: MinimizeCommentInput!): MinimizeCommentPayload + """Moves a project card to another place.""" moveProjectCard(input: MoveProjectCardInput!): MoveProjectCardPayload """Moves a project column to another place.""" moveProjectColumn(input: MoveProjectColumnInput!): MoveProjectColumnPayload + """Regenerates the identity provider recovery codes for an enterprise""" + regenerateEnterpriseIdentityProviderRecoveryCodes(input: RegenerateEnterpriseIdentityProviderRecoveryCodesInput!): RegenerateEnterpriseIdentityProviderRecoveryCodesPayload + """Removes assignees from an assignable object.""" removeAssigneesFromAssignable(input: RemoveAssigneesFromAssignableInput!): RemoveAssigneesFromAssignablePayload + """Removes an administrator from the enterprise.""" + removeEnterpriseAdmin(input: RemoveEnterpriseAdminInput!): RemoveEnterpriseAdminPayload + + """Removes the identity provider from an enterprise""" + removeEnterpriseIdentityProvider(input: RemoveEnterpriseIdentityProviderInput!): RemoveEnterpriseIdentityProviderPayload + + """Removes an organization from the enterprise""" + removeEnterpriseOrganization(input: RemoveEnterpriseOrganizationInput!): RemoveEnterpriseOrganizationPayload + """Removes labels from a Labelable object.""" removeLabelsFromLabelable(input: RemoveLabelsFromLabelableInput!): RemoveLabelsFromLabelablePayload @@ -6778,35 +9439,125 @@ type Mutation { """Rerequests an existing check suite.""" rerequestCheckSuite(input: RerequestCheckSuiteInput!): RerequestCheckSuitePayload - """Marks a review thread as resolved.""" - resolveReviewThread(input: ResolveReviewThreadInput!): ResolveReviewThreadPayload + """Marks a review thread as resolved.""" + resolveReviewThread(input: ResolveReviewThreadInput!): ResolveReviewThreadPayload + + """Creates or updates the identity provider for an enterprise.""" + setEnterpriseIdentityProvider(input: SetEnterpriseIdentityProviderInput!): SetEnterpriseIdentityProviderPayload + + """ + Set an organization level interaction limit for an organization's public repositories. + """ + setOrganizationInteractionLimit(input: SetOrganizationInteractionLimitInput!): SetOrganizationInteractionLimitPayload + + """Sets an interaction limit setting for a repository.""" + setRepositoryInteractionLimit(input: SetRepositoryInteractionLimitInput!): SetRepositoryInteractionLimitPayload + + """Set a user level interaction limit for an user's public repositories.""" + setUserInteractionLimit(input: SetUserInteractionLimitInput!): SetUserInteractionLimitPayload + + """Submits a pending pull request review.""" + submitPullRequestReview(input: SubmitPullRequestReviewInput!): SubmitPullRequestReviewPayload + + """Transfer an issue to a different repository""" + transferIssue(input: TransferIssueInput!): TransferIssuePayload + + """Unarchives a repository.""" + unarchiveRepository(input: UnarchiveRepositoryInput!): UnarchiveRepositoryPayload + + """Unfollow a user.""" + unfollowUser(input: UnfollowUserInput!): UnfollowUserPayload + + """Deletes a repository link from a project.""" + unlinkRepositoryFromProject(input: UnlinkRepositoryFromProjectInput!): UnlinkRepositoryFromProjectPayload + + """Unlock a lockable object""" + unlockLockable(input: UnlockLockableInput!): UnlockLockablePayload + + """Unmark a pull request file as viewed""" + unmarkFileAsViewed(input: UnmarkFileAsViewedInput!): UnmarkFileAsViewedPayload + + """Unmark an issue as a duplicate of another issue.""" + unmarkIssueAsDuplicate(input: UnmarkIssueAsDuplicateInput!): UnmarkIssueAsDuplicatePayload + + """Unminimizes a comment on an Issue, Commit, Pull Request, or Gist""" + unminimizeComment(input: UnminimizeCommentInput!): UnminimizeCommentPayload + + """Marks a review thread as unresolved.""" + unresolveReviewThread(input: UnresolveReviewThreadInput!): UnresolveReviewThreadPayload + + """Create a new branch protection rule""" + updateBranchProtectionRule(input: UpdateBranchProtectionRuleInput!): UpdateBranchProtectionRulePayload + + """Update a check run""" + updateCheckRun(input: UpdateCheckRunInput!): UpdateCheckRunPayload + + """Modifies the settings of an existing check suite""" + updateCheckSuitePreferences(input: UpdateCheckSuitePreferencesInput!): UpdateCheckSuitePreferencesPayload + + """Updates the role of an enterprise administrator.""" + updateEnterpriseAdministratorRole(input: UpdateEnterpriseAdministratorRoleInput!): UpdateEnterpriseAdministratorRolePayload + + """Sets whether private repository forks are enabled for an enterprise.""" + updateEnterpriseAllowPrivateRepositoryForkingSetting(input: UpdateEnterpriseAllowPrivateRepositoryForkingSettingInput!): UpdateEnterpriseAllowPrivateRepositoryForkingSettingPayload + + """ + Sets the default repository permission for organizations in an enterprise. + """ + updateEnterpriseDefaultRepositoryPermissionSetting(input: UpdateEnterpriseDefaultRepositoryPermissionSettingInput!): UpdateEnterpriseDefaultRepositoryPermissionSettingPayload + + """ + Sets whether organization members with admin permissions on a repository can change repository visibility. + """ + updateEnterpriseMembersCanChangeRepositoryVisibilitySetting(input: UpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingInput!): UpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingPayload + + """Sets the members can create repositories setting for an enterprise.""" + updateEnterpriseMembersCanCreateRepositoriesSetting(input: UpdateEnterpriseMembersCanCreateRepositoriesSettingInput!): UpdateEnterpriseMembersCanCreateRepositoriesSettingPayload + + """Sets the members can delete issues setting for an enterprise.""" + updateEnterpriseMembersCanDeleteIssuesSetting(input: UpdateEnterpriseMembersCanDeleteIssuesSettingInput!): UpdateEnterpriseMembersCanDeleteIssuesSettingPayload + + """Sets the members can delete repositories setting for an enterprise.""" + updateEnterpriseMembersCanDeleteRepositoriesSetting(input: UpdateEnterpriseMembersCanDeleteRepositoriesSettingInput!): UpdateEnterpriseMembersCanDeleteRepositoriesSettingPayload + + """ + Sets whether members can invite collaborators are enabled for an enterprise. + """ + updateEnterpriseMembersCanInviteCollaboratorsSetting(input: UpdateEnterpriseMembersCanInviteCollaboratorsSettingInput!): UpdateEnterpriseMembersCanInviteCollaboratorsSettingPayload - """Submits a pending pull request review.""" - submitPullRequestReview(input: SubmitPullRequestReviewInput!): SubmitPullRequestReviewPayload + """Sets whether or not an organization admin can make purchases.""" + updateEnterpriseMembersCanMakePurchasesSetting(input: UpdateEnterpriseMembersCanMakePurchasesSettingInput!): UpdateEnterpriseMembersCanMakePurchasesSettingPayload - """Transfer an issue to a different repository""" - transferIssue(input: TransferIssueInput!): TransferIssuePayload + """ + Sets the members can update protected branches setting for an enterprise. + """ + updateEnterpriseMembersCanUpdateProtectedBranchesSetting(input: UpdateEnterpriseMembersCanUpdateProtectedBranchesSettingInput!): UpdateEnterpriseMembersCanUpdateProtectedBranchesSettingPayload - """Deletes a repository link from a project.""" - unlinkRepositoryFromProject(input: UnlinkRepositoryFromProjectInput!): UnlinkRepositoryFromProjectPayload + """Sets the members can view dependency insights for an enterprise.""" + updateEnterpriseMembersCanViewDependencyInsightsSetting(input: UpdateEnterpriseMembersCanViewDependencyInsightsSettingInput!): UpdateEnterpriseMembersCanViewDependencyInsightsSettingPayload - """Unlock a lockable object""" - unlockLockable(input: UnlockLockableInput!): UnlockLockablePayload + """Sets whether organization projects are enabled for an enterprise.""" + updateEnterpriseOrganizationProjectsSetting(input: UpdateEnterpriseOrganizationProjectsSettingInput!): UpdateEnterpriseOrganizationProjectsSettingPayload - """Unmark an issue as a duplicate of another issue.""" - unmarkIssueAsDuplicate(input: UnmarkIssueAsDuplicateInput!): UnmarkIssueAsDuplicatePayload + """Updates an enterprise's profile.""" + updateEnterpriseProfile(input: UpdateEnterpriseProfileInput!): UpdateEnterpriseProfilePayload - """Marks a review thread as unresolved.""" - unresolveReviewThread(input: UnresolveReviewThreadInput!): UnresolveReviewThreadPayload + """Sets whether repository projects are enabled for a enterprise.""" + updateEnterpriseRepositoryProjectsSetting(input: UpdateEnterpriseRepositoryProjectsSettingInput!): UpdateEnterpriseRepositoryProjectsSettingPayload - """Create a new branch protection rule""" - updateBranchProtectionRule(input: UpdateBranchProtectionRuleInput!): UpdateBranchProtectionRulePayload + """Sets whether team discussions are enabled for an enterprise.""" + updateEnterpriseTeamDiscussionsSetting(input: UpdateEnterpriseTeamDiscussionsSettingInput!): UpdateEnterpriseTeamDiscussionsSettingPayload - """Update a check run""" - updateCheckRun(input: UpdateCheckRunInput!): UpdateCheckRunPayload + """ + Sets whether two factor authentication is required for all users in an enterprise. + """ + updateEnterpriseTwoFactorAuthenticationRequiredSetting(input: UpdateEnterpriseTwoFactorAuthenticationRequiredSettingInput!): UpdateEnterpriseTwoFactorAuthenticationRequiredSettingPayload - """Modifies the settings of an existing check suite""" - updateCheckSuitePreferences(input: UpdateCheckSuitePreferencesInput!): UpdateCheckSuitePreferencesPayload + """Sets whether an IP allow list is enabled on an owner.""" + updateIpAllowListEnabledSetting(input: UpdateIpAllowListEnabledSettingInput!): UpdateIpAllowListEnabledSettingPayload + + """Updates an IP allow list entry.""" + updateIpAllowListEntry(input: UpdateIpAllowListEntryInput!): UpdateIpAllowListEntryPayload """Updates an Issue.""" updateIssue(input: UpdateIssueInput!): UpdateIssuePayload @@ -6841,6 +9592,12 @@ type Mutation { """Updates the state for subscribable subjects.""" updateSubscription(input: UpdateSubscriptionInput!): UpdateSubscriptionPayload + """Updates a team discussion.""" + updateTeamDiscussion(input: UpdateTeamDiscussionInput!): UpdateTeamDiscussionPayload + + """Updates a discussion comment.""" + updateTeamDiscussionComment(input: UpdateTeamDiscussionCommentInput!): UpdateTeamDiscussionCommentPayload + """Replaces the repository's topics with the given topics.""" updateTopics(input: UpdateTopicsInput!): UpdateTopicsPayload } @@ -6905,6 +9662,9 @@ type OauthApplicationCreateAuditEntry implements Node & AuditEntry & OauthApplic """The HTTP URL for the OAuth Application""" oauthApplicationUrl: URI + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -6952,18 +9712,28 @@ enum OauthApplicationCreateAuditEntryState { PENDING_DELETION } -"""The state of an OAuth Application when its tokens were revoked.""" -enum OauthApplicationRevokeTokensAuditEntryState { - """The OAuth Application was active and allowed to have OAuth Accesses.""" - ACTIVE +"""The corresponding operation type for the action""" +enum OperationType { + """An existing resource was accessed""" + ACCESS - """ - The OAuth Application was suspended from generating OAuth Accesses due to abuse or security concerns. - """ - SUSPENDED + """A resource performed an authentication event""" + AUTHENTICATION - """The OAuth Application was in the process of being deleted.""" - PENDING_DELETION + """A new resource was created""" + CREATE + + """An existing resource was modified""" + MODIFY + + """An existing resource was removed""" + REMOVE + + """An existing resource was restored""" + RESTORE + + """An existing resource was transferred between multiple resources""" + TRANSFER } """ @@ -7009,6 +9779,9 @@ type OrgAddBillingManagerAuditEntry implements Node & AuditEntry & OrganizationA """ invitationEmail: String + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -7063,6 +9836,9 @@ type OrgAddMemberAuditEntry implements Node & AuditEntry & OrganizationAuditEntr createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -7105,7 +9881,7 @@ enum OrgAddMemberAuditEntryPermission { """ An account on GitHub, with one or more owners, that has repositories, members and teams. """ -type Organization implements Node & Actor & RegistryPackageOwner & RegistryPackageSearch & ProjectOwner & RepositoryOwner & UniformResourceLocatable & MemberStatusable & ProfileOwner { +type Organization implements Node & Actor & PackageOwner & ProjectOwner & RepositoryOwner & UniformResourceLocatable & MemberStatusable & ProfileOwner & Sponsorable { """ Determine if this repository owner has any items that can be pinned to their profile. """ @@ -7134,7 +9910,7 @@ type Organization implements Node & Actor & RegistryPackageOwner & RegistryPacka query: String """Ordering options for the returned audit log entries.""" - orderBy: AuditLogOrder + orderBy: AuditLogOrder = {field: CREATED_AT, direction: DESC} ): OrganizationAuditEntryConnection! """A URL pointing to the organization's public avatar.""" @@ -7143,17 +9919,61 @@ type Organization implements Node & Actor & RegistryPackageOwner & RegistryPacka size: Int ): URI! + """Identifies the date and time when the object was created.""" + createdAt: DateTime! + """Identifies the primary key from the database.""" databaseId: Int """The organization's public profile description.""" description: String + """The organization's public profile description rendered to HTML.""" + descriptionHTML: String + """The organization's public email.""" email: String + + """True if this user/organization has a GitHub Sponsors listing.""" + hasSponsorsListing: Boolean! id: ID! - """Whether the organization has verified its profile email and website.""" + """The interaction ability settings for this organization.""" + interactionAbility: RepositoryInteractionAbility + + """ + The setting value for whether the organization has an IP allow list enabled. + """ + ipAllowListEnabledSetting: IpAllowListEnabledSettingValue! + + """ + The IP addresses that are allowed to access resources owned by the organization. + """ + ipAllowListEntries( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + + """Ordering options for IP allow list entries returned.""" + orderBy: IpAllowListEntryOrder = {field: ALLOW_LIST_VALUE, direction: ASC} + ): IpAllowListEntryConnection! + + """True if the viewer is sponsored by this user/organization.""" + isSponsoringViewer: Boolean! + + """ + Whether the organization has verified its profile email and website, always false on Enterprise. + """ isVerified: Boolean! """ @@ -7187,7 +10007,7 @@ type Organization implements Node & Actor & RegistryPackageOwner & RegistryPacka last: Int """Ordering options for user statuses returned from the connection.""" - orderBy: UserStatusOrder + orderBy: UserStatusOrder = {field: UPDATED_AT, direction: DESC} ): UserStatusConnection! """A list of users who are members of this organization.""" @@ -7219,6 +10039,35 @@ type Organization implements Node & Actor & RegistryPackageOwner & RegistryPacka """The billing email for the organization.""" organizationBillingEmail: String + """A list of packages under the owner.""" + packages( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + + """Find packages by their names.""" + names: [String] + + """Find packages in a repository by ID.""" + repositoryId: ID + + """Filter registry package by type.""" + packageType: PackageType + + """Ordering of the returned packages.""" + orderBy: PackageOrder = {field: CREATED_AT, direction: DESC} + ): PackageConnection! + """A list of users who have been invited to join this organization.""" pendingMembers( """Returns the elements in the list that come after the specified cursor.""" @@ -7323,64 +10172,6 @@ type Organization implements Node & Actor & RegistryPackageOwner & RegistryPacka """The HTTP URL listing organization's projects""" projectsUrl: URI! - """A list of registry packages under the owner.""" - registryPackages( - """Returns the elements in the list that come after the specified cursor.""" - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """Returns the first _n_ elements from the list.""" - first: Int - - """Returns the last _n_ elements from the list.""" - last: Int - - """Find registry package by name.""" - name: String - - """Find registry packages by their names.""" - names: [String] - - """Find registry packages in a repository.""" - repositoryId: ID - - """Filter registry package by type.""" - packageType: RegistryPackageType - - """Filter registry package by type (string).""" - registryPackageType: String - - """Filter registry package by whether it is publicly visible""" - publicOnly: Boolean = false - ): RegistryPackageConnection! - - """A list of registry packages for a particular search query.""" - registryPackagesForQuery( - """Returns the elements in the list that come after the specified cursor.""" - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """Returns the first _n_ elements from the list.""" - first: Int - - """Returns the last _n_ elements from the list.""" - last: Int - - """Find registry package by search query.""" - query: String - - """Filter registry package by type.""" - packageType: RegistryPackageType - ): RegistryPackageConnection! - """A list of repositories that the user owns.""" repositories( """If non-null, filters repositories according to privacy""" @@ -7394,7 +10185,7 @@ type Organization implements Node & Actor & RegistryPackageOwner & RegistryPacka connection. For example, OWNER will include only repositories that the current viewer owns. """ - affiliations: [RepositoryAffiliation] = [OWNER, COLLABORATOR] + affiliations: [RepositoryAffiliation] """ Array of owner's affiliation options for repositories returned from the @@ -7446,6 +10237,58 @@ type Organization implements Node & Actor & RegistryPackageOwner & RegistryPacka """The Organization's SAML identity providers""" samlIdentityProvider: OrganizationIdentityProvider + """The GitHub Sponsors listing for this user or organization.""" + sponsorsListing: SponsorsListing + + """This object's sponsorships as the maintainer.""" + sponsorshipsAsMaintainer( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + + """Whether or not to include private sponsorships in the result set""" + includePrivate: Boolean = false + + """ + Ordering options for sponsorships returned from this connection. If left + blank, the sponsorships will be ordered based on relevancy to the viewer. + """ + orderBy: SponsorshipOrder + ): SponsorshipConnection! + + """This object's sponsorships as the sponsor.""" + sponsorshipsAsSponsor( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + + """ + Ordering options for sponsorships returned from this connection. If left + blank, the sponsorships will be ordered based on relevancy to the viewer. + """ + orderBy: SponsorshipOrder + ): SponsorshipConnection! + """Find an organization's team by its slug.""" team( """The name or slug of the team to find.""" @@ -7500,6 +10343,12 @@ type Organization implements Node & Actor & RegistryPackageOwner & RegistryPacka """The HTTP URL listing organization's teams""" teamsUrl: URI! + """The organization's Twitter username.""" + twitterUsername: String + + """Identifies the date and time when the object was last updated.""" + updatedAt: DateTime! + """The HTTP URL for this organization.""" url: URI! @@ -7518,15 +10367,21 @@ type Organization implements Node & Actor & RegistryPackageOwner & RegistryPacka """Viewer can create teams on this organization.""" viewerCanCreateTeams: Boolean! + """Whether or not the viewer is able to sponsor this user/organization.""" + viewerCanSponsor: Boolean! + """Viewer is an active member of this organization.""" viewerIsAMember: Boolean! + """True if the viewer is sponsoring this user/organization.""" + viewerIsSponsoring: Boolean! + """The organization's public profile URL.""" websiteUrl: URI } """An audit entry in an organization audit log.""" -union OrganizationAuditEntry = MembersCanDeleteReposClearAuditEntry | MembersCanDeleteReposDisableAuditEntry | MembersCanDeleteReposEnableAuditEntry | OauthApplicationCreateAuditEntry | OrgAddBillingManagerAuditEntry | OrgAddMemberAuditEntry | OrgBlockUserAuditEntry | OrgConfigDisableCollaboratorsOnlyAuditEntry | OrgConfigEnableCollaboratorsOnlyAuditEntry | OrgDisableOauthAppRestrictionsAuditEntry | OrgDisableSamlAuditEntry | OrgDisableTwoFactorRequirementAuditEntry | OrgEnableOauthAppRestrictionsAuditEntry | OrgEnableSamlAuditEntry | OrgEnableTwoFactorRequirementAuditEntry | OrgInviteMemberAuditEntry | OrgInviteToBusinessAuditEntry | OrgOauthAppAccessApprovedAuditEntry | OrgOauthAppAccessDeniedAuditEntry | OrgOauthAppAccessRequestedAuditEntry | OrgRemoveBillingManagerAuditEntry | OrgRemoveMemberAuditEntry | OrgRemoveOutsideCollaboratorAuditEntry | OrgRestoreMemberAuditEntry | OrgUnblockUserAuditEntry | OrgUpdateDefaultRepositoryPermissionAuditEntry | OrgUpdateMemberAuditEntry | OrgUpdateMemberRepositoryCreationPermissionAuditEntry | OrgUpdateMemberRepositoryInvitationPermissionAuditEntry | PrivateRepositoryForkingDisableAuditEntry | PrivateRepositoryForkingEnableAuditEntry | RepoAccessAuditEntry | RepoAddMemberAuditEntry | RepoAddTopicAuditEntry | RepoArchivedAuditEntry | RepoChangeMergeSettingAuditEntry | RepoConfigDisableAnonymousGitAccessAuditEntry | RepoConfigDisableCollaboratorsOnlyAuditEntry | RepoConfigDisableContributorsOnlyAuditEntry | RepoConfigDisableSockpuppetDisallowedAuditEntry | RepoConfigEnableAnonymousGitAccessAuditEntry | RepoConfigEnableCollaboratorsOnlyAuditEntry | RepoConfigEnableContributorsOnlyAuditEntry | RepoConfigEnableSockpuppetDisallowedAuditEntry | RepoConfigLockAnonymousGitAccessAuditEntry | RepoConfigUnlockAnonymousGitAccessAuditEntry | RepoCreateAuditEntry | RepoDestroyAuditEntry | RepoRemoveMemberAuditEntry | RepoRemoveTopicAuditEntry | RepositoryVisibilityChangeDisableAuditEntry | RepositoryVisibilityChangeEnableAuditEntry | TeamAddMemberAuditEntry | TeamAddRepositoryAuditEntry | TeamChangeParentTeamAuditEntry | TeamRemoveMemberAuditEntry | TeamRemoveRepositoryAuditEntry +union OrganizationAuditEntry = MembersCanDeleteReposClearAuditEntry | MembersCanDeleteReposDisableAuditEntry | MembersCanDeleteReposEnableAuditEntry | OauthApplicationCreateAuditEntry | OrgAddBillingManagerAuditEntry | OrgAddMemberAuditEntry | OrgBlockUserAuditEntry | OrgConfigDisableCollaboratorsOnlyAuditEntry | OrgConfigEnableCollaboratorsOnlyAuditEntry | OrgCreateAuditEntry | OrgDisableOauthAppRestrictionsAuditEntry | OrgDisableSamlAuditEntry | OrgDisableTwoFactorRequirementAuditEntry | OrgEnableOauthAppRestrictionsAuditEntry | OrgEnableSamlAuditEntry | OrgEnableTwoFactorRequirementAuditEntry | OrgInviteMemberAuditEntry | OrgInviteToBusinessAuditEntry | OrgOauthAppAccessApprovedAuditEntry | OrgOauthAppAccessDeniedAuditEntry | OrgOauthAppAccessRequestedAuditEntry | OrgRemoveBillingManagerAuditEntry | OrgRemoveMemberAuditEntry | OrgRemoveOutsideCollaboratorAuditEntry | OrgRestoreMemberAuditEntry | OrgUnblockUserAuditEntry | OrgUpdateDefaultRepositoryPermissionAuditEntry | OrgUpdateMemberAuditEntry | OrgUpdateMemberRepositoryCreationPermissionAuditEntry | OrgUpdateMemberRepositoryInvitationPermissionAuditEntry | PrivateRepositoryForkingDisableAuditEntry | PrivateRepositoryForkingEnableAuditEntry | RepoAccessAuditEntry | RepoAddMemberAuditEntry | RepoAddTopicAuditEntry | RepoArchivedAuditEntry | RepoChangeMergeSettingAuditEntry | RepoConfigDisableAnonymousGitAccessAuditEntry | RepoConfigDisableCollaboratorsOnlyAuditEntry | RepoConfigDisableContributorsOnlyAuditEntry | RepoConfigDisableSockpuppetDisallowedAuditEntry | RepoConfigEnableAnonymousGitAccessAuditEntry | RepoConfigEnableCollaboratorsOnlyAuditEntry | RepoConfigEnableContributorsOnlyAuditEntry | RepoConfigEnableSockpuppetDisallowedAuditEntry | RepoConfigLockAnonymousGitAccessAuditEntry | RepoConfigUnlockAnonymousGitAccessAuditEntry | RepoCreateAuditEntry | RepoDestroyAuditEntry | RepoRemoveMemberAuditEntry | RepoRemoveTopicAuditEntry | RepositoryVisibilityChangeDisableAuditEntry | RepositoryVisibilityChangeEnableAuditEntry | TeamAddMemberAuditEntry | TeamAddRepositoryAuditEntry | TeamChangeParentTeamAuditEntry | TeamRemoveMemberAuditEntry | TeamRemoveRepositoryAuditEntry """The connection type for OrganizationAuditEntry.""" type OrganizationAuditEntryConnection { @@ -7726,30 +10581,126 @@ type OrganizationMemberConnection { totalCount: Int! } -"""Represents a user within an organization.""" -type OrganizationMemberEdge { - """A cursor for use in pagination.""" - cursor: String! +"""Represents a user within an organization.""" +type OrganizationMemberEdge { + """A cursor for use in pagination.""" + cursor: String! + + """ + Whether the organization member has two factor enabled or not. Returns null if information is not available to viewer. + """ + hasTwoFactorEnabled: Boolean + + """The item at the end of the edge.""" + node: User + + """The role this user has in the organization.""" + role: OrganizationMemberRole +} + +"""The possible roles within an organization for its members.""" +enum OrganizationMemberRole { + """The user is a member of the organization.""" + MEMBER + + """The user is an administrator of the organization.""" + ADMIN +} + +""" +The possible values for the members can create repositories setting on an organization. +""" +enum OrganizationMembersCanCreateRepositoriesSettingValue { + """Members will be able to create public and private repositories.""" + ALL + + """Members will be able to create only private repositories.""" + PRIVATE + + """Members will not be able to create public or private repositories.""" + DISABLED +} + +"""Ordering options for organization connections.""" +input OrganizationOrder { + """The field to order organizations by.""" + field: OrganizationOrderField! + + """The ordering direction.""" + direction: OrderDirection! +} + +"""Properties by which organization connections can be ordered.""" +enum OrganizationOrderField { + """Order organizations by creation time""" + CREATED_AT + + """Order organizations by login""" + LOGIN +} + +"""An organization list hovercard context""" +type OrganizationsHovercardContext implements HovercardContext { + """A string describing this context""" + message: String! + + """An octicon to accompany this context""" + octicon: String! + + """Organizations this user is a member of that are relevant""" + relevantOrganizations( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + ): OrganizationConnection! + + """The total number of organizations this user is in""" + totalOrganizationCount: Int! +} + +"""An organization teams hovercard context""" +type OrganizationTeamsHovercardContext implements HovercardContext { + """A string describing this context""" + message: String! - """ - Whether the organization member has two factor enabled or not. Returns null if information is not available to viewer. - """ - hasTwoFactorEnabled: Boolean + """An octicon to accompany this context""" + octicon: String! - """The item at the end of the edge.""" - node: User + """Teams in this organization the user is a member of that are relevant""" + relevantTeams( + """Returns the elements in the list that come after the specified cursor.""" + after: String - """The role this user has in the organization.""" - role: OrganizationMemberRole -} + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String -"""The possible roles within an organization for its members.""" -enum OrganizationMemberRole { - """The user is a member of the organization.""" - MEMBER + """Returns the first _n_ elements from the list.""" + first: Int - """The user is an administrator of the organization.""" - ADMIN + """Returns the last _n_ elements from the list.""" + last: Int + ): TeamConnection! + + """The path for the full team list for this user""" + teamsResourcePath: URI! + + """The URL for the full team list for this user""" + teamsUrl: URI! + + """The total number of teams the user is on in the organization""" + totalTeamCount: Int! } """Audit log entry for a org.block_user""" @@ -7791,6 +10742,9 @@ type OrgBlockUserAuditEntry implements Node & AuditEntry & OrganizationAuditEntr createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -7845,6 +10799,9 @@ type OrgConfigDisableCollaboratorsOnlyAuditEntry implements Node & AuditEntry & createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -7899,6 +10856,69 @@ type OrgConfigEnableCollaboratorsOnlyAuditEntry implements Node & AuditEntry & O createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + + """The Organization associated with the Audit Entry.""" + organization: Organization + + """The name of the Organization.""" + organizationName: String + + """The HTTP path for the organization""" + organizationResourcePath: URI + + """The HTTP URL for the organization""" + organizationUrl: URI + + """The user affected by the action""" + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """The HTTP path for the user.""" + userResourcePath: URI + + """The HTTP URL for the user.""" + userUrl: URI +} + +"""Audit log entry for a org.create event.""" +type OrgCreateAuditEntry implements Node & AuditEntry & OrganizationAuditEntryData { + """The action name""" + action: String! + + """The user who initiated the action""" + actor: AuditEntryActor + + """The IP address of the actor""" + actorIp: String + + """A readable representation of the actor's location""" + actorLocation: ActorLocation + + """The username of the user who initiated the action""" + actorLogin: String + + """The HTTP path for the actor.""" + actorResourcePath: URI + + """The HTTP URL for the actor.""" + actorUrl: URI + + """The billing plan for the Organization.""" + billingPlan: OrgCreateAuditEntryBillingPlan + + """The time the action was initiated""" + createdAt: PreciseDateTime! + id: ID! + + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -7926,6 +10946,24 @@ type OrgConfigEnableCollaboratorsOnlyAuditEntry implements Node & AuditEntry & O userUrl: URI } +"""The billing plans available for organizations.""" +enum OrgCreateAuditEntryBillingPlan { + """Free Plan""" + FREE + + """Team Plan""" + BUSINESS + + """Enterprise Cloud Plan""" + BUSINESS_PLUS + + """Legacy Unlimited Plan""" + UNLIMITED + + """Tiered Per Seat Plan""" + TIERED_PER_SEAT +} + """Audit log entry for a org.disable_oauth_app_restrictions event.""" type OrgDisableOauthAppRestrictionsAuditEntry implements Node & AuditEntry & OrganizationAuditEntryData { """The action name""" @@ -7953,6 +10991,9 @@ type OrgDisableOauthAppRestrictionsAuditEntry implements Node & AuditEntry & Org createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -8013,6 +11054,9 @@ type OrgDisableSamlAuditEntry implements Node & AuditEntry & OrganizationAuditEn """The SAML provider's issuer URL.""" issuerUrl: URI + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -8073,6 +11117,9 @@ type OrgDisableTwoFactorRequirementAuditEntry implements Node & AuditEntry & Org createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -8127,6 +11174,9 @@ type OrgEnableOauthAppRestrictionsAuditEntry implements Node & AuditEntry & Orga createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -8187,6 +11237,9 @@ type OrgEnableSamlAuditEntry implements Node & AuditEntry & OrganizationAuditEnt """The SAML provider's issuer URL.""" issuerUrl: URI + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -8247,6 +11300,9 @@ type OrgEnableTwoFactorRequirementAuditEntry implements Node & AuditEntry & Orga createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -8304,6 +11360,9 @@ type OrgInviteMemberAuditEntry implements Node & AuditEntry & OrganizationAuditE email: String id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -8370,6 +11429,9 @@ type OrgInviteToBusinessAuditEntry implements Node & AuditEntry & EnterpriseAudi enterpriseUrl: URI id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -8433,6 +11495,9 @@ type OrgOauthAppAccessApprovedAuditEntry implements Node & AuditEntry & OauthApp """The HTTP URL for the OAuth Application""" oauthApplicationUrl: URI + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -8496,6 +11561,9 @@ type OrgOauthAppAccessDeniedAuditEntry implements Node & AuditEntry & OauthAppli """The HTTP URL for the OAuth Application""" oauthApplicationUrl: URI + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -8559,6 +11627,9 @@ type OrgOauthAppAccessRequestedAuditEntry implements Node & AuditEntry & OauthAp """The HTTP URL for the OAuth Application""" oauthApplicationUrl: URI + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -8613,6 +11684,9 @@ type OrgRemoveBillingManagerAuditEntry implements Node & AuditEntry & Organizati createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -8687,6 +11761,9 @@ type OrgRemoveMemberAuditEntry implements Node & AuditEntry & OrganizationAuditE """The types of membership the member has with the organization.""" membershipTypes: [OrgRemoveMemberAuditEntryMembershipType!] + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -8761,6 +11838,12 @@ enum OrgRemoveMemberAuditEntryReason { """SAML SSO enforcement requires an external identity""" SAML_SSO_ENFORCEMENT_REQUIRES_EXTERNAL_IDENTITY + + """User account has been deleted""" + USER_ACCOUNT_DELETED + + """User was removed from organization during account recovery""" + TWO_FACTOR_ACCOUNT_RECOVERY } """Audit log entry for a org.remove_outside_collaborator event.""" @@ -8795,6 +11878,9 @@ type OrgRemoveOutsideCollaboratorAuditEntry implements Node & AuditEntry & Organ """ membershipTypes: [OrgRemoveOutsideCollaboratorAuditEntryMembershipType!] + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -8886,6 +11972,9 @@ type OrgRestoreMemberAuditEntry implements Node & AuditEntry & OrganizationAudit createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -8972,18 +12061,165 @@ type OrgRestoreMemberMembershipTeamAuditEntryData implements TeamAuditEntryData """The team associated with the action""" team: Team - """The name of the team""" - teamName: String + """The name of the team""" + teamName: String + + """The HTTP path for this team""" + teamResourcePath: URI + + """The HTTP URL for this team""" + teamUrl: URI +} + +"""Audit log entry for a org.unblock_user""" +type OrgUnblockUserAuditEntry implements Node & AuditEntry & OrganizationAuditEntryData { + """The action name""" + action: String! + + """The user who initiated the action""" + actor: AuditEntryActor + + """The IP address of the actor""" + actorIp: String + + """A readable representation of the actor's location""" + actorLocation: ActorLocation + + """The username of the user who initiated the action""" + actorLogin: String + + """The HTTP path for the actor.""" + actorResourcePath: URI + + """The HTTP URL for the actor.""" + actorUrl: URI + + """The user being unblocked by the organization.""" + blockedUser: User + + """The username of the blocked user.""" + blockedUserName: String + + """The HTTP path for the blocked user.""" + blockedUserResourcePath: URI + + """The HTTP URL for the blocked user.""" + blockedUserUrl: URI + + """The time the action was initiated""" + createdAt: PreciseDateTime! + id: ID! + + """The corresponding operation type for the action""" + operationType: OperationType + + """The Organization associated with the Audit Entry.""" + organization: Organization + + """The name of the Organization.""" + organizationName: String + + """The HTTP path for the organization""" + organizationResourcePath: URI + + """The HTTP URL for the organization""" + organizationUrl: URI + + """The user affected by the action""" + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """The HTTP path for the user.""" + userResourcePath: URI + + """The HTTP URL for the user.""" + userUrl: URI +} + +"""Audit log entry for a org.update_default_repository_permission""" +type OrgUpdateDefaultRepositoryPermissionAuditEntry implements Node & AuditEntry & OrganizationAuditEntryData { + """The action name""" + action: String! + + """The user who initiated the action""" + actor: AuditEntryActor + + """The IP address of the actor""" + actorIp: String + + """A readable representation of the actor's location""" + actorLocation: ActorLocation + + """The username of the user who initiated the action""" + actorLogin: String + + """The HTTP path for the actor.""" + actorResourcePath: URI + + """The HTTP URL for the actor.""" + actorUrl: URI + + """The time the action was initiated""" + createdAt: PreciseDateTime! + id: ID! + + """The corresponding operation type for the action""" + operationType: OperationType + + """The Organization associated with the Audit Entry.""" + organization: Organization + + """The name of the Organization.""" + organizationName: String + + """The HTTP path for the organization""" + organizationResourcePath: URI + + """The HTTP URL for the organization""" + organizationUrl: URI + + """The new default repository permission level for the organization.""" + permission: OrgUpdateDefaultRepositoryPermissionAuditEntryPermission + + """The former default repository permission level for the organization.""" + permissionWas: OrgUpdateDefaultRepositoryPermissionAuditEntryPermission + + """The user affected by the action""" + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """The HTTP path for the user.""" + userResourcePath: URI + + """The HTTP URL for the user.""" + userUrl: URI +} + +"""The default permission a repository can have in an Organization.""" +enum OrgUpdateDefaultRepositoryPermissionAuditEntryPermission { + """Can read and clone repositories.""" + READ + + """Can read, clone and push to repositories.""" + WRITE - """The HTTP path for this team""" - teamResourcePath: URI + """Can read, clone, push, and add collaborators to repositories.""" + ADMIN - """The HTTP URL for this team""" - teamUrl: URI + """No default permission value.""" + NONE } -"""Audit log entry for a org.unblock_user""" -type OrgUnblockUserAuditEntry implements Node & AuditEntry & OrganizationAuditEntryData { +"""Audit log entry for a org.update_member event.""" +type OrgUpdateMemberAuditEntry implements Node & AuditEntry & OrganizationAuditEntryData { """The action name""" action: String! @@ -9005,22 +12241,13 @@ type OrgUnblockUserAuditEntry implements Node & AuditEntry & OrganizationAuditEn """The HTTP URL for the actor.""" actorUrl: URI - """The user being unblocked by the organization.""" - blockedUser: User - - """The username of the blocked user.""" - blockedUserName: String - - """The HTTP path for the blocked user.""" - blockedUserResourcePath: URI - - """The HTTP URL for the blocked user.""" - blockedUserUrl: URI - """The time the action was initiated""" createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -9033,6 +12260,12 @@ type OrgUnblockUserAuditEntry implements Node & AuditEntry & OrganizationAuditEn """The HTTP URL for the organization""" organizationUrl: URI + """The new member permission level for the organization.""" + permission: OrgUpdateMemberAuditEntryPermission + + """The former member permission level for the organization.""" + permissionWas: OrgUpdateMemberAuditEntryPermission + """The user affected by the action""" user: User @@ -9048,8 +12281,19 @@ type OrgUnblockUserAuditEntry implements Node & AuditEntry & OrganizationAuditEn userUrl: URI } -"""Audit log entry for a org.update_default_repository_permission""" -type OrgUpdateDefaultRepositoryPermissionAuditEntry implements Node & AuditEntry & OrganizationAuditEntryData { +"""The permissions available to members on an Organization.""" +enum OrgUpdateMemberAuditEntryPermission { + """Can read and clone repositories.""" + READ + + """Can read, clone, push, and add collaborators to repositories.""" + ADMIN +} + +""" +Audit log entry for a org.update_member_repository_creation_permission event. +""" +type OrgUpdateMemberRepositoryCreationPermissionAuditEntry implements Node & AuditEntry & OrganizationAuditEntryData { """The action name""" action: String! @@ -9071,10 +12315,16 @@ type OrgUpdateDefaultRepositoryPermissionAuditEntry implements Node & AuditEntry """The HTTP URL for the actor.""" actorUrl: URI + """Can members create repositories in the organization.""" + canCreateRepositories: Boolean + """The time the action was initiated""" createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -9087,12 +12337,6 @@ type OrgUpdateDefaultRepositoryPermissionAuditEntry implements Node & AuditEntry """The HTTP URL for the organization""" organizationUrl: URI - """The new default repository permission level for the organization.""" - permission: OrgUpdateDefaultRepositoryPermissionAuditEntryPermission - - """The former default repository permission level for the organization.""" - permissionWas: OrgUpdateDefaultRepositoryPermissionAuditEntryPermission - """The user affected by the action""" user: User @@ -9106,25 +12350,58 @@ type OrgUpdateDefaultRepositoryPermissionAuditEntry implements Node & AuditEntry """The HTTP URL for the user.""" userUrl: URI -} -"""The default permission a repository can have in an Organization.""" -enum OrgUpdateDefaultRepositoryPermissionAuditEntryPermission { - """Can read and clone repositories.""" - READ + """ + The permission for visibility level of repositories for this organization. + """ + visibility: OrgUpdateMemberRepositoryCreationPermissionAuditEntryVisibility +} - """Can read, clone and push to repositories.""" - WRITE +"""The permissions available for repository creation on an Organization.""" +enum OrgUpdateMemberRepositoryCreationPermissionAuditEntryVisibility { + """ + All organization members are restricted from creating any repositories. + """ + ALL - """Can read, clone, push, and add collaborators to repositories.""" - ADMIN + """ + All organization members are restricted from creating public repositories. + """ + PUBLIC - """No default permission value.""" + """All organization members are allowed to create any repositories.""" NONE + + """ + All organization members are restricted from creating private repositories. + """ + PRIVATE + + """ + All organization members are restricted from creating internal repositories. + """ + INTERNAL + + """ + All organization members are restricted from creating public or internal repositories. + """ + PUBLIC_INTERNAL + + """ + All organization members are restricted from creating private or internal repositories. + """ + PRIVATE_INTERNAL + + """ + All organization members are restricted from creating public or private repositories. + """ + PUBLIC_PRIVATE } -"""Audit log entry for a org.update_member event.""" -type OrgUpdateMemberAuditEntry implements Node & AuditEntry & OrganizationAuditEntryData { +""" +Audit log entry for a org.update_member_repository_invitation_permission event. +""" +type OrgUpdateMemberRepositoryInvitationPermissionAuditEntry implements Node & AuditEntry & OrganizationAuditEntryData { """The action name""" action: String! @@ -9146,10 +12423,18 @@ type OrgUpdateMemberAuditEntry implements Node & AuditEntry & OrganizationAuditE """The HTTP URL for the actor.""" actorUrl: URI + """ + Can outside collaborators be invited to repositories in the organization. + """ + canInviteOutsideCollaboratorsToRepositories: Boolean + """The time the action was initiated""" createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -9162,12 +12447,6 @@ type OrgUpdateMemberAuditEntry implements Node & AuditEntry & OrganizationAuditE """The HTTP URL for the organization""" organizationUrl: URI - """The new member permission level for the organization.""" - permission: OrgUpdateMemberAuditEntryPermission - - """The former member permission level for the organization.""" - permissionWas: OrgUpdateMemberAuditEntryPermission - """The user affected by the action""" user: User @@ -9183,151 +12462,331 @@ type OrgUpdateMemberAuditEntry implements Node & AuditEntry & OrganizationAuditE userUrl: URI } -"""The permissions available to members on an Organization.""" -enum OrgUpdateMemberAuditEntryPermission { - """Can read and clone repositories.""" - READ +"""Information for an uploaded package.""" +type Package implements Node { + id: ID! - """Can read, clone, push, and add collaborators to repositories.""" - ADMIN + """Find the latest version for the package.""" + latestVersion: PackageVersion + + """Identifies the name of the package.""" + name: String! + + """Identifies the type of the package.""" + packageType: PackageType! + + """The repository this package belongs to.""" + repository: Repository + + """Statistics about package activity.""" + statistics: PackageStatistics + + """Find package version by version string.""" + version( + """The package version.""" + version: String! + ): PackageVersion + + """list of versions for this package""" + versions( + """Ordering of the returned packages.""" + orderBy: PackageVersionOrder = {field: CREATED_AT, direction: DESC} + + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + ): PackageVersionConnection! } -""" -Audit log entry for a org.update_member_repository_creation_permission event. -""" -type OrgUpdateMemberRepositoryCreationPermissionAuditEntry implements Node & AuditEntry & OrganizationAuditEntryData { - """The action name""" - action: String! +"""The connection type for Package.""" +type PackageConnection { + """A list of edges.""" + edges: [PackageEdge] - """The user who initiated the action""" - actor: AuditEntryActor + """A list of nodes.""" + nodes: [Package] - """The IP address of the actor""" - actorIp: String + """Information to aid in pagination.""" + pageInfo: PageInfo! - """A readable representation of the actor's location""" - actorLocation: ActorLocation + """Identifies the total count of items in the connection.""" + totalCount: Int! +} + +"""An edge in a connection.""" +type PackageEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of the edge.""" + node: Package +} + +"""A file in a package version.""" +type PackageFile implements Node { + id: ID! + + """MD5 hash of the file.""" + md5: String + + """Name of the file.""" + name: String! + + """The package version this file belongs to.""" + packageVersion: PackageVersion + + """SHA1 hash of the file.""" + sha1: String + + """SHA256 hash of the file.""" + sha256: String + + """Size of the file in bytes.""" + size: Int + + """Identifies the date and time when the object was last updated.""" + updatedAt: DateTime! + + """URL to download the asset.""" + url: URI +} + +"""The connection type for PackageFile.""" +type PackageFileConnection { + """A list of edges.""" + edges: [PackageFileEdge] + + """A list of nodes.""" + nodes: [PackageFile] + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """Identifies the total count of items in the connection.""" + totalCount: Int! +} + +"""An edge in a connection.""" +type PackageFileEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of the edge.""" + node: PackageFile +} + +"""Ways in which lists of package files can be ordered upon return.""" +input PackageFileOrder { + """The field in which to order package files by.""" + field: PackageFileOrderField + + """The direction in which to order package files by the specified field.""" + direction: OrderDirection +} + +"""Properties by which package file connections can be ordered.""" +enum PackageFileOrderField { + """Order package files by creation time""" + CREATED_AT +} + +"""Ways in which lists of packages can be ordered upon return.""" +input PackageOrder { + """The field in which to order packages by.""" + field: PackageOrderField + + """The direction in which to order packages by the specified field.""" + direction: OrderDirection +} + +"""Properties by which package connections can be ordered.""" +enum PackageOrderField { + """Order packages by creation time""" + CREATED_AT +} + +"""Represents an owner of a package.""" +interface PackageOwner { + id: ID! + + """A list of packages under the owner.""" + packages( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int - """The username of the user who initiated the action""" - actorLogin: String + """Find packages by their names.""" + names: [String] - """The HTTP path for the actor.""" - actorResourcePath: URI + """Find packages in a repository by ID.""" + repositoryId: ID - """The HTTP URL for the actor.""" - actorUrl: URI + """Filter registry package by type.""" + packageType: PackageType - """Can members create repositories in the organization.""" - canCreateRepositories: Boolean + """Ordering of the returned packages.""" + orderBy: PackageOrder = {field: CREATED_AT, direction: DESC} + ): PackageConnection! +} - """The time the action was initiated""" - createdAt: PreciseDateTime! +""" +Represents a object that contains package activity statistics such as downloads. +""" +type PackageStatistics { + """Number of times the package was downloaded since it was created.""" + downloadsTotalCount: Int! +} + +"""A version tag contains the mapping between a tag name and a version.""" +type PackageTag implements Node { id: ID! - """The Organization associated with the Audit Entry.""" - organization: Organization + """Identifies the tag name of the version.""" + name: String! - """The name of the Organization.""" - organizationName: String + """Version that the tag is associated with.""" + version: PackageVersion +} - """The HTTP path for the organization""" - organizationResourcePath: URI +"""The possible types of a package.""" +enum PackageType { + """An npm package.""" + NPM - """The HTTP URL for the organization""" - organizationUrl: URI + """A rubygems package.""" + RUBYGEMS - """The user affected by the action""" - user: User + """A maven package.""" + MAVEN - """ - For actions involving two users, the actor is the initiator and the user is the affected user. - """ - userLogin: String + """A docker image.""" + DOCKER - """The HTTP path for the user.""" - userResourcePath: URI + """A debian package.""" + DEBIAN - """The HTTP URL for the user.""" - userUrl: URI + """A nuget package.""" + NUGET - """ - The permission for visibility level of repositories for this organization. - """ - visibility: OrgUpdateMemberRepositoryCreationPermissionAuditEntryVisibility + """A python package.""" + PYPI } -"""The permissions available for repository creation on an Organization.""" -enum OrgUpdateMemberRepositoryCreationPermissionAuditEntryVisibility { - """ - All organization members are restricted from creating any repositories. - """ - ALL +"""Information about a specific package version.""" +type PackageVersion implements Node { + """List of files associated with this package version""" + files( + """Ordering of the returned package files.""" + orderBy: PackageFileOrder = {field: CREATED_AT, direction: ASC} - """ - All organization members are restricted from creating public repositories. - """ - PUBLIC -} + """Returns the elements in the list that come after the specified cursor.""" + after: String -""" -Audit log entry for a org.update_member_repository_invitation_permission event. -""" -type OrgUpdateMemberRepositoryInvitationPermissionAuditEntry implements Node & AuditEntry & OrganizationAuditEntryData { - """The action name""" - action: String! + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String - """The user who initiated the action""" - actor: AuditEntryActor + """Returns the first _n_ elements from the list.""" + first: Int - """The IP address of the actor""" - actorIp: String + """Returns the last _n_ elements from the list.""" + last: Int + ): PackageFileConnection! + id: ID! - """A readable representation of the actor's location""" - actorLocation: ActorLocation + """The package associated with this version.""" + package: Package - """The username of the user who initiated the action""" - actorLogin: String + """The platform this version was built for.""" + platform: String - """The HTTP path for the actor.""" - actorResourcePath: URI + """Whether or not this version is a pre-release.""" + preRelease: Boolean! - """The HTTP URL for the actor.""" - actorUrl: URI + """The README of this package version.""" + readme: String - """ - Can outside collaborators be invited to repositories in the organization. - """ - canInviteOutsideCollaboratorsToRepositories: Boolean + """The release associated with this package version.""" + release: Release - """The time the action was initiated""" - createdAt: PreciseDateTime! - id: ID! + """Statistics about package activity.""" + statistics: PackageVersionStatistics - """The Organization associated with the Audit Entry.""" - organization: Organization + """The package version summary.""" + summary: String - """The name of the Organization.""" - organizationName: String + """The version string.""" + version: String! +} - """The HTTP path for the organization""" - organizationResourcePath: URI +"""The connection type for PackageVersion.""" +type PackageVersionConnection { + """A list of edges.""" + edges: [PackageVersionEdge] - """The HTTP URL for the organization""" - organizationUrl: URI + """A list of nodes.""" + nodes: [PackageVersion] - """The user affected by the action""" - user: User + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """Identifies the total count of items in the connection.""" + totalCount: Int! +} + +"""An edge in a connection.""" +type PackageVersionEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of the edge.""" + node: PackageVersion +} + +"""Ways in which lists of package versions can be ordered upon return.""" +input PackageVersionOrder { + """The field in which to order package versions by.""" + field: PackageVersionOrderField """ - For actions involving two users, the actor is the initiator and the user is the affected user. + The direction in which to order package versions by the specified field. """ - userLogin: String + direction: OrderDirection +} - """The HTTP path for the user.""" - userResourcePath: URI +"""Properties by which package version connections can be ordered.""" +enum PackageVersionOrderField { + """Order package versions by creation time""" + CREATED_AT +} - """The HTTP URL for the user.""" - userUrl: URI +""" +Represents a object that contains package version activity statistics such as downloads. +""" +type PackageVersionStatistics { + """Number of times the package was downloaded since it was created.""" + downloadsTotalCount: Int! } """Information about pagination in a connection.""" @@ -9345,15 +12804,6 @@ type PageInfo { startCursor: String } -"""Represents a pending collaborator on a repository.""" -type PendingCollaboratorEdge { - """A cursor for use in pagination.""" - cursor: String! - - """The item at the end of the edge.""" - node: User -} - """Types that can grant permissions on a repository to a user""" union PermissionGranter = Organization | Repository | Team @@ -9369,15 +12819,6 @@ type PermissionSource { source: PermissionGranter! } -"""Autogenerated input type of PinIssue""" -input PinIssueInput { - """The ID of the issue to be pinned""" - issueId: ID! - - """A unique identifier for the client performing the mutation.""" - clientMutationId: String -} - """Types that can be pinned to a profile page.""" union PinnableItem = Gist | Repository @@ -9484,6 +12925,9 @@ type PrivateRepositoryForkingDisableAuditEntry implements Node & AuditEntry & En enterpriseUrl: URI id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -9559,6 +13003,9 @@ type PrivateRepositoryForkingEnableAuditEntry implements Node & AuditEntry & Ent enterpriseUrl: URI id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -9789,6 +13236,9 @@ type Project implements Node & Closable & Updatable { archivedStates: [ProjectCardArchivedState] = [ARCHIVED, NOT_ARCHIVED] ): ProjectCardConnection! + """Project progress details.""" + progress: ProjectProgress! + """The HTTP path for this project""" resourcePath: URI! @@ -9884,15 +13334,6 @@ type ProjectCardEdge { node: ProjectCard } -"""An issue or PR and its owning repository to be used in a project card.""" -input ProjectCardImport { - """Repository name with owner (owner/repository).""" - repository: String! - - """The issue or pull request number.""" - number: Int! -} - """Types that can be inside Project Cards.""" union ProjectCardItem = Issue | PullRequest @@ -9980,18 +13421,6 @@ type ProjectColumnEdge { node: ProjectColumn } -"""A project column and a list of its issues and PRs.""" -input ProjectColumnImport { - """The name of the column.""" - columnName: String! - - """The position of the column, starting from 0.""" - position: Int! - - """A list of issues and pull requests in the column.""" - issues: [ProjectCardImport!] -} - """The semantic purpose of the column - todo, in progress, or done.""" enum ProjectColumnPurpose { """The column contains cards still to be worked on""" @@ -10095,6 +13524,32 @@ interface ProjectOwner { viewerCanCreateProjects: Boolean! } +"""Project progress stats.""" +type ProjectProgress { + """The number of done cards.""" + doneCount: Int! + + """The percentage of done cards.""" + donePercentage: Float! + + """ + Whether progress tracking is enabled and cards with purpose exist for this project + """ + enabled: Boolean! + + """The number of in-progress cards.""" + inProgressCount: Int! + + """The percentage of in-progress cards.""" + inProgressPercentage: Float! + + """The number of to do cards.""" + todoCount: Int! + + """The percentage of to do cards.""" + todoPercentage: Float! +} + """State of the project; either 'open' or 'closed'""" enum ProjectState { """The project is open.""" @@ -10104,21 +13559,6 @@ enum ProjectState { CLOSED } -"""Represents a connection between a project (parent) and a team (child).""" -type ProjectTeamEdge { - """A cursor for use in pagination.""" - cursor: String! - - """The item at the end of the edge.""" - node: Team - - """The HTTP path for this project's team""" - projectTeamResourcePath: URI! - - """The HTTP URL for this project's team""" - projectTeamUrl: URI! -} - """GitHub-provided templates for Projects""" enum ProjectTemplate { """Create a board with columns for To do, In progress and Done.""" @@ -10140,15 +13580,6 @@ enum ProjectTemplate { BUG_TRIAGE } -"""Represents a user project.""" -type ProjectUserEdge { - """A cursor for use in pagination.""" - cursor: String! - - """The item at the end of the edge.""" - node: User -} - """A user's public key.""" type PublicKey implements Node { """ @@ -10265,6 +13696,12 @@ type PullRequest implements Node & Assignable & Closable & Comment & Updatable & """The number of changed files in this pull request.""" changedFiles: Int! + """The HTTP path for the checks of this pull request.""" + checksResourcePath: URI! + + """The HTTP URL for the checks of this pull request.""" + checksUrl: URI! + """`true` if the pull request is closed""" closed: Boolean! @@ -10273,6 +13710,9 @@ type PullRequest implements Node & Assignable & Closable & Comment & Updatable & """A list of comments associated with the pull request.""" comments( + """Ordering options for issue comments returned from the connection.""" + orderBy: IssueCommentOrder + """Returns the elements in the list that come after the specified cursor.""" after: String @@ -10359,18 +13799,75 @@ type PullRequest implements Node & Assignable & Closable & Comment & Updatable & The owner of the repository associated with this pull request's head Ref. """ headRepositoryOwner: RepositoryOwner + + """The hovercard information for this issue""" + hovercard( + """Whether or not to include notification contexts""" + includeNotificationContexts: Boolean = true + ): Hovercard! id: ID! """ - Check if this comment was edited and includes an edit with the creation data + Check if this comment was edited and includes an edit with the creation data + """ + includesCreatedEdit: Boolean! + + """The head and base repositories are different.""" + isCrossRepository: Boolean! + + """Identifies if the pull request is a draft.""" + isDraft: Boolean! + + """Is this pull request read by the viewer""" + isReadByViewer: Boolean + + """A list of labels associated with the object.""" + labels( + """Ordering options for labels returned from the connection.""" + orderBy: LabelOrder = {field: CREATED_AT, direction: ASC} + + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + ): LabelConnection + + """The moment the editor made the last edit""" + lastEditedAt: DateTime + + """A list of latest reviews per user associated with the pull request.""" + latestOpinionatedReviews( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + + """Only return reviews from user who have write access to the repository""" + writersOnly: Boolean = false + ): PullRequestReviewConnection + + """ + A list of latest reviews per user associated with the pull request that are not also pending review. """ - includesCreatedEdit: Boolean! - - """The head and base repositories are different.""" - isCrossRepository: Boolean! - - """A list of labels associated with the object.""" - labels( + latestReviews( """Returns the elements in the list that come after the specified cursor.""" after: String @@ -10384,10 +13881,7 @@ type PullRequest implements Node & Assignable & Closable & Comment & Updatable & """Returns the last _n_ elements from the list.""" last: Int - ): LabelConnection - - """The moment the editor made the last edit""" - lastEditedAt: DateTime + ): PullRequestReviewConnection """`true` if the pull request is locked""" locked: Boolean! @@ -10509,6 +14003,9 @@ type PullRequest implements Node & Assignable & Closable & Comment & Updatable & """The HTTP URL for reverting this pull request.""" revertUrl: URI! + """The current status of this pull request with respect to code review.""" + reviewDecision: PullRequestReviewDecision + """A list of review requests associated with the pull request.""" reviewRequests( """Returns the elements in the list that come after the specified cursor.""" @@ -10631,6 +14128,9 @@ type PullRequest implements Node & Assignable & Closable & Comment & Updatable & """Whether or not the viewer can apply suggestion.""" viewerCanApplySuggestion: Boolean! + """Check if the viewer can restore the deleted head ref.""" + viewerCanDeleteHeadRef: Boolean! + """Can user react to this subject""" viewerCanReact: Boolean! @@ -10648,6 +14148,18 @@ type PullRequest implements Node & Assignable & Closable & Comment & Updatable & """Did the viewer author this comment.""" viewerDidAuthor: Boolean! + """The merge body text for the viewer and method.""" + viewerMergeBodyText( + """The merge method for the message.""" + mergeType: PullRequestMergeMethod + ): String! + + """The merge headline text for the viewer and method.""" + viewerMergeHeadlineText( + """The merge method for the message.""" + mergeType: PullRequestMergeMethod + ): String! + """ Identifies if the viewer is watching, not watching, or ignoring the subscribable entity. """ @@ -10664,6 +14176,9 @@ type PullRequestChangedFile { """The path of the file.""" path: String! + + """The state of the file for the viewer.""" + viewerViewedState: FileViewedState! } """The connection type for PullRequestChangedFile.""" @@ -10800,7 +14315,7 @@ type PullRequestContributionsByRepository { last: Int """Ordering options for contributions returned from the connection.""" - orderBy: ContributionOrder + orderBy: ContributionOrder = {direction: DESC} ): CreatedPullRequestContributionConnection! """The repository in which the pull requests were opened.""" @@ -10816,6 +14331,26 @@ type PullRequestEdge { node: PullRequest } +""" +Represents available types of methods to use when merging a pull request. +""" +enum PullRequestMergeMethod { + """ + Add all commits from the head branch to the base branch with a merge commit. + """ + MERGE + + """ + Combine all commits from the head branch into a single commit in the base branch. + """ + SQUASH + + """ + Add all commits from the head branch onto the base branch individually. + """ + REBASE +} + """Ways in which lists of issues can be ordered upon return.""" input PullRequestOrder { """The field in which to order pull requests by.""" @@ -10834,24 +14369,6 @@ enum PullRequestOrderField { UPDATED_AT } -"""The possible PubSub channels for a pull request.""" -enum PullRequestPubSubTopic { - """The channel ID for observing pull request updates.""" - UPDATED - - """The channel ID for marking an pull request as read.""" - MARKASREAD - - """The channel ID for observing head ref updates.""" - HEAD_REF - - """The channel ID for updating items on the pull request timeline.""" - TIMELINE - - """The channel ID for observing pull request state updates.""" - STATE -} - """A review object for a given pull request.""" type PullRequestReview implements Node & Comment & Deletable & Updatable & UpdatableComment & Reactable & RepositoryNode { """The actor who authored the comment.""" @@ -10860,10 +14377,15 @@ type PullRequestReview implements Node & Comment & Deletable & Updatable & Updat """Author's association with the subject of the comment.""" authorAssociation: CommentAuthorAssociation! + """ + Indicates whether the author of this review has push access to the repository. + """ + authorCanPushToRepository: Boolean! + """Identifies the pull request review body.""" body: String! - """The body of this review rendered to HTML.""" + """The body rendered to HTML.""" bodyHTML: HTML! """The body of this review rendered as plain text.""" @@ -11011,7 +14533,7 @@ type PullRequestReview implements Node & Comment & Deletable & Updatable & Updat } """A review comment associated with a given repository pull request.""" -type PullRequestReviewComment implements Node & Comment & Deletable & Updatable & UpdatableComment & Reactable & RepositoryNode { +type PullRequestReviewComment implements Node & Comment & Deletable & Minimizable & Updatable & UpdatableComment & Reactable & RepositoryNode { """The actor who authored the comment.""" author: Actor @@ -11021,14 +14543,14 @@ type PullRequestReviewComment implements Node & Comment & Deletable & Updatable """The comment body of this review comment.""" body: String! - """The comment body of this review comment rendered to HTML.""" + """The body rendered to HTML.""" bodyHTML: HTML! """The comment body of this review comment rendered as plain text.""" bodyText: String! """Identifies the commit associated with the comment.""" - commit: Commit! + commit: Commit """Identifies when the comment was created.""" createdAt: DateTime! @@ -11166,221 +14688,14 @@ type PullRequestReviewComment implements Node & Comment & Deletable & Updatable """Did the viewer author this comment.""" viewerDidAuthor: Boolean! } - -"""The connection type for PullRequestReviewComment.""" -type PullRequestReviewCommentConnection { - """A list of edges.""" - edges: [PullRequestReviewCommentEdge] - - """A list of nodes.""" - nodes: [PullRequestReviewComment] - - """Information to aid in pagination.""" - pageInfo: PageInfo! - - """Identifies the total count of items in the connection.""" - totalCount: Int! -} - -"""An edge in a connection.""" -type PullRequestReviewCommentEdge { - """A cursor for use in pagination.""" - cursor: String! - - """The item at the end of the edge.""" - node: PullRequestReviewComment -} - -"""The possible states of a pull request review comment.""" -enum PullRequestReviewCommentState { - """A comment that is part of a pending review""" - PENDING - - """A comment that is part of a submitted review""" - SUBMITTED -} - -"""The connection type for PullRequestReview.""" -type PullRequestReviewConnection { - """A list of edges.""" - edges: [PullRequestReviewEdge] - - """A list of nodes.""" - nodes: [PullRequestReview] - - """Information to aid in pagination.""" - pageInfo: PageInfo! - - """Identifies the total count of items in the connection.""" - totalCount: Int! -} - -""" -This aggregates pull request reviews made by a user within one repository. -""" -type PullRequestReviewContributionsByRepository { - """The pull request review contributions.""" - contributions( - """Returns the elements in the list that come after the specified cursor.""" - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """Returns the first _n_ elements from the list.""" - first: Int - - """Returns the last _n_ elements from the list.""" - last: Int - - """Ordering options for contributions returned from the connection.""" - orderBy: ContributionOrder - ): CreatedPullRequestReviewContributionConnection! - - """The repository in which the pull request reviews were made.""" - repository: Repository! -} - -"""An edge in a connection.""" -type PullRequestReviewEdge { - """A cursor for use in pagination.""" - cursor: String! - - """The item at the end of the edge.""" - node: PullRequestReview -} - -"""The possible events to perform on a pull request review.""" -enum PullRequestReviewEvent { - """Submit general feedback without explicit approval.""" - COMMENT - - """Submit feedback and approve merging these changes.""" - APPROVE - - """Submit feedback that must be addressed before merging.""" - REQUEST_CHANGES - - """Dismiss review so it now longer effects merging.""" - DISMISS -} - -"""The possible states of a pull request review.""" -enum PullRequestReviewState { - """A review that has not yet been submitted.""" - PENDING - - """An informational review.""" - COMMENTED - - """A review allowing the pull request to merge.""" - APPROVED - - """A review blocking the pull request from merging.""" - CHANGES_REQUESTED - - """A review that has been dismissed.""" - DISMISSED -} - -"""A threaded list of comments for a given pull request.""" -type PullRequestReviewThread implements Node { - """A list of pull request comments associated with the thread.""" - comments( - """Returns the elements in the list that come after the specified cursor.""" - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """Returns the first _n_ elements from the list.""" - first: Int - - """Returns the last _n_ elements from the list.""" - last: Int - ): PullRequestReviewCommentConnection! - id: ID! - - """Whether this thread has been resolved""" - isResolved: Boolean! - - """Identifies the pull request associated with this thread.""" - pullRequest: PullRequest! - - """Identifies the repository associated with this thread.""" - repository: Repository! - - """The user who resolved this thread""" - resolvedBy: User - - """Whether or not the viewer can resolve this thread""" - viewerCanResolve: Boolean! - - """Whether or not the viewer can unresolve this thread""" - viewerCanUnresolve: Boolean! -} - -"""Review comment threads for a pull request review.""" -type PullRequestReviewThreadConnection { - """A list of edges.""" - edges: [PullRequestReviewThreadEdge] - - """A list of nodes.""" - nodes: [PullRequestReviewThread] - - """Information to aid in pagination.""" - pageInfo: PageInfo! - - """Identifies the total count of items in the connection.""" - totalCount: Int! -} - -"""An edge in a connection.""" -type PullRequestReviewThreadEdge { - """A cursor for use in pagination.""" - cursor: String! - - """The item at the end of the edge.""" - node: PullRequestReviewThread -} - -""" -Represents the latest point in the pull request timeline for which the viewer has seen the pull request's commits. -""" -type PullRequestRevisionMarker { - """Identifies the date and time when the object was created.""" - createdAt: DateTime! - - """The last commit the viewer has seen.""" - lastSeenCommit: Commit! - - """The pull request to which the marker belongs.""" - pullRequest: PullRequest! -} - -"""The possible states of a pull request.""" -enum PullRequestState { - """A pull request that is still open.""" - OPEN - - """A pull request that has been closed without being merged.""" - CLOSED - - """A pull request that has been closed by being merged.""" - MERGED -} - -"""The connection type for PullRequestTimelineItem.""" -type PullRequestTimelineConnection { + +"""The connection type for PullRequestReviewComment.""" +type PullRequestReviewCommentConnection { """A list of edges.""" - edges: [PullRequestTimelineItemEdge] + edges: [PullRequestReviewCommentEdge] """A list of nodes.""" - nodes: [PullRequestTimelineItem] + nodes: [PullRequestReviewComment] """Information to aid in pagination.""" pageInfo: PageInfo! @@ -11389,253 +14704,206 @@ type PullRequestTimelineConnection { totalCount: Int! } -"""An item in an pull request timeline""" -union PullRequestTimelineItem = Commit | CommitCommentThread | PullRequestReview | PullRequestReviewThread | PullRequestReviewComment | IssueComment | ClosedEvent | ReopenedEvent | SubscribedEvent | UnsubscribedEvent | MergedEvent | ReferencedEvent | CrossReferencedEvent | AssignedEvent | UnassignedEvent | LabeledEvent | UnlabeledEvent | MilestonedEvent | DemilestonedEvent | RenamedTitleEvent | LockedEvent | UnlockedEvent | DeployedEvent | DeploymentEnvironmentChangedEvent | HeadRefDeletedEvent | HeadRefRestoredEvent | HeadRefForcePushedEvent | BaseRefForcePushedEvent | ReviewRequestedEvent | ReviewRequestRemovedEvent | ReviewDismissedEvent | UserBlockedEvent - """An edge in a connection.""" -type PullRequestTimelineItemEdge { +type PullRequestReviewCommentEdge { """A cursor for use in pagination.""" cursor: String! """The item at the end of the edge.""" - node: PullRequestTimelineItem + node: PullRequestReviewComment } -"""An item in a pull request timeline""" -union PullRequestTimelineItems = PullRequestCommit | PullRequestCommitCommentThread | PullRequestReview | PullRequestReviewThread | PullRequestRevisionMarker | BaseRefChangedEvent | BaseRefForcePushedEvent | DeployedEvent | DeploymentEnvironmentChangedEvent | HeadRefDeletedEvent | HeadRefForcePushedEvent | HeadRefRestoredEvent | MergedEvent | ReviewDismissedEvent | ReviewRequestedEvent | ReviewRequestRemovedEvent | ReadyForReviewEvent | IssueComment | CrossReferencedEvent | AddedToProjectEvent | AssignedEvent | ClosedEvent | CommentDeletedEvent | ConvertedNoteToIssueEvent | DemilestonedEvent | LabeledEvent | LockedEvent | MarkedAsDuplicateEvent | MentionedEvent | MilestonedEvent | MovedColumnsInProjectEvent | PinnedEvent | ReferencedEvent | RemovedFromProjectEvent | RenamedTitleEvent | ReopenedEvent | SubscribedEvent | TransferredEvent | UnassignedEvent | UnlabeledEvent | UnlockedEvent | UserBlockedEvent | UnpinnedEvent | UnsubscribedEvent +"""The possible states of a pull request review comment.""" +enum PullRequestReviewCommentState { + """A comment that is part of a pending review""" + PENDING -"""The connection type for PullRequestTimelineItems.""" -type PullRequestTimelineItemsConnection { - """A list of edges.""" - edges: [PullRequestTimelineItemsEdge] + """A comment that is part of a submitted review""" + SUBMITTED +} - """ - Identifies the count of items after applying `before` and `after` filters. - """ - filteredCount: Int! +"""The connection type for PullRequestReview.""" +type PullRequestReviewConnection { + """A list of edges.""" + edges: [PullRequestReviewEdge] """A list of nodes.""" - nodes: [PullRequestTimelineItems] - - """ - Identifies the count of items after applying `before`/`after` filters and `first`/`last`/`skip` slicing. - """ - pageCount: Int! + nodes: [PullRequestReview] """Information to aid in pagination.""" pageInfo: PageInfo! """Identifies the total count of items in the connection.""" totalCount: Int! - - """Identifies the date and time when the timeline was last updated.""" - updatedAt: DateTime! -} - -"""An edge in a connection.""" -type PullRequestTimelineItemsEdge { - """A cursor for use in pagination.""" - cursor: String! - - """The item at the end of the edge.""" - node: PullRequestTimelineItems } -"""The possible item types found in a timeline.""" -enum PullRequestTimelineItemsItemType { - """Represents a Git commit part of a pull request.""" - PULL_REQUEST_COMMIT - - """Represents a commit comment thread part of a pull request.""" - PULL_REQUEST_COMMIT_COMMENT_THREAD - - """A review object for a given pull request.""" - PULL_REQUEST_REVIEW - - """A threaded list of comments for a given pull request.""" - PULL_REQUEST_REVIEW_THREAD - - """ - Represents the latest point in the pull request timeline for which the viewer has seen the pull request's commits. - """ - PULL_REQUEST_REVISION_MARKER - - """ - Represents a 'base_ref_changed' event on a given issue or pull request. - """ - BASE_REF_CHANGED_EVENT - - """Represents a 'base_ref_force_pushed' event on a given pull request.""" - BASE_REF_FORCE_PUSHED_EVENT - - """Represents a 'deployed' event on a given pull request.""" - DEPLOYED_EVENT - - """ - Represents a 'deployment_environment_changed' event on a given pull request. - """ - DEPLOYMENT_ENVIRONMENT_CHANGED_EVENT - - """Represents a 'head_ref_deleted' event on a given pull request.""" - HEAD_REF_DELETED_EVENT - - """Represents a 'head_ref_force_pushed' event on a given pull request.""" - HEAD_REF_FORCE_PUSHED_EVENT - - """Represents a 'head_ref_restored' event on a given pull request.""" - HEAD_REF_RESTORED_EVENT - - """Represents a 'merged' event on a given pull request.""" - MERGED_EVENT - - """ - Represents a 'review_dismissed' event on a given issue or pull request. - """ - REVIEW_DISMISSED_EVENT - - """Represents an 'review_requested' event on a given pull request.""" - REVIEW_REQUESTED_EVENT - - """Represents an 'review_request_removed' event on a given pull request.""" - REVIEW_REQUEST_REMOVED_EVENT +""" +This aggregates pull request reviews made by a user within one repository. +""" +type PullRequestReviewContributionsByRepository { + """The pull request review contributions.""" + contributions( + """Returns the elements in the list that come after the specified cursor.""" + after: String - """Represents a 'ready_for_review' event on a given pull request.""" - READY_FOR_REVIEW_EVENT + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String - """Represents a comment on an Issue.""" - ISSUE_COMMENT + """Returns the first _n_ elements from the list.""" + first: Int - """Represents a mention made by one issue or pull request to another.""" - CROSS_REFERENCED_EVENT + """Returns the last _n_ elements from the list.""" + last: Int - """ - Represents a 'added_to_project' event on a given issue or pull request. - """ - ADDED_TO_PROJECT_EVENT + """Ordering options for contributions returned from the connection.""" + orderBy: ContributionOrder = {direction: DESC} + ): CreatedPullRequestReviewContributionConnection! - """Represents an 'assigned' event on any assignable object.""" - ASSIGNED_EVENT + """The repository in which the pull request reviews were made.""" + repository: Repository! +} - """Represents a 'closed' event on any `Closable`.""" - CLOSED_EVENT +"""The review status of a pull request.""" +enum PullRequestReviewDecision { + """Changes have been requested on the pull request.""" + CHANGES_REQUESTED - """Represents a 'comment_deleted' event on a given issue or pull request.""" - COMMENT_DELETED_EVENT + """The pull request has received an approving review.""" + APPROVED - """ - Represents a 'converted_note_to_issue' event on a given issue or pull request. - """ - CONVERTED_NOTE_TO_ISSUE_EVENT + """A review is required before the pull request can be merged.""" + REVIEW_REQUIRED +} - """Represents a 'demilestoned' event on a given issue or pull request.""" - DEMILESTONED_EVENT +"""An edge in a connection.""" +type PullRequestReviewEdge { + """A cursor for use in pagination.""" + cursor: String! - """Represents a 'labeled' event on a given issue or pull request.""" - LABELED_EVENT + """The item at the end of the edge.""" + node: PullRequestReview +} - """Represents a 'locked' event on a given issue or pull request.""" - LOCKED_EVENT +"""The possible events to perform on a pull request review.""" +enum PullRequestReviewEvent { + """Submit general feedback without explicit approval.""" + COMMENT - """ - Represents a 'marked_as_duplicate' event on a given issue or pull request. - """ - MARKED_AS_DUPLICATE_EVENT + """Submit feedback and approve merging these changes.""" + APPROVE - """Represents a 'mentioned' event on a given issue or pull request.""" - MENTIONED_EVENT + """Submit feedback that must be addressed before merging.""" + REQUEST_CHANGES - """Represents a 'milestoned' event on a given issue or pull request.""" - MILESTONED_EVENT + """Dismiss review so it now longer effects merging.""" + DISMISS +} - """ - Represents a 'moved_columns_in_project' event on a given issue or pull request. - """ - MOVED_COLUMNS_IN_PROJECT_EVENT +"""The possible states of a pull request review.""" +enum PullRequestReviewState { + """A review that has not yet been submitted.""" + PENDING - """Represents a 'pinned' event on a given issue or pull request.""" - PINNED_EVENT + """An informational review.""" + COMMENTED - """Represents a 'referenced' event on a given `ReferencedSubject`.""" - REFERENCED_EVENT + """A review allowing the pull request to merge.""" + APPROVED - """ - Represents a 'removed_from_project' event on a given issue or pull request. - """ - REMOVED_FROM_PROJECT_EVENT + """A review blocking the pull request from merging.""" + CHANGES_REQUESTED - """Represents a 'renamed' event on a given issue or pull request""" - RENAMED_TITLE_EVENT + """A review that has been dismissed.""" + DISMISSED +} - """Represents a 'reopened' event on any `Closable`.""" - REOPENED_EVENT +"""A threaded list of comments for a given pull request.""" +type PullRequestReviewThread implements Node { + """A list of pull request comments associated with the thread.""" + comments( + """Returns the elements in the list that come after the specified cursor.""" + after: String - """Represents a 'subscribed' event on a given `Subscribable`.""" - SUBSCRIBED_EVENT + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String - """Represents a 'transferred' event on a given issue or pull request.""" - TRANSFERRED_EVENT + """Returns the first _n_ elements from the list.""" + first: Int - """Represents an 'unassigned' event on any assignable object.""" - UNASSIGNED_EVENT + """Returns the last _n_ elements from the list.""" + last: Int - """Represents an 'unlabeled' event on a given issue or pull request.""" - UNLABELED_EVENT + """Skips the first _n_ elements in the list.""" + skip: Int + ): PullRequestReviewCommentConnection! - """Represents an 'unlocked' event on a given issue or pull request.""" - UNLOCKED_EVENT + """The side of the diff on which this thread was placed.""" + diffSide: DiffSide! + id: ID! - """Represents a 'user_blocked' event on a given user.""" - USER_BLOCKED_EVENT + """Whether or not the thread has been collapsed (outdated or resolved)""" + isCollapsed: Boolean! - """Represents an 'unpinned' event on a given issue or pull request.""" - UNPINNED_EVENT + """Indicates whether this thread was outdated by newer changes.""" + isOutdated: Boolean! - """Represents an 'unsubscribed' event on a given `Subscribable`.""" - UNSUBSCRIBED_EVENT -} + """Whether this thread has been resolved""" + isResolved: Boolean! -"""A Git push.""" -type Push implements Node { - id: ID! + """The line in the file to which this thread refers""" + line: Int - """The SHA after the push""" - nextSha: GitObjectID + """The original line in the file to which this thread refers.""" + originalLine: Int - """The permalink for this push.""" - permalink: URI! + """ + The original start line in the file to which this thread refers (multi-line only). + """ + originalStartLine: Int - """The SHA before the push""" - previousSha: GitObjectID + """Identifies the file path of this thread.""" + path: String! - """The user who pushed""" - pusher: User! + """Identifies the pull request associated with this thread.""" + pullRequest: PullRequest! - """The repository that was pushed to""" + """Identifies the repository associated with this thread.""" repository: Repository! -} -"""A team or user who has the ability to push to a protected branch.""" -type PushAllowance implements Node { - """The actor that can push.""" - actor: PushAllowanceActor + """The user who resolved this thread""" + resolvedBy: User """ - Identifies the branch protection rule associated with the allowed user or team. + The side of the diff that the first line of the thread starts on (multi-line only) """ - branchProtectionRule: BranchProtectionRule - id: ID! -} + startDiffSide: DiffSide -"""Types that can be an actor.""" -union PushAllowanceActor = User | Team + """ + The start line in the file to which this thread refers (multi-line only) + """ + startLine: Int -"""The connection type for PushAllowance.""" -type PushAllowanceConnection { + """Indicates whether the current viewer can reply to this thread.""" + viewerCanReply: Boolean! + + """Whether or not the viewer can resolve this thread""" + viewerCanResolve: Boolean! + + """Whether or not the viewer can unresolve this thread""" + viewerCanUnresolve: Boolean! +} + +"""Review comment threads for a pull request review.""" +type PullRequestReviewThreadConnection { """A list of edges.""" - edges: [PushAllowanceEdge] + edges: [PullRequestReviewThreadEdge] """A list of nodes.""" - nodes: [PushAllowance] + nodes: [PullRequestReviewThread] """Information to aid in pagination.""" pageInfo: PageInfo! @@ -11645,530 +14913,437 @@ type PushAllowanceConnection { } """An edge in a connection.""" -type PushAllowanceEdge { +type PullRequestReviewThreadEdge { """A cursor for use in pagination.""" cursor: String! """The item at the end of the edge.""" - node: PushAllowance + node: PullRequestReviewThread } -"""The query root of GitHub's GraphQL interface.""" -type Query { - """Look up a code of conduct by its key""" - codeOfConduct( - """The code of conduct's key""" - key: String! - ): CodeOfConduct - - """Look up a code of conduct by its key""" - codesOfConduct: [CodeOfConduct] - - """Look up an open source license by its key""" - license( - """The license's downcased SPDX ID""" - key: String! - ): License - - """Return a list of known open source licenses""" - licenses: [License]! - - """Get alphabetically sorted list of Marketplace categories""" - marketplaceCategories( - """Return only the specified categories.""" - includeCategories: [String!] +""" +Represents the latest point in the pull request timeline for which the viewer has seen the pull request's commits. +""" +type PullRequestRevisionMarker { + """Identifies the date and time when the object was created.""" + createdAt: DateTime! - """Exclude categories with no listings.""" - excludeEmpty: Boolean + """The last commit the viewer has seen.""" + lastSeenCommit: Commit! - """Returns top level categories only, excluding any subcategories.""" - excludeSubcategories: Boolean - ): [MarketplaceCategory!]! + """The pull request to which the marker belongs.""" + pullRequest: PullRequest! +} - """Look up a Marketplace category by its slug.""" - marketplaceCategory( - """The URL slug of the category.""" - slug: String! +"""The possible states of a pull request.""" +enum PullRequestState { + """A pull request that is still open.""" + OPEN - """Also check topic aliases for the category slug""" - useTopicAliases: Boolean - ): MarketplaceCategory + """A pull request that has been closed without being merged.""" + CLOSED - """Look up a single Marketplace listing""" - marketplaceListing( - """ - Select the listing that matches this slug. It's the short name of the listing used in its URL. - """ - slug: String! - ): MarketplaceListing + """A pull request that has been closed by being merged.""" + MERGED +} - """Look up Marketplace listings""" - marketplaceListings( - """Returns the elements in the list that come after the specified cursor.""" - after: String +"""The connection type for PullRequestTimelineItem.""" +type PullRequestTimelineConnection { + """A list of edges.""" + edges: [PullRequestTimelineItemEdge] - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String + """A list of nodes.""" + nodes: [PullRequestTimelineItem] - """Returns the first _n_ elements from the list.""" - first: Int + """Information to aid in pagination.""" + pageInfo: PageInfo! - """Returns the last _n_ elements from the list.""" - last: Int + """Identifies the total count of items in the connection.""" + totalCount: Int! +} - """Select only listings with the given category.""" - categorySlug: String +"""An item in an pull request timeline""" +union PullRequestTimelineItem = AssignedEvent | BaseRefDeletedEvent | BaseRefForcePushedEvent | ClosedEvent | Commit | CommitCommentThread | CrossReferencedEvent | DemilestonedEvent | DeployedEvent | DeploymentEnvironmentChangedEvent | HeadRefDeletedEvent | HeadRefForcePushedEvent | HeadRefRestoredEvent | IssueComment | LabeledEvent | LockedEvent | MergedEvent | MilestonedEvent | PullRequestReview | PullRequestReviewComment | PullRequestReviewThread | ReferencedEvent | RenamedTitleEvent | ReopenedEvent | ReviewDismissedEvent | ReviewRequestRemovedEvent | ReviewRequestedEvent | SubscribedEvent | UnassignedEvent | UnlabeledEvent | UnlockedEvent | UnsubscribedEvent | UserBlockedEvent - """Also check topic aliases for the category slug""" - useTopicAliases: Boolean +"""An edge in a connection.""" +type PullRequestTimelineItemEdge { + """A cursor for use in pagination.""" + cursor: String! - """ - Select listings to which user has admin access. If omitted, listings visible to the - viewer are returned. - - """ - viewerCanAdmin: Boolean + """The item at the end of the edge.""" + node: PullRequestTimelineItem +} - """Select listings that can be administered by the specified user.""" - adminId: ID +"""An item in a pull request timeline""" +union PullRequestTimelineItems = AddedToProjectEvent | AssignedEvent | AutomaticBaseChangeFailedEvent | AutomaticBaseChangeSucceededEvent | BaseRefChangedEvent | BaseRefDeletedEvent | BaseRefForcePushedEvent | ClosedEvent | CommentDeletedEvent | ConnectedEvent | ConvertToDraftEvent | ConvertedNoteToIssueEvent | CrossReferencedEvent | DemilestonedEvent | DeployedEvent | DeploymentEnvironmentChangedEvent | DisconnectedEvent | HeadRefDeletedEvent | HeadRefForcePushedEvent | HeadRefRestoredEvent | IssueComment | LabeledEvent | LockedEvent | MarkedAsDuplicateEvent | MentionedEvent | MergedEvent | MilestonedEvent | MovedColumnsInProjectEvent | PinnedEvent | PullRequestCommit | PullRequestCommitCommentThread | PullRequestReview | PullRequestReviewThread | PullRequestRevisionMarker | ReadyForReviewEvent | ReferencedEvent | RemovedFromProjectEvent | RenamedTitleEvent | ReopenedEvent | ReviewDismissedEvent | ReviewRequestRemovedEvent | ReviewRequestedEvent | SubscribedEvent | TransferredEvent | UnassignedEvent | UnlabeledEvent | UnlockedEvent | UnmarkedAsDuplicateEvent | UnpinnedEvent | UnsubscribedEvent | UserBlockedEvent - """Select listings for products owned by the specified organization.""" - organizationId: ID +"""The connection type for PullRequestTimelineItems.""" +type PullRequestTimelineItemsConnection { + """A list of edges.""" + edges: [PullRequestTimelineItemsEdge] - """ - Select listings visible to the viewer even if they are not approved. If omitted or - false, only approved listings will be returned. - - """ - allStates: Boolean + """ + Identifies the count of items after applying `before` and `after` filters. + """ + filteredCount: Int! - """ - Select the listings with these slugs, if they are visible to the viewer. - """ - slugs: [String] + """A list of nodes.""" + nodes: [PullRequestTimelineItems] - """ - Select only listings where the primary category matches the given category slug. - """ - primaryCategoryOnly: Boolean = false + """ + Identifies the count of items after applying `before`/`after` filters and `first`/`last`/`skip` slicing. + """ + pageCount: Int! - """Select only listings that offer a free trial.""" - withFreeTrialsOnly: Boolean = false - ): MarketplaceListingConnection! + """Information to aid in pagination.""" + pageInfo: PageInfo! - """Return information about the GitHub instance""" - meta: GitHubMetadata! + """Identifies the total count of items in the connection.""" + totalCount: Int! - """Fetches an object given its ID.""" - node( - """ID of the object.""" - id: ID! - ): Node + """Identifies the date and time when the timeline was last updated.""" + updatedAt: DateTime! +} - """Lookup nodes by a list of IDs.""" - nodes( - """The list of node IDs.""" - ids: [ID!]! - ): [Node]! +"""An edge in a connection.""" +type PullRequestTimelineItemsEdge { + """A cursor for use in pagination.""" + cursor: String! - """Lookup a organization by login.""" - organization( - """The organization's login.""" - login: String! - ): Organization + """The item at the end of the edge.""" + node: PullRequestTimelineItems +} - """The client's rate limit information.""" - rateLimit( - """If true, calculate the cost for the query without evaluating it""" - dryRun: Boolean = false - ): RateLimit +"""The possible item types found in a timeline.""" +enum PullRequestTimelineItemsItemType { + """Represents a Git commit part of a pull request.""" + PULL_REQUEST_COMMIT - """ - Hack to workaround https://github.com/facebook/relay/issues/112 re-exposing the root query object - """ - relay: Query! + """Represents a commit comment thread part of a pull request.""" + PULL_REQUEST_COMMIT_COMMENT_THREAD - """Lookup a given repository by the owner and repository name.""" - repository( - """The login field of a user or organization""" - owner: String! + """A review object for a given pull request.""" + PULL_REQUEST_REVIEW - """The name of the repository""" - name: String! - ): Repository + """A threaded list of comments for a given pull request.""" + PULL_REQUEST_REVIEW_THREAD """ - Lookup a repository owner (ie. either a User or an Organization) by login. - """ - repositoryOwner( - """The username to lookup the owner by.""" - login: String! - ): RepositoryOwner - - """Lookup resource by a URL.""" - resource( - """The URL.""" - url: URI! - ): UniformResourceLocatable + Represents the latest point in the pull request timeline for which the viewer has seen the pull request's commits. + """ + PULL_REQUEST_REVISION_MARKER - """Perform a search across resources.""" - search( - """Returns the elements in the list that come after the specified cursor.""" - after: String + """ + Represents a 'automatic_base_change_failed' event on a given pull request. + """ + AUTOMATIC_BASE_CHANGE_FAILED_EVENT - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String + """ + Represents a 'automatic_base_change_succeeded' event on a given pull request. + """ + AUTOMATIC_BASE_CHANGE_SUCCEEDED_EVENT - """Returns the first _n_ elements from the list.""" - first: Int + """ + Represents a 'base_ref_changed' event on a given issue or pull request. + """ + BASE_REF_CHANGED_EVENT - """Returns the last _n_ elements from the list.""" - last: Int + """Represents a 'base_ref_force_pushed' event on a given pull request.""" + BASE_REF_FORCE_PUSHED_EVENT - """The search string to look for.""" - query: String! + """Represents a 'base_ref_deleted' event on a given pull request.""" + BASE_REF_DELETED_EVENT - """The types of search items to search within.""" - type: SearchType! - ): SearchResultItemConnection! + """Represents a 'deployed' event on a given pull request.""" + DEPLOYED_EVENT - """GitHub Security Advisories""" - securityAdvisories( - """Ordering options for the returned topics.""" - orderBy: SecurityAdvisoryOrder + """ + Represents a 'deployment_environment_changed' event on a given pull request. + """ + DEPLOYMENT_ENVIRONMENT_CHANGED_EVENT - """Filter advisories by identifier, e.g. GHSA or CVE.""" - identifier: SecurityAdvisoryIdentifierFilter + """Represents a 'head_ref_deleted' event on a given pull request.""" + HEAD_REF_DELETED_EVENT - """Filter advisories to those published since a time in the past.""" - publishedSince: DateTime + """Represents a 'head_ref_force_pushed' event on a given pull request.""" + HEAD_REF_FORCE_PUSHED_EVENT - """Filter advisories to those updated since a time in the past.""" - updatedSince: DateTime + """Represents a 'head_ref_restored' event on a given pull request.""" + HEAD_REF_RESTORED_EVENT - """Returns the elements in the list that come after the specified cursor.""" - after: String + """Represents a 'merged' event on a given pull request.""" + MERGED_EVENT - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String + """ + Represents a 'review_dismissed' event on a given issue or pull request. + """ + REVIEW_DISMISSED_EVENT - """Returns the first _n_ elements from the list.""" - first: Int + """Represents an 'review_requested' event on a given pull request.""" + REVIEW_REQUESTED_EVENT - """Returns the last _n_ elements from the list.""" - last: Int - ): SecurityAdvisoryConnection! + """Represents an 'review_request_removed' event on a given pull request.""" + REVIEW_REQUEST_REMOVED_EVENT - """Fetch a Security Advisory by its GHSA ID""" - securityAdvisory( - """GitHub Security Advisory ID.""" - ghsaId: String! - ): SecurityAdvisory + """Represents a 'ready_for_review' event on a given pull request.""" + READY_FOR_REVIEW_EVENT - """Software Vulnerabilities documented by GitHub Security Advisories""" - securityVulnerabilities( - """Ordering options for the returned topics.""" - orderBy: SecurityVulnerabilityOrder + """Represents a 'convert_to_draft' event on a given pull request.""" + CONVERT_TO_DRAFT_EVENT - """An ecosystem to filter vulnerabilities by.""" - ecosystem: SecurityAdvisoryEcosystem + """Represents a comment on an Issue.""" + ISSUE_COMMENT - """A package name to filter vulnerabilities by.""" - package: String + """Represents a mention made by one issue or pull request to another.""" + CROSS_REFERENCED_EVENT - """A list of severities to filter vulnerabilities by.""" - severities: [SecurityAdvisorySeverity!] + """ + Represents a 'added_to_project' event on a given issue or pull request. + """ + ADDED_TO_PROJECT_EVENT - """Returns the elements in the list that come after the specified cursor.""" - after: String + """Represents an 'assigned' event on any assignable object.""" + ASSIGNED_EVENT - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String + """Represents a 'closed' event on any `Closable`.""" + CLOSED_EVENT - """Returns the first _n_ elements from the list.""" - first: Int + """Represents a 'comment_deleted' event on a given issue or pull request.""" + COMMENT_DELETED_EVENT - """Returns the last _n_ elements from the list.""" - last: Int - ): SecurityVulnerabilityConnection! + """Represents a 'connected' event on a given issue or pull request.""" + CONNECTED_EVENT - """Look up a single Sponsors Listing""" - sponsorsListing( - """Select the Sponsors listing which matches this slug""" - slug: String! - ): SponsorsListing + """ + Represents a 'converted_note_to_issue' event on a given issue or pull request. + """ + CONVERTED_NOTE_TO_ISSUE_EVENT - """Look up a topic by name.""" - topic( - """The topic's name.""" - name: String! - ): Topic + """Represents a 'demilestoned' event on a given issue or pull request.""" + DEMILESTONED_EVENT - """Lookup a user by login.""" - user( - """The user's login.""" - login: String! - ): User + """Represents a 'disconnected' event on a given issue or pull request.""" + DISCONNECTED_EVENT - """The currently authenticated user.""" - viewer: User! -} + """Represents a 'labeled' event on a given issue or pull request.""" + LABELED_EVENT -"""Represents the client's rate limit.""" -type RateLimit { - """The point cost for the current query counting against the rate limit.""" - cost: Int! + """Represents a 'locked' event on a given issue or pull request.""" + LOCKED_EVENT """ - The maximum number of points the client is permitted to consume in a 60 minute window. + Represents a 'marked_as_duplicate' event on a given issue or pull request. """ - limit: Int! + MARKED_AS_DUPLICATE_EVENT - """The maximum number of nodes this query may return""" - nodeCount: Int! + """Represents a 'mentioned' event on a given issue or pull request.""" + MENTIONED_EVENT - """The number of points remaining in the current rate limit window.""" - remaining: Int! + """Represents a 'milestoned' event on a given issue or pull request.""" + MILESTONED_EVENT """ - The time at which the current rate limit window resets in UTC epoch seconds. + Represents a 'moved_columns_in_project' event on a given issue or pull request. """ - resetAt: DateTime! -} + MOVED_COLUMNS_IN_PROJECT_EVENT -"""Represents a subject that can be reacted on.""" -interface Reactable { - """Identifies the primary key from the database.""" - databaseId: Int - id: ID! + """Represents a 'pinned' event on a given issue or pull request.""" + PINNED_EVENT - """A list of reactions grouped by content left on the subject.""" - reactionGroups: [ReactionGroup!] + """Represents a 'referenced' event on a given `ReferencedSubject`.""" + REFERENCED_EVENT - """A list of Reactions left on the Issue.""" - reactions( - """Returns the elements in the list that come after the specified cursor.""" - after: String + """ + Represents a 'removed_from_project' event on a given issue or pull request. + """ + REMOVED_FROM_PROJECT_EVENT - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String + """Represents a 'renamed' event on a given issue or pull request""" + RENAMED_TITLE_EVENT - """Returns the first _n_ elements from the list.""" - first: Int + """Represents a 'reopened' event on any `Closable`.""" + REOPENED_EVENT - """Returns the last _n_ elements from the list.""" - last: Int + """Represents a 'subscribed' event on a given `Subscribable`.""" + SUBSCRIBED_EVENT - """Allows filtering Reactions by emoji.""" - content: ReactionContent + """Represents a 'transferred' event on a given issue or pull request.""" + TRANSFERRED_EVENT - """Allows specifying the order in which reactions are returned.""" - orderBy: ReactionOrder - ): ReactionConnection! + """Represents an 'unassigned' event on any assignable object.""" + UNASSIGNED_EVENT - """Can user react to this subject""" - viewerCanReact: Boolean! -} + """Represents an 'unlabeled' event on a given issue or pull request.""" + UNLABELED_EVENT -"""The connection type for User.""" -type ReactingUserConnection { - """A list of edges.""" - edges: [ReactingUserEdge] + """Represents an 'unlocked' event on a given issue or pull request.""" + UNLOCKED_EVENT - """A list of nodes.""" - nodes: [User] + """Represents a 'user_blocked' event on a given user.""" + USER_BLOCKED_EVENT - """Information to aid in pagination.""" - pageInfo: PageInfo! + """ + Represents an 'unmarked_as_duplicate' event on a given issue or pull request. + """ + UNMARKED_AS_DUPLICATE_EVENT - """Identifies the total count of items in the connection.""" - totalCount: Int! + """Represents an 'unpinned' event on a given issue or pull request.""" + UNPINNED_EVENT + + """Represents an 'unsubscribed' event on a given `Subscribable`.""" + UNSUBSCRIBED_EVENT } -"""Represents a user that's made a reaction.""" -type ReactingUserEdge { - """A cursor for use in pagination.""" - cursor: String! - node: User! +"""The possible target states when updating a pull request.""" +enum PullRequestUpdateState { + """A pull request that is still open.""" + OPEN - """The moment when the user made the reaction.""" - reactedAt: DateTime! + """A pull request that has been closed without being merged.""" + CLOSED } -"""An emoji reaction to a particular piece of content.""" -type Reaction implements Node { - """Identifies the emoji reaction.""" - content: ReactionContent! +"""A Git push.""" +type Push implements Node { + id: ID! - """Identifies the date and time when the object was created.""" - createdAt: DateTime! + """The SHA after the push""" + nextSha: GitObjectID + + """The permalink for this push.""" + permalink: URI! + + """The SHA before the push""" + previousSha: GitObjectID + + """The user who pushed""" + pusher: User! - """Identifies the primary key from the database.""" - databaseId: Int - id: ID! + """The repository that was pushed to""" + repository: Repository! +} - """The reactable piece of content""" - reactable: Reactable! +"""A team, user or app who has the ability to push to a protected branch.""" +type PushAllowance implements Node { + """The actor that can push.""" + actor: PushAllowanceActor - """Identifies the user who created this reaction.""" - user: User + """ + Identifies the branch protection rule associated with the allowed user or team. + """ + branchProtectionRule: BranchProtectionRule + id: ID! } -"""A list of reactions that have been left on the subject.""" -type ReactionConnection { +"""Types that can be an actor.""" +union PushAllowanceActor = App | Team | User + +"""The connection type for PushAllowance.""" +type PushAllowanceConnection { """A list of edges.""" - edges: [ReactionEdge] + edges: [PushAllowanceEdge] """A list of nodes.""" - nodes: [Reaction] + nodes: [PushAllowance] """Information to aid in pagination.""" pageInfo: PageInfo! """Identifies the total count of items in the connection.""" totalCount: Int! - - """ - Whether or not the authenticated user has left a reaction on the subject. - """ - viewerHasReacted: Boolean! -} - -"""Emojis that can be attached to Issues, Pull Requests and Comments.""" -enum ReactionContent { - """Represents the 👍 emoji.""" - THUMBS_UP - - """Represents the 👎 emoji.""" - THUMBS_DOWN - - """Represents the 😄 emoji.""" - LAUGH - - """Represents the 🎉 emoji.""" - HOORAY - - """Represents the 😕 emoji.""" - CONFUSED - - """Represents the ❤️ emoji.""" - HEART - - """Represents the 🚀 emoji.""" - ROCKET - - """Represents the 👀 emoji.""" - EYES } """An edge in a connection.""" -type ReactionEdge { +type PushAllowanceEdge { """A cursor for use in pagination.""" cursor: String! """The item at the end of the edge.""" - node: Reaction + node: PushAllowance } -"""A group of emoji reactions to a particular piece of content.""" -type ReactionGroup { - """Identifies the emoji reaction.""" - content: ReactionContent! +"""The query root of GitHub's GraphQL interface.""" +type Query { + """Look up a code of conduct by its key""" + codeOfConduct( + """The code of conduct's key""" + key: String! + ): CodeOfConduct - """Identifies when the reaction was created.""" - createdAt: DateTime + """Look up a code of conduct by its key""" + codesOfConduct: [CodeOfConduct] - """The subject that was reacted to.""" - subject: Reactable! + """Look up an enterprise by URL slug.""" + enterprise( + """The enterprise URL slug.""" + slug: String! + + """The enterprise invitation token.""" + invitationToken: String + ): Enterprise """ - Users who have reacted to the reaction subject with the emotion represented by this reaction group + Look up a pending enterprise administrator invitation by invitee, enterprise and role. """ - users( - """Returns the elements in the list that come after the specified cursor.""" - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String + enterpriseAdministratorInvitation( + """The login of the user invited to join the business.""" + userLogin: String! - """Returns the first _n_ elements from the list.""" - first: Int + """The slug of the enterprise the user was invited to join.""" + enterpriseSlug: String! - """Returns the last _n_ elements from the list.""" - last: Int - ): ReactingUserConnection! + """The role for the business member invitation.""" + role: EnterpriseAdministratorRole! + ): EnterpriseAdministratorInvitation """ - Whether or not the authenticated user has left a reaction on the subject. + Look up a pending enterprise administrator invitation by invitation token. """ - viewerHasReacted: Boolean! -} - -"""Ways in which lists of reactions can be ordered upon return.""" -input ReactionOrder { - """The field in which to order reactions by.""" - field: ReactionOrderField! - - """The direction in which to order reactions by the specified field.""" - direction: OrderDirection! -} - -"""A list of fields that reactions can be ordered by.""" -enum ReactionOrderField { - """Allows ordering a list of reactions by when they were created.""" - CREATED_AT -} - -"""Represents a 'ready_for_review' event on a given pull request.""" -type ReadyForReviewEvent implements Node & UniformResourceLocatable { - """Identifies the actor who performed the event.""" - actor: Actor + enterpriseAdministratorInvitationByToken( + """The invitation token sent with the invitation email.""" + invitationToken: String! + ): EnterpriseAdministratorInvitation - """Identifies the date and time when the object was created.""" - createdAt: DateTime! - id: ID! - - """PullRequest referenced by event.""" - pullRequest: PullRequest! + """Look up an open source license by its key""" + license( + """The license's downcased SPDX ID""" + key: String! + ): License - """The HTTP path for this ready for review event.""" - resourcePath: URI! + """Return a list of known open source licenses""" + licenses: [License]! - """The HTTP URL for this ready for review event.""" - url: URI! -} + """Get alphabetically sorted list of Marketplace categories""" + marketplaceCategories( + """Return only the specified categories.""" + includeCategories: [String!] -"""Represents a Git reference.""" -type Ref implements Node { - """A list of pull requests with this ref as the head ref.""" - associatedPullRequests( - """A list of states to filter the pull requests by.""" - states: [PullRequestState!] + """Exclude categories with no listings.""" + excludeEmpty: Boolean - """A list of label names to filter the pull requests by.""" - labels: [String!] + """Returns top level categories only, excluding any subcategories.""" + excludeSubcategories: Boolean + ): [MarketplaceCategory!]! - """The head ref name to filter the pull requests by.""" - headRefName: String + """Look up a Marketplace category by its slug.""" + marketplaceCategory( + """The URL slug of the category.""" + slug: String! - """The base ref name to filter the pull requests by.""" - baseRefName: String + """Also check topic aliases for the category slug""" + useTopicAliases: Boolean + ): MarketplaceCategory - """Ordering options for pull requests returned from the connection.""" - orderBy: IssueOrder + """Look up a single Marketplace listing""" + marketplaceListing( + """ + Select the listing that matches this slug. It's the short name of the listing used in its URL. + """ + slug: String! + ): MarketplaceListing + """Look up Marketplace listings""" + marketplaceListings( """Returns the elements in the list that come after the specified cursor.""" after: String @@ -12182,137 +15357,104 @@ type Ref implements Node { """Returns the last _n_ elements from the list.""" last: Int - ): PullRequestConnection! - id: ID! - - """The ref name.""" - name: String! - - """The ref's prefix, such as `refs/heads/` or `refs/tags/`.""" - prefix: String! - - """The repository the ref belongs to.""" - repository: Repository! - - """The object the ref points to.""" - target: GitObject! -} - -"""The connection type for Ref.""" -type RefConnection { - """A list of edges.""" - edges: [RefEdge] - - """A list of nodes.""" - nodes: [Ref] - - """Information to aid in pagination.""" - pageInfo: PageInfo! - - """Identifies the total count of items in the connection.""" - totalCount: Int! -} - -"""An edge in a connection.""" -type RefEdge { - """A cursor for use in pagination.""" - cursor: String! - - """The item at the end of the edge.""" - node: Ref -} - -"""Represents a 'referenced' event on a given `ReferencedSubject`.""" -type ReferencedEvent implements Node { - """Identifies the actor who performed the event.""" - actor: Actor - """Identifies the commit associated with the 'referenced' event.""" - commit: Commit - - """Identifies the repository associated with the 'referenced' event.""" - commitRepository: Repository! + """Select only listings with the given category.""" + categorySlug: String - """Identifies the date and time when the object was created.""" - createdAt: DateTime! - id: ID! + """Also check topic aliases for the category slug""" + useTopicAliases: Boolean - """Reference originated in a different repository.""" - isCrossRepository: Boolean! + """ + Select listings to which user has admin access. If omitted, listings visible to the + viewer are returned. + + """ + viewerCanAdmin: Boolean - """ - Checks if the commit message itself references the subject. Can be false in the case of a commit comment reference. - """ - isDirectReference: Boolean! + """Select listings that can be administered by the specified user.""" + adminId: ID - """Object referenced by event.""" - subject: ReferencedSubject! -} + """Select listings for products owned by the specified organization.""" + organizationId: ID -"""Any referencable object""" -union ReferencedSubject = Issue | PullRequest + """ + Select listings visible to the viewer even if they are not approved. If omitted or + false, only approved listings will be returned. + + """ + allStates: Boolean -"""Ways in which lists of git refs can be ordered upon return.""" -input RefOrder { - """The field in which to order refs by.""" - field: RefOrderField! + """ + Select the listings with these slugs, if they are visible to the viewer. + """ + slugs: [String] - """The direction in which to order refs by the specified field.""" - direction: OrderDirection! -} + """ + Select only listings where the primary category matches the given category slug. + """ + primaryCategoryOnly: Boolean = false -"""Properties by which ref connections can be ordered.""" -enum RefOrderField { - """Order refs by underlying commit date if the ref prefix is refs/tags/""" - TAG_COMMIT_DATE + """Select only listings that offer a free trial.""" + withFreeTrialsOnly: Boolean = false + ): MarketplaceListingConnection! - """Order refs by their alphanumeric name""" - ALPHABETICAL -} + """Return information about the GitHub instance""" + meta: GitHubMetadata! -""" -Autogenerated input type of RegenerateEnterpriseIdentityProviderRecoveryCodes -""" -input RegenerateEnterpriseIdentityProviderRecoveryCodesInput { - """The ID of the enterprise on which to set an identity provider.""" - enterpriseId: ID! + """Fetches an object given its ID.""" + node( + """ID of the object.""" + id: ID! + ): Node - """A unique identifier for the client performing the mutation.""" - clientMutationId: String -} + """Lookup nodes by a list of IDs.""" + nodes( + """The list of node IDs.""" + ids: [ID!]! + ): [Node]! -"""A registry package contains the content for an uploaded package.""" -type RegistryPackage implements Node { - """The package type color""" - color: String! - id: ID! + """Lookup a organization by login.""" + organization( + """The organization's login.""" + login: String! + ): Organization - """Find the latest version for the package.""" - latestVersion: RegistryPackageVersion + """The client's rate limit information.""" + rateLimit( + """If true, calculate the cost for the query without evaluating it""" + dryRun: Boolean = false + ): RateLimit - """Identifies the title of the package.""" - name: String! + """ + Hack to workaround https://github.com/facebook/relay/issues/112 re-exposing the root query object + """ + relay: Query! - """Identifies the title of the package, with the owner prefixed.""" - nameWithOwner: String! + """Lookup a given repository by the owner and repository name.""" + repository( + """The login field of a user or organization""" + owner: String! - """Find the package file identified by the guid.""" - packageFileByGuid( - """The unique identifier of the package_file""" - guid: String! - ): RegistryPackageFile + """The name of the repository""" + name: String! + ): Repository - """Find the package file identified by the sha256.""" - packageFileBySha256( - """The SHA256 of the package_file""" - sha256: String! - ): RegistryPackageFile + """ + Lookup a repository owner (ie. either a User or an Organization) by login. + """ + repositoryOwner( + """The username to lookup the owner by.""" + login: String! + ): RepositoryOwner - """Identifies the type of the package.""" - packageType: RegistryPackageType! + """Lookup resource by a URL.""" + resource( + """The URL.""" + url: URI! + ): UniformResourceLocatable - """List the prerelease versions for this package.""" - preReleaseVersions( + """Perform a search across resources.""" + search( """Returns the elements in the list that come after the specified cursor.""" after: String @@ -12326,19 +15468,28 @@ type RegistryPackage implements Node { """Returns the last _n_ elements from the list.""" last: Int - ): RegistryPackageVersionConnection - """The type of the package.""" - registryPackageType: String + """The search string to look for.""" + query: String! - """repository that the release is associated with""" - repository: Repository + """The types of search items to search within.""" + type: SearchType! + ): SearchResultItemConnection! - """Statistics about package activity.""" - statistics: RegistryPackageStatistics + """GitHub Security Advisories""" + securityAdvisories( + """Ordering options for the returned topics.""" + orderBy: SecurityAdvisoryOrder = {field: UPDATED_AT, direction: DESC} + + """Filter advisories by identifier, e.g. GHSA or CVE.""" + identifier: SecurityAdvisoryIdentifierFilter + + """Filter advisories to those published since a time in the past.""" + publishedSince: DateTime + + """Filter advisories to those updated since a time in the past.""" + updatedSince: DateTime - """list of tags for this package""" - tags( """Returns the elements in the list that come after the specified cursor.""" after: String @@ -12352,10 +15503,28 @@ type RegistryPackage implements Node { """Returns the last _n_ elements from the list.""" last: Int - ): RegistryPackageTagConnection! + ): SecurityAdvisoryConnection! + + """Fetch a Security Advisory by its GHSA ID""" + securityAdvisory( + """GitHub Security Advisory ID.""" + ghsaId: String! + ): SecurityAdvisory + + """Software Vulnerabilities documented by GitHub Security Advisories""" + securityVulnerabilities( + """Ordering options for the returned topics.""" + orderBy: SecurityVulnerabilityOrder = {field: UPDATED_AT, direction: DESC} + + """An ecosystem to filter vulnerabilities by.""" + ecosystem: SecurityAdvisoryEcosystem + + """A package name to filter vulnerabilities by.""" + package: String + + """A list of severities to filter vulnerabilities by.""" + severities: [SecurityAdvisorySeverity!] - """List the topics for this package.""" - topics( """Returns the elements in the list that come after the specified cursor.""" after: String @@ -12369,51 +15538,60 @@ type RegistryPackage implements Node { """Returns the last _n_ elements from the list.""" last: Int - ): TopicConnection + ): SecurityVulnerabilityConnection! - """Find package version by version string.""" - version( - """The package version.""" - version: String! - ): RegistryPackageVersion + """Look up a topic by name.""" + topic( + """The topic's name.""" + name: String! + ): Topic - """Find package version by version string.""" - versionByPlatform( - """The package version.""" - version: String! + """Lookup a user by login.""" + user( + """The user's login.""" + login: String! + ): User - """Find a registry package for a specific platform.""" - platform: String! - ): RegistryPackageVersion + """The currently authenticated user.""" + viewer: User! +} - """Find package version by manifest SHA256.""" - versionBySha256( - """The package SHA256 digest.""" - sha256: String! - ): RegistryPackageVersion +"""Represents the client's rate limit.""" +type RateLimit { + """The point cost for the current query counting against the rate limit.""" + cost: Int! - """list of versions for this package""" - versions( - """Returns the elements in the list that come after the specified cursor.""" - after: String + """ + The maximum number of points the client is permitted to consume in a 60 minute window. + """ + limit: Int! - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String + """The maximum number of nodes this query may return""" + nodeCount: Int! - """Returns the first _n_ elements from the list.""" - first: Int + """The number of points remaining in the current rate limit window.""" + remaining: Int! - """Returns the last _n_ elements from the list.""" - last: Int - ): RegistryPackageVersionConnection! + """ + The time at which the current rate limit window resets in UTC epoch seconds. + """ + resetAt: DateTime! + + """The number of points used in the current rate limit window.""" + used: Int! +} + +"""Represents a subject that can be reacted on.""" +interface Reactable { + """Identifies the primary key from the database.""" + databaseId: Int + id: ID! - """List package versions with a specific metadatum.""" - versionsByMetadatum( - """Filter on a specific metadatum.""" - metadatum: RegistryPackageMetadatum! + """A list of reactions grouped by content left on the subject.""" + reactionGroups: [ReactionGroup!] + """A list of Reactions left on the Issue.""" + reactions( """Returns the elements in the list that come after the specified cursor.""" after: String @@ -12427,46 +15605,25 @@ type RegistryPackage implements Node { """Returns the last _n_ elements from the list.""" last: Int - ): RegistryPackageVersionConnection -} - -"""The connection type for RegistryPackage.""" -type RegistryPackageConnection { - """A list of edges.""" - edges: [RegistryPackageEdge] - - """A list of nodes.""" - nodes: [RegistryPackage] - - """Information to aid in pagination.""" - pageInfo: PageInfo! - - """Identifies the total count of items in the connection.""" - totalCount: Int! -} -""" -A package dependency contains the information needed to satisfy a dependency. -""" -type RegistryPackageDependency implements Node { - """Identifies the type of dependency.""" - dependencyType: RegistryPackageDependencyType! - id: ID! + """Allows filtering Reactions by emoji.""" + content: ReactionContent - """Identifies the name of the dependency.""" - name: String! + """Allows specifying the order in which reactions are returned.""" + orderBy: ReactionOrder + ): ReactionConnection! - """Identifies the version of the dependency.""" - version: String! + """Can user react to this subject""" + viewerCanReact: Boolean! } -"""The connection type for RegistryPackageDependency.""" -type RegistryPackageDependencyConnection { +"""The connection type for User.""" +type ReactingUserConnection { """A list of edges.""" - edges: [RegistryPackageDependencyEdge] + edges: [ReactingUserEdge] """A list of nodes.""" - nodes: [RegistryPackageDependency] + nodes: [User] """Information to aid in pagination.""" pageInfo: PageInfo! @@ -12475,130 +15632,106 @@ type RegistryPackageDependencyConnection { totalCount: Int! } -"""An edge in a connection.""" -type RegistryPackageDependencyEdge { +"""Represents a user that's made a reaction.""" +type ReactingUserEdge { """A cursor for use in pagination.""" cursor: String! + node: User! - """The item at the end of the edge.""" - node: RegistryPackageDependency -} - -"""The possible types of a registry package dependency.""" -enum RegistryPackageDependencyType { - """A default registry package dependency type.""" - DEFAULT - - """A dev registry package dependency type.""" - DEV - - """A test registry package dependency type.""" - TEST - - """A peer registry package dependency type.""" - PEER - - """An optional registry package dependency type.""" - OPTIONAL - - """An optional registry package dependency type.""" - BUNDLED + """The moment when the user made the reaction.""" + reactedAt: DateTime! } -"""An edge in a connection.""" -type RegistryPackageEdge { - """A cursor for use in pagination.""" - cursor: String! +"""An emoji reaction to a particular piece of content.""" +type Reaction implements Node { + """Identifies the emoji reaction.""" + content: ReactionContent! - """The item at the end of the edge.""" - node: RegistryPackage -} + """Identifies the date and time when the object was created.""" + createdAt: DateTime! -"""A file in a specific registry package version.""" -type RegistryPackageFile implements Node { - """A unique identifier for this file.""" - guid: String + """Identifies the primary key from the database.""" + databaseId: Int id: ID! - """Identifies the md5.""" - md5: String - - """URL to download the asset metadata.""" - metadataUrl: URI! - - """Name of the file""" - name: String! - - """The package version this file belongs to.""" - packageVersion: RegistryPackageVersion! - - """Identifies the sha1.""" - sha1: String - - """Identifies the sha256.""" - sha256: String - - """Identifies the size.""" - size: Int - - """Identifies the date and time when the object was last updated.""" - updatedAt: DateTime! + """The reactable piece of content""" + reactable: Reactable! - """URL to download the asset.""" - url: URI! + """Identifies the user who created this reaction.""" + user: User } -"""The connection type for RegistryPackageFile.""" -type RegistryPackageFileConnection { +"""A list of reactions that have been left on the subject.""" +type ReactionConnection { """A list of edges.""" - edges: [RegistryPackageFileEdge] + edges: [ReactionEdge] """A list of nodes.""" - nodes: [RegistryPackageFile] + nodes: [Reaction] """Information to aid in pagination.""" pageInfo: PageInfo! """Identifies the total count of items in the connection.""" totalCount: Int! + + """ + Whether or not the authenticated user has left a reaction on the subject. + """ + viewerHasReacted: Boolean! +} + +"""Emojis that can be attached to Issues, Pull Requests and Comments.""" +enum ReactionContent { + """Represents the `:+1:` emoji.""" + THUMBS_UP + + """Represents the `:-1:` emoji.""" + THUMBS_DOWN + + """Represents the `:laugh:` emoji.""" + LAUGH + + """Represents the `:hooray:` emoji.""" + HOORAY + + """Represents the `:confused:` emoji.""" + CONFUSED + + """Represents the `:heart:` emoji.""" + HEART + + """Represents the `:rocket:` emoji.""" + ROCKET + + """Represents the `:eyes:` emoji.""" + EYES } """An edge in a connection.""" -type RegistryPackageFileEdge { +type ReactionEdge { """A cursor for use in pagination.""" cursor: String! """The item at the end of the edge.""" - node: RegistryPackageFile -} - -"""The possible states of a registry package file.""" -enum RegistryPackageFileState { - """Package file doesn't have a blob backing it.""" - NEW - - """All Package file contents have been uploaded.""" - UPLOADED + node: Reaction } -"""Represents a single registry metadatum""" -input RegistryPackageMetadatum { - """Name of the metadatum.""" - name: String! - - """Value of the metadatum.""" - value: String! +"""A group of emoji reactions to a particular piece of content.""" +type ReactionGroup { + """Identifies the emoji reaction.""" + content: ReactionContent! - """True, if the metadatum can be updated if it already exists""" - update: Boolean -} + """Identifies when the reaction was created.""" + createdAt: DateTime -"""Represents an owner of a registry package.""" -interface RegistryPackageOwner { - id: ID! + """The subject that was reacted to.""" + subject: Reactable! - """A list of registry packages under the owner.""" - registryPackages( + """ + Users who have reacted to the reaction subject with the emotion represented by this reaction group + """ + users( """Returns the elements in the list that come after the specified cursor.""" after: String @@ -12612,33 +15745,67 @@ interface RegistryPackageOwner { """Returns the last _n_ elements from the list.""" last: Int + ): ReactingUserConnection! - """Find registry package by name.""" - name: String + """ + Whether or not the authenticated user has left a reaction on the subject. + """ + viewerHasReacted: Boolean! +} - """Find registry packages by their names.""" - names: [String] +"""Ways in which lists of reactions can be ordered upon return.""" +input ReactionOrder { + """The field in which to order reactions by.""" + field: ReactionOrderField! - """Find registry packages in a repository.""" - repositoryId: ID + """The direction in which to order reactions by the specified field.""" + direction: OrderDirection! +} - """Filter registry package by type.""" - packageType: RegistryPackageType +"""A list of fields that reactions can be ordered by.""" +enum ReactionOrderField { + """Allows ordering a list of reactions by when they were created.""" + CREATED_AT +} + +"""Represents a 'ready_for_review' event on a given pull request.""" +type ReadyForReviewEvent implements Node & UniformResourceLocatable { + """Identifies the actor who performed the event.""" + actor: Actor + + """Identifies the date and time when the object was created.""" + createdAt: DateTime! + id: ID! + + """PullRequest referenced by event.""" + pullRequest: PullRequest! - """Filter registry package by type (string).""" - registryPackageType: String + """The HTTP path for this ready for review event.""" + resourcePath: URI! - """Filter registry package by whether it is publicly visible""" - publicOnly: Boolean = false - ): RegistryPackageConnection! + """The HTTP URL for this ready for review event.""" + url: URI! } -"""Represents an interface to search packages on an object.""" -interface RegistryPackageSearch { - id: ID! +"""Represents a Git reference.""" +type Ref implements Node { + """A list of pull requests with this ref as the head ref.""" + associatedPullRequests( + """A list of states to filter the pull requests by.""" + states: [PullRequestState!] + + """A list of label names to filter the pull requests by.""" + labels: [String!] + + """The head ref name to filter the pull requests by.""" + headRefName: String + + """The base ref name to filter the pull requests by.""" + baseRefName: String + + """Ordering options for pull requests returned from the connection.""" + orderBy: IssueOrder - """A list of registry packages for a particular search query.""" - registryPackagesForQuery( """Returns the elements in the list that come after the specified cursor.""" after: String @@ -12652,53 +15819,35 @@ interface RegistryPackageSearch { """Returns the last _n_ elements from the list.""" last: Int + ): PullRequestConnection! - """Find registry package by search query.""" - query: String - - """Filter registry package by type.""" - packageType: RegistryPackageType - ): RegistryPackageConnection! -} - -""" -Represents a object that contains package activity statistics such as downloads. -""" -type RegistryPackageStatistics { - """Number of times the package was downloaded this month.""" - downloadsThisMonth: Int! - - """Number of times the package was downloaded this week.""" - downloadsThisWeek: Int! - - """Number of times the package was downloaded this year.""" - downloadsThisYear: Int! + """Branch protection rules for this ref""" + branchProtectionRule: BranchProtectionRule + id: ID! - """Number of times the package was downloaded today.""" - downloadsToday: Int! + """The ref name.""" + name: String! - """Number of times the package was downloaded since it was created.""" - downloadsTotalCount: Int! -} + """The ref's prefix, such as `refs/heads/` or `refs/tags/`.""" + prefix: String! -"""A version tag contains the mapping between a tag name and a version.""" -type RegistryPackageTag implements Node { - id: ID! + """Branch protection rules that are viewable by non-admins""" + refUpdateRule: RefUpdateRule - """Identifies the tag name of the version.""" - name: String! + """The repository the ref belongs to.""" + repository: Repository! - """version that the tag is associated with""" - version: RegistryPackageVersion + """The object the ref points to. Returns null when object does not exist.""" + target: GitObject } -"""The connection type for RegistryPackageTag.""" -type RegistryPackageTagConnection { +"""The connection type for Ref.""" +type RefConnection { """A list of edges.""" - edges: [RegistryPackageTagEdge] + edges: [RefEdge] """A list of nodes.""" - nodes: [RegistryPackageTag] + nodes: [Ref] """Information to aid in pagination.""" pageInfo: PageInfo! @@ -12708,173 +15857,111 @@ type RegistryPackageTagConnection { } """An edge in a connection.""" -type RegistryPackageTagEdge { +type RefEdge { """A cursor for use in pagination.""" cursor: String! """The item at the end of the edge.""" - node: RegistryPackageTag + node: Ref } -"""The possible types of a registry package.""" -enum RegistryPackageType { - """An npm registry package.""" - NPM +"""Represents a 'referenced' event on a given `ReferencedSubject`.""" +type ReferencedEvent implements Node { + """Identifies the actor who performed the event.""" + actor: Actor - """A rubygems registry package.""" - RUBYGEMS + """Identifies the commit associated with the 'referenced' event.""" + commit: Commit - """A maven registry package.""" - MAVEN + """Identifies the repository associated with the 'referenced' event.""" + commitRepository: Repository! - """A docker image.""" - DOCKER + """Identifies the date and time when the object was created.""" + createdAt: DateTime! + id: ID! - """A debian package.""" - DEBIAN + """Reference originated in a different repository.""" + isCrossRepository: Boolean! - """A nuget package.""" - NUGET + """ + Checks if the commit message itself references the subject. Can be false in the case of a commit comment reference. + """ + isDirectReference: Boolean! - """A python package.""" - PYTHON + """Object referenced by event.""" + subject: ReferencedSubject! } -""" -A package version contains the information about a specific package version. -""" -type RegistryPackageVersion implements Node { - """list of dependencies for this package""" - dependencies( - """Returns the elements in the list that come after the specified cursor.""" - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """Returns the first _n_ elements from the list.""" - first: Int - - """Returns the last _n_ elements from the list.""" - last: Int - - """Find dependencies by type.""" - type: RegistryPackageDependencyType - ): RegistryPackageDependencyConnection! - - """A file associated with this registry package version""" - fileByName( - """A specific file to find.""" - filename: String! - ): RegistryPackageFile - - """List of files associated with this registry package version""" - files( - """Returns the elements in the list that come after the specified cursor.""" - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """Returns the first _n_ elements from the list.""" - first: Int - - """Returns the last _n_ elements from the list.""" - last: Int - ): RegistryPackageFileConnection! - id: ID! - - """A single line of text to install this package version.""" - installationCommand: String - - """Identifies the package manifest for this package version.""" - manifest: String - - """Identifies the platform this version was built for.""" - platform: String +"""Any referencable object""" +union ReferencedSubject = Issue | PullRequest - """The README of this package version""" - readme: String +"""Ways in which lists of git refs can be ordered upon return.""" +input RefOrder { + """The field in which to order refs by.""" + field: RefOrderField! - """The HTML README of this package version""" - readmeHtml: HTML + """The direction in which to order refs by the specified field.""" + direction: OrderDirection! +} - """Registry package associated with this version.""" - registryPackage: RegistryPackage +"""Properties by which ref connections can be ordered.""" +enum RefOrderField { + """Order refs by underlying commit date if the ref prefix is refs/tags/""" + TAG_COMMIT_DATE - """Release associated with this package.""" - release: Release + """Order refs by their alphanumeric name""" + ALPHABETICAL +} - """Identifies the sha256.""" - sha256: String +"""A ref update rules for a viewer.""" +type RefUpdateRule { + """Can this branch be deleted.""" + allowsDeletions: Boolean! - """Identifies the size.""" - size: Int + """Are force pushes allowed on this branch.""" + allowsForcePushes: Boolean! - """Statistics about package activity.""" - statistics: RegistryPackageVersionStatistics + """Identifies the protection rule pattern.""" + pattern: String! - """Identifies the package version summary.""" - summary: String + """Number of approving reviews required to update matching branches.""" + requiredApprovingReviewCount: Int """ - Time at which the most recent file upload for this package version finished + List of required status check contexts that must pass for commits to be accepted to matching branches. """ - updatedAt: DateTime! - - """Identifies the version number.""" - version: String! - - """Can the current viewer edit this Package version.""" - viewerCanEdit: Boolean! -} - -"""The connection type for RegistryPackageVersion.""" -type RegistryPackageVersionConnection { - """A list of edges.""" - edges: [RegistryPackageVersionEdge] - - """A list of nodes.""" - nodes: [RegistryPackageVersion] - - """Information to aid in pagination.""" - pageInfo: PageInfo! + requiredStatusCheckContexts: [String] - """Identifies the total count of items in the connection.""" - totalCount: Int! -} + """Are merge commits prohibited from being pushed to this branch.""" + requiresLinearHistory: Boolean! -"""An edge in a connection.""" -type RegistryPackageVersionEdge { - """A cursor for use in pagination.""" - cursor: String! + """Are commits required to be signed.""" + requiresSignatures: Boolean! - """The item at the end of the edge.""" - node: RegistryPackageVersion + """Can the viewer push to the branch""" + viewerCanPush: Boolean! } """ -Represents a object that contains package version activity statistics such as downloads. +Autogenerated input type of RegenerateEnterpriseIdentityProviderRecoveryCodes """ -type RegistryPackageVersionStatistics { - """Number of times the package was downloaded this month.""" - downloadsThisMonth: Int! - - """Number of times the package was downloaded this week.""" - downloadsThisWeek: Int! +input RegenerateEnterpriseIdentityProviderRecoveryCodesInput { + """The ID of the enterprise on which to set an identity provider.""" + enterpriseId: ID! - """Number of times the package was downloaded this year.""" - downloadsThisYear: Int! + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} - """Number of times the package was downloaded today.""" - downloadsToday: Int! +""" +Autogenerated return type of RegenerateEnterpriseIdentityProviderRecoveryCodes +""" +type RegenerateEnterpriseIdentityProviderRecoveryCodesPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String - """Number of times the package was downloaded since it was created.""" - downloadsTotalCount: Int! + """The identity provider for the enterprise.""" + identityProvider: EnterpriseIdentityProvider } """A release contains the content for a release.""" @@ -12885,8 +15972,11 @@ type Release implements Node & UniformResourceLocatable { """Identifies the date and time when the object was created.""" createdAt: DateTime! - """Identifies the description of the release.""" + """The description of the release.""" description: String + + """The description of this release rendered to HTML.""" + descriptionHTML: HTML id: ID! """Whether or not the release is a draft""" @@ -12895,7 +15985,7 @@ type Release implements Node & UniformResourceLocatable { """Whether or not the release is a prerelease""" isPrerelease: Boolean! - """Identifies the title of the release.""" + """The title of the release.""" name: String """Identifies the date and time when the release was created.""" @@ -12924,6 +16014,14 @@ type Release implements Node & UniformResourceLocatable { """The HTTP path for this issue""" resourcePath: URI! + """ + A description of the release, rendered to HTML without any links in it. + """ + shortDescriptionHTML( + """How many characters to return.""" + limit: Int = 200 + ): HTML + """The Git tag the release points to""" tag: Ref @@ -13087,6 +16185,24 @@ input RemoveEnterpriseAdminInput { clientMutationId: String } +"""Autogenerated return type of RemoveEnterpriseAdmin""" +type RemoveEnterpriseAdminPayload { + """The user who was removed as an administrator.""" + admin: User + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The updated enterprise.""" + enterprise: Enterprise + + """A message confirming the result of removing an administrator.""" + message: String + + """The viewer performing the mutation.""" + viewer: User +} + """Autogenerated input type of RemoveEnterpriseIdentityProvider""" input RemoveEnterpriseIdentityProviderInput { """The ID of the enterprise from which to remove the identity provider.""" @@ -13096,6 +16212,15 @@ input RemoveEnterpriseIdentityProviderInput { clientMutationId: String } +"""Autogenerated return type of RemoveEnterpriseIdentityProvider""" +type RemoveEnterpriseIdentityProviderPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The identity provider that was removed from the enterprise.""" + identityProvider: EnterpriseIdentityProvider +} + """Autogenerated input type of RemoveEnterpriseOrganization""" input RemoveEnterpriseOrganizationInput { """ @@ -13110,6 +16235,21 @@ input RemoveEnterpriseOrganizationInput { clientMutationId: String } +"""Autogenerated return type of RemoveEnterpriseOrganization""" +type RemoveEnterpriseOrganizationPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The updated enterprise.""" + enterprise: Enterprise + + """The organization that was removed from the enterprise.""" + organization: Organization + + """The viewer performing the mutation.""" + viewer: User +} + """Autogenerated input type of RemoveLabelsFromLabelable""" input RemoveLabelsFromLabelableInput { """The id of the Labelable to remove labels from.""" @@ -13292,6 +16432,9 @@ type RepoAccessAuditEntry implements Node & AuditEntry & OrganizationAuditEntryD createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -13373,6 +16516,9 @@ type RepoAddMemberAuditEntry implements Node & AuditEntry & OrganizationAuditEnt createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -13454,6 +16600,9 @@ type RepoAddTopicAuditEntry implements Node & AuditEntry & RepositoryAuditEntryD createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -13526,6 +16675,9 @@ type RepoArchivedAuditEntry implements Node & AuditEntry & RepositoryAuditEntryD createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -13615,6 +16767,9 @@ type RepoChangeMergeSettingAuditEntry implements Node & AuditEntry & RepositoryA """The merge method affected by the change""" mergeType: RepoChangeMergeSettingAuditEntryMergeType + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -13697,6 +16852,9 @@ type RepoConfigDisableAnonymousGitAccessAuditEntry implements Node & AuditEntry createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -13763,6 +16921,9 @@ type RepoConfigDisableCollaboratorsOnlyAuditEntry implements Node & AuditEntry & createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -13829,6 +16990,9 @@ type RepoConfigDisableContributorsOnlyAuditEntry implements Node & AuditEntry & createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -13895,6 +17059,9 @@ type RepoConfigDisableSockpuppetDisallowedAuditEntry implements Node & AuditEntr createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -13961,6 +17128,9 @@ type RepoConfigEnableAnonymousGitAccessAuditEntry implements Node & AuditEntry & createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -14027,6 +17197,9 @@ type RepoConfigEnableCollaboratorsOnlyAuditEntry implements Node & AuditEntry & createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -14093,6 +17266,9 @@ type RepoConfigEnableContributorsOnlyAuditEntry implements Node & AuditEntry & O createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -14159,6 +17335,9 @@ type RepoConfigEnableSockpuppetDisallowedAuditEntry implements Node & AuditEntry createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -14225,6 +17404,9 @@ type RepoConfigLockAnonymousGitAccessAuditEntry implements Node & AuditEntry & O createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -14291,6 +17473,9 @@ type RepoConfigUnlockAnonymousGitAccessAuditEntry implements Node & AuditEntry & createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -14363,6 +17548,9 @@ type RepoCreateAuditEntry implements Node & AuditEntry & RepositoryAuditEntryDat forkSourceName: String id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -14444,6 +17632,9 @@ type RepoDestroyAuditEntry implements Node & AuditEntry & RepositoryAuditEntryDa createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -14525,6 +17716,9 @@ type RepoRemoveMemberAuditEntry implements Node & AuditEntry & OrganizationAudit createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -14606,6 +17800,9 @@ type RepoRemoveTopicAuditEntry implements Node & AuditEntry & RepositoryAuditEnt createdAt: PreciseDateTime! id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -14665,14 +17862,20 @@ enum ReportedContentClassifiers { """An outdated piece of content""" OUTDATED + """A duplicated piece of content""" + DUPLICATE + """The content has been resolved""" RESOLVED } """A repository contains the content for a project.""" -type Repository implements Node & ProjectOwner & RegistryPackageOwner & Subscribable & Starrable & UniformResourceLocatable & RepositoryInfo { +type Repository implements Node & ProjectOwner & PackageOwner & Subscribable & Starrable & UniformResourceLocatable & RepositoryInfo { """A list of users that can be assigned to issues in this repository.""" assignableUsers( + """Filters users with query on user name and login""" + query: String + """Returns the elements in the list that come after the specified cursor.""" after: String @@ -14713,6 +17916,9 @@ type Repository implements Node & ProjectOwner & RegistryPackageOwner & Subscrib """Collaborators affiliation level with a repository.""" affiliation: CollaboratorAffiliation + """Filters users with query on user name and login""" + query: String + """Returns the elements in the list that come after the specified cursor.""" after: String @@ -14745,6 +17951,9 @@ type Repository implements Node & ProjectOwner & RegistryPackageOwner & Subscrib last: Int ): CommitCommentConnection! + """Returns a list of contact links associated to the repository""" + contactLinks: [RepositoryContactLink!] + """Identifies the date and time when the object was created.""" createdAt: DateTime! @@ -14754,6 +17963,11 @@ type Repository implements Node & ProjectOwner & RegistryPackageOwner & Subscrib """The Ref associated with the repository's default branch.""" defaultBranchRef: Ref + """ + Whether or not branches are automatically deleted when merged in this repository. + """ + deleteBranchOnMerge: Boolean! + """A list of deploy keys that are on this repository.""" deployKeys( """Returns the elements in the list that come after the specified cursor.""" @@ -14777,7 +17991,7 @@ type Repository implements Node & ProjectOwner & RegistryPackageOwner & Subscrib environments: [String!] """Ordering options for deployments returned from the connection.""" - orderBy: DeploymentOrder + orderBy: DeploymentOrder = {field: CREATED_AT, direction: ASC} """Returns the elements in the list that come after the specified cursor.""" after: String @@ -14821,7 +18035,7 @@ type Repository implements Node & ProjectOwner & RegistryPackageOwner & Subscrib connection. For example, OWNER will include only repositories that the current viewer owns. """ - affiliations: [RepositoryAffiliation] = [OWNER, COLLABORATOR] + affiliations: [RepositoryAffiliation] """ Array of owner's affiliation options for repositories returned from the @@ -14850,9 +18064,15 @@ type Repository implements Node & ProjectOwner & RegistryPackageOwner & Subscrib last: Int ): RepositoryConnection! + """The funding links for this repository""" + fundingLinks: [FundingLink!]! + """Indicates if the repository has issues feature enabled.""" hasIssuesEnabled: Boolean! + """Indicates if the repository has the Projects feature enabled.""" + hasProjectsEnabled: Boolean! + """Indicates if the repository has wiki feature enabled.""" hasWikiEnabled: Boolean! @@ -14860,15 +18080,29 @@ type Repository implements Node & ProjectOwner & RegistryPackageOwner & Subscrib homepageUrl: URI id: ID! + """The interaction ability settings for this repository.""" + interactionAbility: RepositoryInteractionAbility + """Indicates if the repository is unmaintained.""" isArchived: Boolean! + """Returns true if blank issue creation is allowed""" + isBlankIssuesEnabled: Boolean! + """Returns whether or not this repository disabled.""" isDisabled: Boolean! + """Returns whether or not this repository is empty.""" + isEmpty: Boolean! + """Identifies if the repository is a fork.""" isFork: Boolean! + """ + Indicates if a repository is either owned by an organization, or is a private fork of an organization repository. + """ + isInOrganization: Boolean! + """Indicates if the repository has been locked or not.""" isLocked: Boolean! @@ -14878,11 +18112,17 @@ type Repository implements Node & ProjectOwner & RegistryPackageOwner & Subscrib """Identifies if the repository is private.""" isPrivate: Boolean! + """Returns true if this repository has a security policy""" + isSecurityPolicyEnabled: Boolean + """ Identifies if the repository is a template that can be used to generate new repositories. """ isTemplate: Boolean! + """Is this repository a user configuration repository?""" + isUserConfigurationRepository: Boolean! + """Returns a single issue from the current repository by number.""" issue( """The number for the issue to be returned.""" @@ -14897,6 +18137,9 @@ type Repository implements Node & ProjectOwner & RegistryPackageOwner & Subscrib number: Int! ): IssueOrPullRequest + """Returns a list of issue templates associated to the repository""" + issueTemplates: [IssueTemplate!] + """A list of issues that have been opened in the repository.""" issues( """Ordering options for issues returned from the connection.""" @@ -14934,6 +18177,9 @@ type Repository implements Node & ProjectOwner & RegistryPackageOwner & Subscrib """A list of labels associated with the repository.""" labels( + """Ordering options for labels returned from the connection.""" + orderBy: LabelOrder = {field: CREATED_AT, direction: ASC} + """Returns the elements in the list that come after the specified cursor.""" after: String @@ -14984,6 +18230,9 @@ type Repository implements Node & ProjectOwner & RegistryPackageOwner & Subscrib A list of Users that can be mentioned in the context of the repository. """ mentionableUsers( + """Filters users with query on user name and login""" + query: String + """Returns the elements in the list that come after the specified cursor.""" after: String @@ -15029,6 +18278,9 @@ type Repository implements Node & ProjectOwner & RegistryPackageOwner & Subscrib """Ordering options for milestones.""" orderBy: MilestoneOrder + + """Filters milestones with a query on the title""" + query: String ): MilestoneConnection """The repository's original mirror URL.""" @@ -15055,6 +18307,35 @@ type Repository implements Node & ProjectOwner & RegistryPackageOwner & Subscrib """The User owner of the repository.""" owner: RepositoryOwner! + """A list of packages under the owner.""" + packages( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + + """Find packages by their names.""" + names: [String] + + """Find packages in a repository by ID.""" + repositoryId: ID + + """Filter registry package by type.""" + packageType: PackageType + + """Ordering of the returned packages.""" + orderBy: PackageOrder = {field: CREATED_AT, direction: DESC} + ): PackageConnection! + """The repository parent, if this is a fork.""" parent: Repository @@ -15154,6 +18435,9 @@ type Repository implements Node & ProjectOwner & RegistryPackageOwner & Subscrib """Fetch a list of refs from the repository""" refs( + """Filters refs with query on name""" + query: String + """Returns the elements in the list that come after the specified cursor.""" after: String @@ -15178,41 +18462,6 @@ type Repository implements Node & ProjectOwner & RegistryPackageOwner & Subscrib orderBy: RefOrder ): RefConnection - """A list of registry packages under the owner.""" - registryPackages( - """Returns the elements in the list that come after the specified cursor.""" - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """Returns the first _n_ elements from the list.""" - first: Int - - """Returns the last _n_ elements from the list.""" - last: Int - - """Find registry package by name.""" - name: String - - """Find registry packages by their names.""" - names: [String] - - """Find registry packages in a repository.""" - repositoryId: ID - - """Filter registry package by type.""" - packageType: RegistryPackageType - - """Filter registry package by type (string).""" - registryPackageType: String - - """Filter registry package by whether it is publicly visible""" - publicOnly: Boolean = false - ): RegistryPackageConnection! - """Lookup a single release given various criteria.""" release( """The name of the Tag the Release was created from""" @@ -15259,6 +18508,9 @@ type Repository implements Node & ProjectOwner & RegistryPackageOwner & Subscrib """The HTTP path for this repository""" resourcePath: URI! + """The security policy URL.""" + securityPolicyUrl: URI + """ A description of the repository, rendered to HTML without any links in it. """ @@ -15273,6 +18525,12 @@ type Repository implements Node & ProjectOwner & RegistryPackageOwner & Subscrib """The SSH URL to clone this repository""" sshUrl: GitSSHRemote! + """ + Returns a count of how many stargazers there are on this object + + """ + stargazerCount: Int! + """A list of users who have starred this starrable.""" stargazers( """Returns the elements in the list that come after the specified cursor.""" @@ -15293,6 +18551,29 @@ type Repository implements Node & ProjectOwner & RegistryPackageOwner & Subscrib orderBy: StarOrder ): StargazerConnection! + """ + Returns a list of all submodules in this repository parsed from the + .gitmodules file as of the default branch's HEAD commit. + """ + submodules( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + ): SubmoduleConnection! + + """Temporary authentication token for cloning this repository.""" + tempCloneToken: String + """The repository from which this repository was generated, if any.""" templateRepository: Repository @@ -15321,6 +18602,14 @@ type Repository implements Node & ProjectOwner & RegistryPackageOwner & Subscrib """Indicates whether the viewer can update the topics of this repository.""" viewerCanUpdateTopics: Boolean! + """The last commit email for the viewer.""" + viewerDefaultCommitEmail: String + + """ + The last used merge method by the viewer or the default for the repository. + """ + viewerDefaultMergeMethod: PullRequestMergeMethod! + """ Returns a boolean indicating whether the viewing user has starred this starrable. """ @@ -15331,11 +18620,31 @@ type Repository implements Node & ProjectOwner & RegistryPackageOwner & Subscrib """ viewerPermission: RepositoryPermission + """A list of emails this viewer can commit with.""" + viewerPossibleCommitEmails: [String!] + """ Identifies if the viewer is watching, not watching, or ignoring the subscribable entity. """ viewerSubscription: SubscriptionState + """A list of vulnerability alerts that are on this repository.""" + vulnerabilityAlerts( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + ): RepositoryVulnerabilityAlertConnection + """A list of users watching the repository.""" watchers( """Returns the elements in the list that come after the specified cursor.""" @@ -15384,15 +18693,6 @@ interface RepositoryAuditEntryData { repositoryUrl: URI } -"""The affiliation type between collaborator and repository.""" -enum RepositoryCollaboratorAffiliation { - """All collaborators of the repository.""" - ALL - - """All outside collaborators of an organization-owned repository.""" - OUTSIDE -} - """The connection type for User.""" type RepositoryCollaboratorConnection { """A list of edges.""" @@ -15439,6 +18739,18 @@ type RepositoryConnection { totalDiskUsage: Int! } +"""A repository contact link.""" +type RepositoryContactLink { + """The contact link purpose.""" + about: String! + + """The contact link name.""" + name: String! + + """The contact link URL.""" + url: URI! +} + """The reason a repository is listed as 'contributed'.""" enum RepositoryContributionType { """Created a commit""" @@ -15457,18 +18769,6 @@ enum RepositoryContributionType { PULL_REQUEST_REVIEW } -"""A user who has contributed to a repository.""" -type RepositoryContributorEdge { - """The number of contributions the user has made in the repository.""" - contributionsCount: Int! - - """A cursor for use in pagination.""" - cursor: String! - - """The item at the end of the edge.""" - node: User -} - """An edge in a connection.""" type RepositoryEdge { """A cursor for use in pagination.""" @@ -15497,6 +18797,9 @@ interface RepositoryInfo { """Indicates if the repository has issues feature enabled.""" hasIssuesEnabled: Boolean! + """Indicates if the repository has the Projects feature enabled.""" + hasProjectsEnabled: Boolean! + """Indicates if the repository has wiki feature enabled.""" hasWikiEnabled: Boolean! @@ -15509,6 +18812,11 @@ interface RepositoryInfo { """Identifies if the repository is a fork.""" isFork: Boolean! + """ + Indicates if a repository is either owned by an organization, or is a private fork of an organization repository. + """ + isInOrganization: Boolean! + """Indicates if the repository has been locked or not.""" isLocked: Boolean! @@ -15570,16 +18878,84 @@ interface RepositoryInfo { usesCustomOpenGraphImage: Boolean! } +"""Repository interaction limit that applies to this object.""" +type RepositoryInteractionAbility { + """The time the currently active limit expires.""" + expiresAt: DateTime + + """The current limit that is enabled on this object.""" + limit: RepositoryInteractionLimit! + + """The origin of the currently active interaction limit.""" + origin: RepositoryInteractionLimitOrigin! +} + +"""A repository interaction limit.""" +enum RepositoryInteractionLimit { + """ + Users that have recently created their account will be unable to interact with the repository. + """ + EXISTING_USERS + + """ + Users that have not previously committed to a repository’s default branch will be unable to interact with the repository. + """ + CONTRIBUTORS_ONLY + + """ + Users that are not collaborators will not be able to interact with the repository. + """ + COLLABORATORS_ONLY + + """No interaction limits are enabled.""" + NO_LIMIT +} + +"""The length for a repository interaction limit to be enabled for.""" +enum RepositoryInteractionLimitExpiry { + """The interaction limit will expire after 1 day.""" + ONE_DAY + + """The interaction limit will expire after 3 days.""" + THREE_DAYS + + """The interaction limit will expire after 1 week.""" + ONE_WEEK + + """The interaction limit will expire after 1 month.""" + ONE_MONTH + + """The interaction limit will expire after 6 months.""" + SIX_MONTHS +} + +"""Indicates where an interaction limit is configured.""" +enum RepositoryInteractionLimitOrigin { + """A limit that is configured at the repository level.""" + REPOSITORY + + """A limit that is configured at the organization level.""" + ORGANIZATION + + """A limit that is configured at the user-wide level.""" + USER +} + """An invitation for a user to be added to a repository.""" type RepositoryInvitation implements Node { + """The email address that received the invitation.""" + email: String id: ID! """The user who received the invitation.""" - invitee: User! + invitee: User """The user who created the invitation.""" inviter: User! + """The permalink for this repository invitation.""" + permalink: URI! + """The permission granted on this repository by this invitation.""" permission: RepositoryPermission! @@ -15587,13 +18963,43 @@ type RepositoryInvitation implements Node { repository: RepositoryInfo } +"""The connection type for RepositoryInvitation.""" +type RepositoryInvitationConnection { + """A list of edges.""" + edges: [RepositoryInvitationEdge] + + """A list of nodes.""" + nodes: [RepositoryInvitation] + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """Identifies the total count of items in the connection.""" + totalCount: Int! +} + """An edge in a connection.""" type RepositoryInvitationEdge { """A cursor for use in pagination.""" cursor: String! - """The item at the end of the edge.""" - node: RepositoryInvitation + """The item at the end of the edge.""" + node: RepositoryInvitation +} + +"""Ordering options for repository invitation connections.""" +input RepositoryInvitationOrder { + """The field to order repository invitations by.""" + field: RepositoryInvitationOrderField! + + """The ordering direction.""" + direction: OrderDirection! +} + +"""Properties by which repository invitation connections can be ordered.""" +enum RepositoryInvitationOrderField { + """Order repository invitations by creation time""" + CREATED_AT } """The possible reasons a given repository could be in a locked state.""" @@ -15669,7 +19075,7 @@ interface RepositoryOwner { connection. For example, OWNER will include only repositories that the current viewer owns. """ - affiliations: [RepositoryAffiliation] = [OWNER, COLLABORATOR] + affiliations: [RepositoryAffiliation] """ Array of owner's affiliation options for repositories returned from the @@ -15840,6 +19246,9 @@ type RepositoryVisibilityChangeDisableAuditEntry implements Node & AuditEntry & enterpriseUrl: URI id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -15903,6 +19312,9 @@ type RepositoryVisibilityChangeEnableAuditEntry implements Node & AuditEntry & E enterpriseUrl: URI id: ID! + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -15930,6 +19342,64 @@ type RepositoryVisibilityChangeEnableAuditEntry implements Node & AuditEntry & E userUrl: URI } +"""A alert for a repository with an affected vulnerability.""" +type RepositoryVulnerabilityAlert implements Node & RepositoryNode { + """When was the alert created?""" + createdAt: DateTime! + + """The reason the alert was dismissed""" + dismissReason: String + + """When was the alert dimissed?""" + dismissedAt: DateTime + + """The user who dismissed the alert""" + dismisser: User + id: ID! + + """The associated repository""" + repository: Repository! + + """The associated security advisory""" + securityAdvisory: SecurityAdvisory + + """The associated security vulnerablity""" + securityVulnerability: SecurityVulnerability + + """The vulnerable manifest filename""" + vulnerableManifestFilename: String! + + """The vulnerable manifest path""" + vulnerableManifestPath: String! + + """The vulnerable requirements""" + vulnerableRequirements: String +} + +"""The connection type for RepositoryVulnerabilityAlert.""" +type RepositoryVulnerabilityAlertConnection { + """A list of edges.""" + edges: [RepositoryVulnerabilityAlertEdge] + + """A list of nodes.""" + nodes: [RepositoryVulnerabilityAlert] + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """Identifies the total count of items in the connection.""" + totalCount: Int! +} + +"""An edge in a connection.""" +type RepositoryVulnerabilityAlertEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of the edge.""" + node: RepositoryVulnerabilityAlert +} + """The possible states that can be requested when creating a check run.""" enum RequestableCheckStatusState { """The check suite or run has been queued.""" @@ -15943,7 +19413,7 @@ enum RequestableCheckStatusState { } """Types that can be requested reviewers.""" -union RequestedReviewer = User | Team | Mannequin +union RequestedReviewer = Mannequin | Team | User """Autogenerated input type of RequestReviews""" input RequestReviewsInput { @@ -15965,6 +19435,9 @@ input RequestReviewsInput { """Autogenerated return type of RequestReviews""" type RequestReviewsPayload { + """Identifies the actor who performed the event.""" + actor: Actor + """A unique identifier for the client performing the mutation.""" clientMutationId: String @@ -16055,7 +19528,7 @@ type ReviewDismissalAllowance implements Node { } """Types that can be an actor.""" -union ReviewDismissalAllowanceActor = User | Team +union ReviewDismissalAllowanceActor = Team | User """The connection type for ReviewDismissalAllowance.""" type ReviewDismissalAllowanceConnection { @@ -16128,6 +19601,9 @@ type ReviewDismissedEvent implements Node & UniformResourceLocatable { """A request for a user to review a pull request.""" type ReviewRequest implements Node { + """Whether this request was created for a code owner""" + asCodeOwner: Boolean! + """Identifies the primary key from the database.""" databaseId: Int id: ID! @@ -16195,6 +19671,56 @@ type ReviewRequestRemovedEvent implements Node { requestedReviewer: RequestedReviewer } +""" +A hovercard context with a message describing the current code review state of the pull +request. + +""" +type ReviewStatusHovercardContext implements HovercardContext { + """A string describing this context""" + message: String! + + """An octicon to accompany this context""" + octicon: String! + + """The current status of the pull request with respect to code review.""" + reviewDecision: PullRequestReviewDecision +} + +""" +The possible digest algorithms used to sign SAML requests for an identity provider. +""" +enum SamlDigestAlgorithm { + """SHA1""" + SHA1 + + """SHA256""" + SHA256 + + """SHA384""" + SHA384 + + """SHA512""" + SHA512 +} + +""" +The possible signature algorithms used to sign SAML requests for a Identity Provider. +""" +enum SamlSignatureAlgorithm { + """RSA-SHA1""" + RSA_SHA1 + + """RSA-SHA256""" + RSA_SHA256 + + """RSA-SHA384""" + RSA_SHA384 + + """RSA-SHA512""" + RSA_SHA512 +} + """A Saved Reply is text a user can use to reply quickly.""" type SavedReply implements Node { """The body of the saved reply.""" @@ -16254,7 +19780,7 @@ enum SavedReplyOrderField { } """The results of a search.""" -union SearchResultItem = Issue | PullRequest | Repository | User | Organization | MarketplaceListing | App +union SearchResultItem = App | Issue | MarketplaceListing | Organization | PullRequest | Repository | User """A list of results that matched against a search query.""" type SearchResultItemConnection { @@ -16325,6 +19851,9 @@ type SecurityAdvisory implements Node { """The organization that originated the advisory""" origin: String! + """The permalink for the advisory""" + permalink: URI + """When the advisory was published""" publishedAt: DateTime! @@ -16343,7 +19872,7 @@ type SecurityAdvisory implements Node { """Vulnerabilities associated with this Advisory""" vulnerabilities( """Ordering options for the returned topics.""" - orderBy: SecurityVulnerabilityOrder + orderBy: SecurityVulnerabilityOrder = {field: UPDATED_AT, direction: DESC} """An ecosystem to filter vulnerabilities by.""" ecosystem: SecurityAdvisoryEcosystem @@ -16404,6 +19933,9 @@ enum SecurityAdvisoryEcosystem { """.NET packages hosted at the NuGet Gallery""" NUGET + + """PHP packages hosted at packagist.org""" + COMPOSER } """An edge in a connection.""" @@ -16581,10 +20113,101 @@ input SetEnterpriseIdentityProviderInput { """ idpCertificate: String! + """ + The signature algorithm used to sign SAML requests for the identity provider. + """ + signatureMethod: SamlSignatureAlgorithm! + + """ + The digest algorithm used to sign SAML requests for the identity provider. + """ + digestMethod: SamlDigestAlgorithm! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of SetEnterpriseIdentityProvider""" +type SetEnterpriseIdentityProviderPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The identity provider for the enterprise.""" + identityProvider: EnterpriseIdentityProvider +} + +"""Autogenerated input type of SetOrganizationInteractionLimit""" +input SetOrganizationInteractionLimitInput { + """The ID of the organization to set a limit for.""" + organizationId: ID! + + """The limit to set.""" + limit: RepositoryInteractionLimit! + + """When this limit should expire.""" + expiry: RepositoryInteractionLimitExpiry + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of SetOrganizationInteractionLimit""" +type SetOrganizationInteractionLimitPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The organization that the interaction limit was set for.""" + organization: Organization +} + +"""Autogenerated input type of SetRepositoryInteractionLimit""" +input SetRepositoryInteractionLimitInput { + """The ID of the repository to set a limit for.""" + repositoryId: ID! + + """The limit to set.""" + limit: RepositoryInteractionLimit! + + """When this limit should expire.""" + expiry: RepositoryInteractionLimitExpiry + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of SetRepositoryInteractionLimit""" +type SetRepositoryInteractionLimitPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The repository that the interaction limit was set for.""" + repository: Repository +} + +"""Autogenerated input type of SetUserInteractionLimit""" +input SetUserInteractionLimitInput { + """The ID of the user to set a limit for.""" + userId: ID! + + """The limit to set.""" + limit: RepositoryInteractionLimit! + + """When this limit should expire.""" + expiry: RepositoryInteractionLimitExpiry + """A unique identifier for the client performing the mutation.""" clientMutationId: String } +"""Autogenerated return type of SetUserInteractionLimit""" +type SetUserInteractionLimitPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The user that the interaction limit was set for.""" + user: User +} + """Represents an S/MIME signature on a Commit or Tag.""" type SmimeSignature implements GitSignature { """Email used to sign this object.""" @@ -16614,8 +20237,20 @@ type SmimeSignature implements GitSignature { wasSignedByGitHub: Boolean! } +"""Entites that can sponsor others via GitHub Sponsors""" +union Sponsor = Organization | User + """Entities that can be sponsored through GitHub Sponsors""" interface Sponsorable { + """True if this user/organization has a GitHub Sponsors listing.""" + hasSponsorsListing: Boolean! + + """True if the viewer is sponsored by this user/organization.""" + isSponsoringViewer: Boolean! + + """The GitHub Sponsors listing for this user or organization.""" + sponsorsListing: SponsorsListing + """This object's sponsorships as the maintainer.""" sponsorshipsAsMaintainer( """Returns the elements in the list that come after the specified cursor.""" @@ -16642,8 +20277,186 @@ interface Sponsorable { orderBy: SponsorshipOrder ): SponsorshipConnection! - """This object's sponsorships as the sponsor.""" - sponsorshipsAsSponsor( + """This object's sponsorships as the sponsor.""" + sponsorshipsAsSponsor( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + + """ + Ordering options for sponsorships returned from this connection. If left + blank, the sponsorships will be ordered based on relevancy to the viewer. + """ + orderBy: SponsorshipOrder + ): SponsorshipConnection! + + """Whether or not the viewer is able to sponsor this user/organization.""" + viewerCanSponsor: Boolean! + + """True if the viewer is sponsoring this user/organization.""" + viewerIsSponsoring: Boolean! +} + +"""A sponsorship relationship between a sponsor and a maintainer""" +type Sponsorship implements Node { + """Identifies the date and time when the object was created.""" + createdAt: DateTime! + id: ID! + + """The privacy level for this sponsorship.""" + privacyLevel: SponsorshipPrivacy! + + """ + The user or organization that is sponsoring, if you have permission to view them. + """ + sponsorEntity: Sponsor + + """The entity that is being sponsored""" + sponsorable: Sponsorable! + + """The associated sponsorship tier""" + tier: SponsorsTier +} + +"""The connection type for Sponsorship.""" +type SponsorshipConnection { + """A list of edges.""" + edges: [SponsorshipEdge] + + """A list of nodes.""" + nodes: [Sponsorship] + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """Identifies the total count of items in the connection.""" + totalCount: Int! +} + +"""An edge in a connection.""" +type SponsorshipEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of the edge.""" + node: Sponsorship +} + +"""Ordering options for sponsorship connections.""" +input SponsorshipOrder { + """The field to order sponsorship by.""" + field: SponsorshipOrderField! + + """The ordering direction.""" + direction: OrderDirection! +} + +"""Properties by which sponsorship connections can be ordered.""" +enum SponsorshipOrderField { + """Order sponsorship by creation time.""" + CREATED_AT +} + +"""The privacy of a sponsorship""" +enum SponsorshipPrivacy { + """Public""" + PUBLIC + + """Private""" + PRIVATE +} + +"""A GitHub Sponsors listing.""" +type SponsorsListing implements Node { + """Identifies the date and time when the object was created.""" + createdAt: DateTime! + + """The full description of the listing.""" + fullDescription: String! + + """The full description of the listing rendered to HTML.""" + fullDescriptionHTML: HTML! + id: ID! + + """The listing's full name.""" + name: String! + + """The short description of the listing.""" + shortDescription: String! + + """The short name of the listing.""" + slug: String! + + """The published tiers for this GitHub Sponsors listing.""" + tiers( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + + """Ordering options for Sponsors tiers returned from the connection.""" + orderBy: SponsorsTierOrder = {field: MONTHLY_PRICE_IN_CENTS, direction: ASC} + ): SponsorsTierConnection +} + +"""A GitHub Sponsors tier associated with a GitHub Sponsors listing.""" +type SponsorsTier implements Node { + """ + SponsorsTier information only visible to users that can administer the associated Sponsors listing. + """ + adminInfo: SponsorsTierAdminInfo + + """Identifies the date and time when the object was created.""" + createdAt: DateTime! + + """The description of the tier.""" + description: String! + + """The tier description rendered to HTML""" + descriptionHTML: HTML! + id: ID! + + """How much this tier costs per month in cents.""" + monthlyPriceInCents: Int! + + """How much this tier costs per month in dollars.""" + monthlyPriceInDollars: Int! + + """The name of the tier.""" + name: String! + + """The sponsors listing that this tier belongs to.""" + sponsorsListing: SponsorsListing! + + """Identifies the date and time when the object was last updated.""" + updatedAt: DateTime! +} + +""" +SponsorsTier information only visible to users that can administer the associated Sponsors listing. +""" +type SponsorsTierAdminInfo { + """The sponsorships associated with this tier.""" + sponsorships( """Returns the elements in the list that come after the specified cursor.""" after: String @@ -16658,6 +20471,9 @@ interface Sponsorable { """Returns the last _n_ elements from the list.""" last: Int + """Whether or not to include private sponsorships in the result set""" + includePrivate: Boolean = false + """ Ordering options for sponsorships returned from this connection. If left blank, the sponsorships will be ordered based on relevancy to the viewer. @@ -16666,40 +20482,13 @@ interface Sponsorable { ): SponsorshipConnection! } -"""Represents a sponsor.""" -type SponsorEdge { - """A cursor for use in pagination.""" - cursor: String! - - """The item at the end of the edge.""" - node: User -} - -"""A sponsorship relationship between a sponsor and a maintainer""" -type Sponsorship implements Node { - """Identifies the date and time when the object was created.""" - createdAt: DateTime! - id: ID! - - """The entity that is being sponsored""" - maintainer: User! - - """The privacy level for this sponsorship.""" - privacyLevel: SponsorshipPrivacy! - - """ - The entity that is sponsoring. Returns null if the sponsorship is private - """ - sponsor: User -} - -"""The connection type for Sponsorship.""" -type SponsorshipConnection { +"""The connection type for SponsorsTier.""" +type SponsorsTierConnection { """A list of edges.""" - edges: [SponsorshipEdge] + edges: [SponsorsTierEdge] """A list of nodes.""" - nodes: [Sponsorship] + nodes: [SponsorsTier] """Information to aid in pagination.""" pageInfo: PageInfo! @@ -16709,40 +20498,30 @@ type SponsorshipConnection { } """An edge in a connection.""" -type SponsorshipEdge { +type SponsorsTierEdge { """A cursor for use in pagination.""" cursor: String! """The item at the end of the edge.""" - node: Sponsorship + node: SponsorsTier } -"""Ordering options for sponsorship connections.""" -input SponsorshipOrder { +"""Ordering options for Sponsors tiers connections.""" +input SponsorsTierOrder { + """The field to order tiers by.""" + field: SponsorsTierOrderField! + """The ordering direction.""" direction: OrderDirection! } -"""The privacy of a sponsorship""" -enum SponsorshipPrivacy { - """Public""" - PUBLIC - - """Private""" - PRIVATE -} - -"""A GitHub Sponsors listing.""" -type SponsorsListing implements Node { - """The full description of the listing.""" - fullDescription: String! - id: ID! - - """The short description of the listing.""" - shortDescription: String! +"""Properties by which Sponsors tiers connections can be ordered.""" +enum SponsorsTierOrderField { + """Order tiers by creation time.""" + CREATED_AT - """The short name of the listing.""" - slug: String! + """Order tiers by their monthly price in cents""" + MONTHLY_PRICE_IN_CENTS } """The connection type for User.""" @@ -16789,6 +20568,12 @@ enum StarOrderField { interface Starrable { id: ID! + """ + Returns a count of how many stargazers there are on this object + + """ + stargazerCount: Int! + """A list of users who have starred this starrable.""" stargazers( """Returns the elements in the list that come after the specified cursor.""" @@ -16820,6 +20605,11 @@ type StarredRepositoryConnection { """A list of edges.""" edges: [StarredRepositoryEdge] + """ + Is the list of stars for this user truncated? This is true for users that have many stars. + """ + isOverLimit: Boolean! + """A list of nodes.""" nodes: [Repository] @@ -16840,18 +20630,25 @@ type StarredRepositoryEdge { starredAt: DateTime! } -"""Represents a starred topic.""" -type StarredTopicEdge { - """A cursor for use in pagination.""" - cursor: String! - node: Topic! - - """Identifies when the item was starred.""" - starredAt: DateTime! -} - """Represents a commit status.""" type Status implements Node { + """A list of status contexts and check runs for this commit.""" + combinedContexts( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + ): StatusCheckRollupContextConnection! + """The commit this status is attached to.""" commit: Commit @@ -16869,6 +20666,60 @@ type Status implements Node { state: StatusState! } +"""Represents the rollup for both the check runs and status for a commit.""" +type StatusCheckRollup implements Node { + """The commit the status and check runs are attached to.""" + commit: Commit + + """A list of status contexts and check runs for this commit.""" + contexts( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + ): StatusCheckRollupContextConnection! + id: ID! + + """The combined status for the commit.""" + state: StatusState! +} + +"""Types that can be inside a StatusCheckRollup context.""" +union StatusCheckRollupContext = CheckRun | StatusContext + +"""The connection type for StatusCheckRollupContext.""" +type StatusCheckRollupContextConnection { + """A list of edges.""" + edges: [StatusCheckRollupContextEdge] + + """A list of nodes.""" + nodes: [StatusCheckRollupContext] + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """Identifies the total count of items in the connection.""" + totalCount: Int! +} + +"""An edge in a connection.""" +type StatusCheckRollupContextEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of the edge.""" + node: StatusCheckRollupContext +} + """Represents an individual commit status context""" type StatusContext implements Node { """ @@ -16922,8 +20773,11 @@ enum StatusState { """Autogenerated input type of SubmitPullRequestReview""" input SubmitPullRequestReviewInput { + """The Pull Request ID to submit any pending reviews.""" + pullRequestId: ID + """The Pull Request Review ID to submit.""" - pullRequestReviewId: ID! + pullRequestReviewId: ID """The event to send to the Pull Request Review.""" event: PullRequestReviewEvent! @@ -16944,6 +20798,52 @@ type SubmitPullRequestReviewPayload { pullRequestReview: PullRequestReview } +""" +A pointer to a repository at a specific revision embedded inside another repository. +""" +type Submodule { + """The branch of the upstream submodule for tracking updates""" + branch: String + + """The git URL of the submodule repository""" + gitUrl: URI! + + """The name of the submodule in .gitmodules""" + name: String! + + """The path in the superproject that this submodule is located in""" + path: String! + + """ + The commit revision of the subproject repository being tracked by the submodule + """ + subprojectCommitOid: GitObjectID +} + +"""The connection type for Submodule.""" +type SubmoduleConnection { + """A list of edges.""" + edges: [SubmoduleEdge] + + """A list of nodes.""" + nodes: [Submodule] + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """Identifies the total count of items in the connection.""" + totalCount: Int! +} + +"""An edge in a connection.""" +type SubmoduleEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of the edge.""" + node: Submodule +} + """Entities that can be subscribed to for web and email notifications.""" interface Subscribable { id: ID! @@ -17086,9 +20986,49 @@ type Team implements Node & Subscribable & MemberStatusable { """Identifies the date and time when the object was created.""" createdAt: DateTime! + """Identifies the primary key from the database.""" + databaseId: Int + """The description of the team.""" description: String + """Find a team discussion by its number.""" + discussion( + """The sequence number of the discussion to find.""" + number: Int! + ): TeamDiscussion + + """A list of team discussions.""" + discussions( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + + """ + If provided, filters discussions according to whether or not they are pinned. + """ + isPinned: Boolean + + """Order for connection""" + orderBy: TeamDiscussionOrder + ): TeamDiscussionConnection! + + """The HTTP path for team discussions""" + discussionsResourcePath: URI! + + """The HTTP URL for team discussions""" + discussionsUrl: URI! + """The HTTP path for editing this team""" editTeamResourcePath: URI! @@ -17132,7 +21072,7 @@ type Team implements Node & Subscribable & MemberStatusable { last: Int """Ordering options for user statuses returned from the connection.""" - orderBy: UserStatusOrder + orderBy: UserStatusOrder = {field: UPDATED_AT, direction: DESC} ): UserStatusConnection! """A list of users who are members of this team.""" @@ -17249,8 +21189,80 @@ type Team implements Node & Subscribable & MemberStatusable { viewerSubscription: SubscriptionState } -"""Audit log entry for a team.add_member event.""" -type TeamAddMemberAuditEntry implements Node & AuditEntry & OrganizationAuditEntryData & TeamAuditEntryData { +"""Audit log entry for a team.add_member event.""" +type TeamAddMemberAuditEntry implements Node & AuditEntry & OrganizationAuditEntryData & TeamAuditEntryData { + """The action name""" + action: String! + + """The user who initiated the action""" + actor: AuditEntryActor + + """The IP address of the actor""" + actorIp: String + + """A readable representation of the actor's location""" + actorLocation: ActorLocation + + """The username of the user who initiated the action""" + actorLogin: String + + """The HTTP path for the actor.""" + actorResourcePath: URI + + """The HTTP URL for the actor.""" + actorUrl: URI + + """The time the action was initiated""" + createdAt: PreciseDateTime! + id: ID! + + """Whether the team was mapped to an LDAP Group.""" + isLdapMapped: Boolean + + """The corresponding operation type for the action""" + operationType: OperationType + + """The Organization associated with the Audit Entry.""" + organization: Organization + + """The name of the Organization.""" + organizationName: String + + """The HTTP path for the organization""" + organizationResourcePath: URI + + """The HTTP URL for the organization""" + organizationUrl: URI + + """The team associated with the action""" + team: Team + + """The name of the team""" + teamName: String + + """The HTTP path for this team""" + teamResourcePath: URI + + """The HTTP URL for this team""" + teamUrl: URI + + """The user affected by the action""" + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """The HTTP path for the user.""" + userResourcePath: URI + + """The HTTP URL for the user.""" + userUrl: URI +} + +"""Audit log entry for a team.add_repository event.""" +type TeamAddRepositoryAuditEntry implements Node & AuditEntry & OrganizationAuditEntryData & RepositoryAuditEntryData & TeamAuditEntryData { """The action name""" action: String! @@ -17279,6 +21291,9 @@ type TeamAddMemberAuditEntry implements Node & AuditEntry & OrganizationAuditEnt """Whether the team was mapped to an LDAP Group.""" isLdapMapped: Boolean + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -17291,6 +21306,18 @@ type TeamAddMemberAuditEntry implements Node & AuditEntry & OrganizationAuditEnt """The HTTP URL for the organization""" organizationUrl: URI + """The repository associated with the action""" + repository: Repository + + """The name of the repository""" + repositoryName: String + + """The HTTP path for the repository""" + repositoryResourcePath: URI + + """The HTTP URL for the repository""" + repositoryUrl: URI + """The team associated with the action""" team: Team @@ -17318,8 +21345,23 @@ type TeamAddMemberAuditEntry implements Node & AuditEntry & OrganizationAuditEnt userUrl: URI } -"""Audit log entry for a team.add_repository event.""" -type TeamAddRepositoryAuditEntry implements Node & AuditEntry & OrganizationAuditEntryData & RepositoryAuditEntryData & TeamAuditEntryData { +"""Metadata for an audit entry with action team.*""" +interface TeamAuditEntryData { + """The team associated with the action""" + team: Team + + """The name of the team""" + teamName: String + + """The HTTP path for this team""" + teamResourcePath: URI + + """The HTTP URL for this team""" + teamUrl: URI +} + +"""Audit log entry for a team.change_parent_team event.""" +type TeamChangeParentTeamAuditEntry implements Node & AuditEntry & OrganizationAuditEntryData & TeamAuditEntryData { """The action name""" action: String! @@ -17348,172 +21390,428 @@ type TeamAddRepositoryAuditEntry implements Node & AuditEntry & OrganizationAudi """Whether the team was mapped to an LDAP Group.""" isLdapMapped: Boolean + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization - """The name of the Organization.""" - organizationName: String + """The name of the Organization.""" + organizationName: String + + """The HTTP path for the organization""" + organizationResourcePath: URI + + """The HTTP URL for the organization""" + organizationUrl: URI + + """The new parent team.""" + parentTeam: Team + + """The name of the new parent team""" + parentTeamName: String + + """The name of the former parent team""" + parentTeamNameWas: String + + """The HTTP path for the parent team""" + parentTeamResourcePath: URI + + """The HTTP URL for the parent team""" + parentTeamUrl: URI + + """The former parent team.""" + parentTeamWas: Team + + """The HTTP path for the previous parent team""" + parentTeamWasResourcePath: URI + + """The HTTP URL for the previous parent team""" + parentTeamWasUrl: URI + + """The team associated with the action""" + team: Team + + """The name of the team""" + teamName: String + + """The HTTP path for this team""" + teamResourcePath: URI + + """The HTTP URL for this team""" + teamUrl: URI + + """The user affected by the action""" + user: User + + """ + For actions involving two users, the actor is the initiator and the user is the affected user. + """ + userLogin: String + + """The HTTP path for the user.""" + userResourcePath: URI + + """The HTTP URL for the user.""" + userUrl: URI +} + +"""The connection type for Team.""" +type TeamConnection { + """A list of edges.""" + edges: [TeamEdge] + + """A list of nodes.""" + nodes: [Team] + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """Identifies the total count of items in the connection.""" + totalCount: Int! +} + +"""A team discussion.""" +type TeamDiscussion implements Node & Comment & Deletable & Reactable & Subscribable & UniformResourceLocatable & Updatable & UpdatableComment { + """The actor who authored the comment.""" + author: Actor + + """Author's association with the discussion's team.""" + authorAssociation: CommentAuthorAssociation! + + """The body as Markdown.""" + body: String! + + """The body rendered to HTML.""" + bodyHTML: HTML! + + """The body rendered to text.""" + bodyText: String! + + """Identifies the discussion body hash.""" + bodyVersion: String! + + """A list of comments on this discussion.""" + comments( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + + """Order for connection""" + orderBy: TeamDiscussionCommentOrder + + """ + When provided, filters the connection such that results begin with the comment with this number. + """ + fromComment: Int + ): TeamDiscussionCommentConnection! + + """The HTTP path for discussion comments""" + commentsResourcePath: URI! + + """The HTTP URL for discussion comments""" + commentsUrl: URI! + + """Identifies the date and time when the object was created.""" + createdAt: DateTime! + + """Check if this comment was created via an email reply.""" + createdViaEmail: Boolean! + + """Identifies the primary key from the database.""" + databaseId: Int + + """The actor who edited the comment.""" + editor: Actor + id: ID! + + """ + Check if this comment was edited and includes an edit with the creation data + """ + includesCreatedEdit: Boolean! + + """Whether or not the discussion is pinned.""" + isPinned: Boolean! + + """ + Whether or not the discussion is only visible to team members and org admins. + """ + isPrivate: Boolean! + + """The moment the editor made the last edit""" + lastEditedAt: DateTime + + """Identifies the discussion within its team.""" + number: Int! + + """Identifies when the comment was published at.""" + publishedAt: DateTime + + """A list of reactions grouped by content left on the subject.""" + reactionGroups: [ReactionGroup!] + + """A list of Reactions left on the Issue.""" + reactions( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + + """Allows filtering Reactions by emoji.""" + content: ReactionContent + + """Allows specifying the order in which reactions are returned.""" + orderBy: ReactionOrder + ): ReactionConnection! + + """The HTTP path for this discussion""" + resourcePath: URI! + + """The team that defines the context of this discussion.""" + team: Team! + + """The title of the discussion""" + title: String! + + """Identifies the date and time when the object was last updated.""" + updatedAt: DateTime! + + """The HTTP URL for this discussion""" + url: URI! + + """A list of edits to this content.""" + userContentEdits( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + ): UserContentEditConnection + + """Check if the current viewer can delete this object.""" + viewerCanDelete: Boolean! + + """Whether or not the current viewer can pin this discussion.""" + viewerCanPin: Boolean! + + """Can user react to this subject""" + viewerCanReact: Boolean! + + """ + Check if the viewer is able to change their subscription status for the repository. + """ + viewerCanSubscribe: Boolean! + + """Check if the current viewer can update this object.""" + viewerCanUpdate: Boolean! + + """Reasons why the current viewer can not update this comment.""" + viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! + + """Did the viewer author this comment.""" + viewerDidAuthor: Boolean! + + """ + Identifies if the viewer is watching, not watching, or ignoring the subscribable entity. + """ + viewerSubscription: SubscriptionState +} - """The HTTP path for the organization""" - organizationResourcePath: URI +"""A comment on a team discussion.""" +type TeamDiscussionComment implements Node & Comment & Deletable & Reactable & UniformResourceLocatable & Updatable & UpdatableComment { + """The actor who authored the comment.""" + author: Actor - """The HTTP URL for the organization""" - organizationUrl: URI + """Author's association with the comment's team.""" + authorAssociation: CommentAuthorAssociation! - """The repository associated with the action""" - repository: Repository + """The body as Markdown.""" + body: String! - """The name of the repository""" - repositoryName: String + """The body rendered to HTML.""" + bodyHTML: HTML! - """The HTTP path for the repository""" - repositoryResourcePath: URI + """The body rendered to text.""" + bodyText: String! - """The HTTP URL for the repository""" - repositoryUrl: URI + """The current version of the body content.""" + bodyVersion: String! - """The team associated with the action""" - team: Team + """Identifies the date and time when the object was created.""" + createdAt: DateTime! - """The name of the team""" - teamName: String + """Check if this comment was created via an email reply.""" + createdViaEmail: Boolean! - """The HTTP path for this team""" - teamResourcePath: URI + """Identifies the primary key from the database.""" + databaseId: Int - """The HTTP URL for this team""" - teamUrl: URI + """The discussion this comment is about.""" + discussion: TeamDiscussion! - """The user affected by the action""" - user: User + """The actor who edited the comment.""" + editor: Actor + id: ID! """ - For actions involving two users, the actor is the initiator and the user is the affected user. + Check if this comment was edited and includes an edit with the creation data """ - userLogin: String - - """The HTTP path for the user.""" - userResourcePath: URI - - """The HTTP URL for the user.""" - userUrl: URI -} + includesCreatedEdit: Boolean! -"""Metadata for an audit entry with action team.*""" -interface TeamAuditEntryData { - """The team associated with the action""" - team: Team + """The moment the editor made the last edit""" + lastEditedAt: DateTime - """The name of the team""" - teamName: String + """Identifies the comment number.""" + number: Int! - """The HTTP path for this team""" - teamResourcePath: URI + """Identifies when the comment was published at.""" + publishedAt: DateTime - """The HTTP URL for this team""" - teamUrl: URI -} + """A list of reactions grouped by content left on the subject.""" + reactionGroups: [ReactionGroup!] -"""Audit log entry for a team.change_parent_team event.""" -type TeamChangeParentTeamAuditEntry implements Node & AuditEntry & OrganizationAuditEntryData & TeamAuditEntryData { - """The action name""" - action: String! + """A list of Reactions left on the Issue.""" + reactions( + """Returns the elements in the list that come after the specified cursor.""" + after: String - """The user who initiated the action""" - actor: AuditEntryActor + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String - """The IP address of the actor""" - actorIp: String + """Returns the first _n_ elements from the list.""" + first: Int - """A readable representation of the actor's location""" - actorLocation: ActorLocation + """Returns the last _n_ elements from the list.""" + last: Int - """The username of the user who initiated the action""" - actorLogin: String + """Allows filtering Reactions by emoji.""" + content: ReactionContent - """The HTTP path for the actor.""" - actorResourcePath: URI + """Allows specifying the order in which reactions are returned.""" + orderBy: ReactionOrder + ): ReactionConnection! - """The HTTP URL for the actor.""" - actorUrl: URI + """The HTTP path for this comment""" + resourcePath: URI! - """The time the action was initiated""" - createdAt: PreciseDateTime! - id: ID! + """Identifies the date and time when the object was last updated.""" + updatedAt: DateTime! - """Whether the team was mapped to an LDAP Group.""" - isLdapMapped: Boolean + """The HTTP URL for this comment""" + url: URI! - """The Organization associated with the Audit Entry.""" - organization: Organization + """A list of edits to this content.""" + userContentEdits( + """Returns the elements in the list that come after the specified cursor.""" + after: String - """The name of the Organization.""" - organizationName: String + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String - """The HTTP path for the organization""" - organizationResourcePath: URI + """Returns the first _n_ elements from the list.""" + first: Int - """The HTTP URL for the organization""" - organizationUrl: URI + """Returns the last _n_ elements from the list.""" + last: Int + ): UserContentEditConnection - """The new parent team.""" - parentTeam: Team + """Check if the current viewer can delete this object.""" + viewerCanDelete: Boolean! - """The name of the new parent team""" - parentTeamName: String + """Can user react to this subject""" + viewerCanReact: Boolean! - """The name of the former parent team""" - parentTeamNameWas: String + """Check if the current viewer can update this object.""" + viewerCanUpdate: Boolean! - """The HTTP path for the parent team""" - parentTeamResourcePath: URI + """Reasons why the current viewer can not update this comment.""" + viewerCannotUpdateReasons: [CommentCannotUpdateReason!]! - """The HTTP URL for the parent team""" - parentTeamUrl: URI + """Did the viewer author this comment.""" + viewerDidAuthor: Boolean! +} - """The former parent team.""" - parentTeamWas: Team +"""The connection type for TeamDiscussionComment.""" +type TeamDiscussionCommentConnection { + """A list of edges.""" + edges: [TeamDiscussionCommentEdge] - """The HTTP path for the previous parent team""" - parentTeamWasResourcePath: URI + """A list of nodes.""" + nodes: [TeamDiscussionComment] - """The HTTP URL for the previous parent team""" - parentTeamWasUrl: URI + """Information to aid in pagination.""" + pageInfo: PageInfo! - """The team associated with the action""" - team: Team + """Identifies the total count of items in the connection.""" + totalCount: Int! +} - """The name of the team""" - teamName: String +"""An edge in a connection.""" +type TeamDiscussionCommentEdge { + """A cursor for use in pagination.""" + cursor: String! - """The HTTP path for this team""" - teamResourcePath: URI + """The item at the end of the edge.""" + node: TeamDiscussionComment +} - """The HTTP URL for this team""" - teamUrl: URI +"""Ways in which team discussion comment connections can be ordered.""" +input TeamDiscussionCommentOrder { + """The field by which to order nodes.""" + field: TeamDiscussionCommentOrderField! - """The user affected by the action""" - user: User + """The direction in which to order nodes.""" + direction: OrderDirection! +} +""" +Properties by which team discussion comment connections can be ordered. +""" +enum TeamDiscussionCommentOrderField { """ - For actions involving two users, the actor is the initiator and the user is the affected user. + Allows sequential ordering of team discussion comments (which is equivalent to chronological ordering). """ - userLogin: String - - """The HTTP path for the user.""" - userResourcePath: URI - - """The HTTP URL for the user.""" - userUrl: URI + NUMBER } -"""The connection type for Team.""" -type TeamConnection { +"""The connection type for TeamDiscussion.""" +type TeamDiscussionConnection { """A list of edges.""" - edges: [TeamEdge] + edges: [TeamDiscussionEdge] """A list of nodes.""" - nodes: [Team] + nodes: [TeamDiscussion] """Information to aid in pagination.""" pageInfo: PageInfo! @@ -17523,16 +21821,31 @@ type TeamConnection { } """An edge in a connection.""" -type TeamEdge { +type TeamDiscussionEdge { """A cursor for use in pagination.""" cursor: String! """The item at the end of the edge.""" - node: Team + node: TeamDiscussion +} + +"""Ways in which team discussion connections can be ordered.""" +input TeamDiscussionOrder { + """The field by which to order nodes.""" + field: TeamDiscussionOrderField! + + """The direction in which to order nodes.""" + direction: OrderDirection! +} + +"""Properties by which team discussion connections can be ordered.""" +enum TeamDiscussionOrderField { + """Allows chronological ordering of team discussions.""" + CREATED_AT } -"""Represents a team's eligibility to be a child team of another""" -type TeamEligibilityEdge { +"""An edge in a connection.""" +type TeamEdge { """A cursor for use in pagination.""" cursor: String! @@ -17638,24 +21951,6 @@ enum TeamPrivacy { VISIBLE } -"""Represents a connection between a team (parent) and a project (child).""" -type TeamProjectEdge { - """A cursor for use in pagination.""" - cursor: String! - - """The parent team that grants inherited permission to this project""" - inheritedPermissionOrigin: Team - - """The item at the end of the edge.""" - node: Project - - """The HTTP path for this team's project""" - teamProjectResourcePath: URI! - - """The HTTP URL for this team's project""" - teamProjectUrl: URI! -} - """Audit log entry for a team.remove_member event.""" type TeamRemoveMemberAuditEntry implements Node & AuditEntry & OrganizationAuditEntryData & TeamAuditEntryData { """The action name""" @@ -17686,6 +21981,9 @@ type TeamRemoveMemberAuditEntry implements Node & AuditEntry & OrganizationAudit """Whether the team was mapped to an LDAP Group.""" isLdapMapped: Boolean + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -17755,6 +22053,9 @@ type TeamRemoveRepositoryAuditEntry implements Node & AuditEntry & OrganizationA """Whether the team was mapped to an LDAP Group.""" isLdapMapped: Boolean + """The corresponding operation type for the action""" + operationType: OperationType + """The Organization associated with the Audit Entry.""" organization: Organization @@ -17911,6 +22212,12 @@ type Topic implements Node & Starrable { first: Int = 3 ): [Topic!]! + """ + Returns a count of how many stargazers there are on this object + + """ + stargazerCount: Int! + """A list of users who have starred this starrable.""" stargazers( """Returns the elements in the list that come after the specified cursor.""" @@ -17946,30 +22253,6 @@ interface TopicAuditEntryData { topicName: String } -"""The connection type for Topic.""" -type TopicConnection { - """A list of edges.""" - edges: [TopicEdge] - - """A list of nodes.""" - nodes: [Topic] - - """Information to aid in pagination.""" - pageInfo: PageInfo! - - """Identifies the total count of items in the connection.""" - totalCount: Int! -} - -"""An edge in a connection.""" -type TopicEdge { - """A cursor for use in pagination.""" - cursor: String! - - """The item at the end of the edge.""" - node: Topic -} - """Reason that the suggested topic is declined.""" enum TopicSuggestionDeclineReason { """The suggested topic is not relevant to the repository.""" @@ -17989,10 +22272,10 @@ enum TopicSuggestionDeclineReason { """Autogenerated input type of TransferIssue""" input TransferIssueInput { - """The ID of the issue to be transferred""" + """The Node ID of the issue to be transferred""" issueId: ID! - """The ID of the repository the issue should be transferred to""" + """The Node ID of the repository the issue should be transferred to""" repositoryId: ID! """A unique identifier for the client performing the mutation.""" @@ -18048,6 +22331,12 @@ type Tree implements Node & GitObject { """Represents a Git tree entry.""" type TreeEntry { + """The extension of the file""" + extension: String + + """Whether or not this tree entry is generated""" + isGenerated: Boolean! + """Entry file mode.""" mode: Int! @@ -18060,13 +22349,39 @@ type TreeEntry { """Entry file Git object ID.""" oid: GitObjectID! + """The full path of the file.""" + path: String + """The Repository the tree entry belongs to""" repository: Repository! + """ + If the TreeEntry is for a directory occupied by a submodule project, this returns the corresponding submodule + """ + submodule: Submodule + """Entry file type.""" type: String! } +"""Autogenerated input type of UnarchiveRepository""" +input UnarchiveRepositoryInput { + """The ID of the repository to unarchive.""" + repositoryId: ID! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of UnarchiveRepository""" +type UnarchiveRepositoryPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The repository that was unarchived.""" + repository: Repository +} + """Represents an 'unassigned' event on any assignable object.""" type UnassignedEvent implements Node { """Identifies the actor who performed the event.""" @@ -18083,6 +22398,24 @@ type UnassignedEvent implements Node { id: ID! } +"""Autogenerated input type of UnfollowUser""" +input UnfollowUserInput { + """ID of the user to unfollow.""" + userId: ID! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of UnfollowUser""" +type UnfollowUserPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The user that was unfollowed.""" + user: User +} + """Represents a type that can be retrieved by a URL.""" interface UniformResourceLocatable { """The HTML path to this resource.""" @@ -18176,7 +22509,7 @@ type UnlockedEvent implements Node { """Autogenerated input type of UnlockLockable""" input UnlockLockableInput { - """ID of the issue or pull request to be unlocked.""" + """ID of the item to be unlocked.""" lockableId: ID! """A unique identifier for the client performing the mutation.""" @@ -18185,6 +22518,9 @@ input UnlockLockableInput { """Autogenerated return type of UnlockLockable""" type UnlockLockablePayload { + """Identifies the actor who performed the event.""" + actor: Actor + """A unique identifier for the client performing the mutation.""" clientMutationId: String @@ -18192,6 +22528,52 @@ type UnlockLockablePayload { unlockedRecord: Lockable } +""" +Represents an 'unmarked_as_duplicate' event on a given issue or pull request. +""" +type UnmarkedAsDuplicateEvent implements Node { + """Identifies the actor who performed the event.""" + actor: Actor + + """ + The authoritative issue or pull request which has been duplicated by another. + """ + canonical: IssueOrPullRequest + + """Identifies the date and time when the object was created.""" + createdAt: DateTime! + + """ + The issue or pull request which has been marked as a duplicate of another. + """ + duplicate: IssueOrPullRequest + id: ID! + + """Canonical and duplicate belong to different repositories.""" + isCrossRepository: Boolean! +} + +"""Autogenerated input type of UnmarkFileAsViewed""" +input UnmarkFileAsViewedInput { + """The Node ID of the pull request.""" + pullRequestId: ID! + + """The path of the file to mark as unviewed""" + path: String! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of UnmarkFileAsViewed""" +type UnmarkFileAsViewedPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The updated pull request.""" + pullRequest: PullRequest +} + """Autogenerated input type of UnmarkIssueAsDuplicate""" input UnmarkIssueAsDuplicateInput { """ID of the issue or pull request currently marked as a duplicate.""" @@ -18224,13 +22606,13 @@ input UnminimizeCommentInput { clientMutationId: String } -"""Autogenerated input type of UnpinIssue""" -input UnpinIssueInput { - """The ID of the issue to be unpinned""" - issueId: ID! - +"""Autogenerated return type of UnminimizeComment""" +type UnminimizeCommentPayload { """A unique identifier for the client performing the mutation.""" clientMutationId: String + + """The comment that was unminimized.""" + unminimizedComment: Minimizable } """Represents an 'unpinned' event on a given issue or pull request.""" @@ -18306,6 +22688,15 @@ input UpdateBranchProtectionRuleInput { """Are commits required to be signed.""" requiresCommitSignatures: Boolean + """Are merge commits prohibited from being pushed to this branch.""" + requiresLinearHistory: Boolean + + """Are force pushes allowed on this branch.""" + allowsForcePushes: Boolean + + """Can this branch be deleted.""" + allowsDeletions: Boolean + """Can admins overwrite branch protection.""" isAdminEnforced: Boolean @@ -18334,7 +22725,7 @@ input UpdateBranchProtectionRuleInput { """Is pushing to matching branches restricted.""" restrictsPushes: Boolean - """A list of User or Team IDs allowed to push to matching branches.""" + """A list of User, Team or App IDs allowed to push to matching branches.""" pushActorIds: [ID!] """ @@ -18428,19 +22819,6 @@ type UpdateCheckSuitePreferencesPayload { repository: Repository } -""" -Autogenerated input type of UpdateEnterpriseActionExecutionCapabilitySetting -""" -input UpdateEnterpriseActionExecutionCapabilitySettingInput { - """ - The ID of the enterprise on which to set the members can create repositories setting. - """ - enterpriseId: ID! - - """A unique identifier for the client performing the mutation.""" - clientMutationId: String -} - """Autogenerated input type of UpdateEnterpriseAdministratorRole""" input UpdateEnterpriseAdministratorRoleInput { """The ID of the Enterprise which the admin belongs to.""" @@ -18449,8 +22827,20 @@ input UpdateEnterpriseAdministratorRoleInput { """The login of a administrator whose role is being changed.""" login: String! + """The new role for the Enterprise administrator.""" + role: EnterpriseAdministratorRole! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of UpdateEnterpriseAdministratorRole""" +type UpdateEnterpriseAdministratorRolePayload { """A unique identifier for the client performing the mutation.""" clientMutationId: String + + """A message confirming the result of changing the administrator's role.""" + message: String } """ @@ -18462,8 +22852,31 @@ input UpdateEnterpriseAllowPrivateRepositoryForkingSettingInput { """ enterpriseId: ID! + """ + The value for the allow private repository forking setting on the enterprise. + """ + settingValue: EnterpriseEnabledDisabledSettingValue! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +""" +Autogenerated return type of UpdateEnterpriseAllowPrivateRepositoryForkingSetting +""" +type UpdateEnterpriseAllowPrivateRepositoryForkingSettingPayload { """A unique identifier for the client performing the mutation.""" clientMutationId: String + + """ + The enterprise with the updated allow private repository forking setting. + """ + enterprise: Enterprise + + """ + A message confirming the result of updating the allow private repository forking setting. + """ + message: String } """ @@ -18475,8 +22888,29 @@ input UpdateEnterpriseDefaultRepositoryPermissionSettingInput { """ enterpriseId: ID! + """ + The value for the default repository permission setting on the enterprise. + """ + settingValue: EnterpriseDefaultRepositoryPermissionSettingValue! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +""" +Autogenerated return type of UpdateEnterpriseDefaultRepositoryPermissionSetting +""" +type UpdateEnterpriseDefaultRepositoryPermissionSettingPayload { """A unique identifier for the client performing the mutation.""" clientMutationId: String + + """The enterprise with the updated default repository permission setting.""" + enterprise: Enterprise + + """ + A message confirming the result of updating the default repository permission setting. + """ + message: String } """ @@ -18488,8 +22922,31 @@ input UpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingInput { """ enterpriseId: ID! + """ + The value for the members can change repository visibility setting on the enterprise. + """ + settingValue: EnterpriseEnabledDisabledSettingValue! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +""" +Autogenerated return type of UpdateEnterpriseMembersCanChangeRepositoryVisibilitySetting +""" +type UpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingPayload { """A unique identifier for the client performing the mutation.""" clientMutationId: String + + """ + The enterprise with the updated members can change repository visibility setting. + """ + enterprise: Enterprise + + """ + A message confirming the result of updating the members can change repository visibility setting. + """ + message: String } """ @@ -18501,8 +22958,52 @@ input UpdateEnterpriseMembersCanCreateRepositoriesSettingInput { """ enterpriseId: ID! + """ + Value for the members can create repositories setting on the enterprise. This + or the granular public/private/internal allowed fields (but not both) must be provided. + """ + settingValue: EnterpriseMembersCanCreateRepositoriesSettingValue + + """ + When false, allow member organizations to set their own repository creation member privileges. + """ + membersCanCreateRepositoriesPolicyEnabled: Boolean + + """ + Allow members to create public repositories. Defaults to current value. + """ + membersCanCreatePublicRepositories: Boolean + + """ + Allow members to create private repositories. Defaults to current value. + """ + membersCanCreatePrivateRepositories: Boolean + + """ + Allow members to create internal repositories. Defaults to current value. + """ + membersCanCreateInternalRepositories: Boolean + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +""" +Autogenerated return type of UpdateEnterpriseMembersCanCreateRepositoriesSetting +""" +type UpdateEnterpriseMembersCanCreateRepositoriesSettingPayload { """A unique identifier for the client performing the mutation.""" clientMutationId: String + + """ + The enterprise with the updated members can create repositories setting. + """ + enterprise: Enterprise + + """ + A message confirming the result of updating the members can create repositories setting. + """ + message: String } """ @@ -18514,8 +23015,27 @@ input UpdateEnterpriseMembersCanDeleteIssuesSettingInput { """ enterpriseId: ID! + """The value for the members can delete issues setting on the enterprise.""" + settingValue: EnterpriseEnabledDisabledSettingValue! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +""" +Autogenerated return type of UpdateEnterpriseMembersCanDeleteIssuesSetting +""" +type UpdateEnterpriseMembersCanDeleteIssuesSettingPayload { """A unique identifier for the client performing the mutation.""" clientMutationId: String + + """The enterprise with the updated members can delete issues setting.""" + enterprise: Enterprise + + """ + A message confirming the result of updating the members can delete issues setting. + """ + message: String } """ @@ -18527,8 +23047,31 @@ input UpdateEnterpriseMembersCanDeleteRepositoriesSettingInput { """ enterpriseId: ID! + """ + The value for the members can delete repositories setting on the enterprise. + """ + settingValue: EnterpriseEnabledDisabledSettingValue! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +""" +Autogenerated return type of UpdateEnterpriseMembersCanDeleteRepositoriesSetting +""" +type UpdateEnterpriseMembersCanDeleteRepositoriesSettingPayload { """A unique identifier for the client performing the mutation.""" clientMutationId: String + + """ + The enterprise with the updated members can delete repositories setting. + """ + enterprise: Enterprise + + """ + A message confirming the result of updating the members can delete repositories setting. + """ + message: String } """ @@ -18540,8 +23083,31 @@ input UpdateEnterpriseMembersCanInviteCollaboratorsSettingInput { """ enterpriseId: ID! + """ + The value for the members can invite collaborators setting on the enterprise. + """ + settingValue: EnterpriseEnabledDisabledSettingValue! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +""" +Autogenerated return type of UpdateEnterpriseMembersCanInviteCollaboratorsSetting +""" +type UpdateEnterpriseMembersCanInviteCollaboratorsSettingPayload { """A unique identifier for the client performing the mutation.""" clientMutationId: String + + """ + The enterprise with the updated members can invite collaborators setting. + """ + enterprise: Enterprise + + """ + A message confirming the result of updating the members can invite collaborators setting. + """ + message: String } """ @@ -18553,8 +23119,29 @@ input UpdateEnterpriseMembersCanMakePurchasesSettingInput { """ enterpriseId: ID! + """ + The value for the members can make purchases setting on the enterprise. + """ + settingValue: EnterpriseMembersCanMakePurchasesSettingValue! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +""" +Autogenerated return type of UpdateEnterpriseMembersCanMakePurchasesSetting +""" +type UpdateEnterpriseMembersCanMakePurchasesSettingPayload { """A unique identifier for the client performing the mutation.""" clientMutationId: String + + """The enterprise with the updated members can make purchases setting.""" + enterprise: Enterprise + + """ + A message confirming the result of updating the members can make purchases setting. + """ + message: String } """ @@ -18566,8 +23153,31 @@ input UpdateEnterpriseMembersCanUpdateProtectedBranchesSettingInput { """ enterpriseId: ID! + """ + The value for the members can update protected branches setting on the enterprise. + """ + settingValue: EnterpriseEnabledDisabledSettingValue! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +""" +Autogenerated return type of UpdateEnterpriseMembersCanUpdateProtectedBranchesSetting +""" +type UpdateEnterpriseMembersCanUpdateProtectedBranchesSettingPayload { """A unique identifier for the client performing the mutation.""" clientMutationId: String + + """ + The enterprise with the updated members can update protected branches setting. + """ + enterprise: Enterprise + + """ + A message confirming the result of updating the members can update protected branches setting. + """ + message: String } """ @@ -18577,10 +23187,33 @@ input UpdateEnterpriseMembersCanViewDependencyInsightsSettingInput { """ The ID of the enterprise on which to set the members can view dependency insights setting. """ - enterpriseId: ID! + enterpriseId: ID! + + """ + The value for the members can view dependency insights setting on the enterprise. + """ + settingValue: EnterpriseEnabledDisabledSettingValue! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +""" +Autogenerated return type of UpdateEnterpriseMembersCanViewDependencyInsightsSetting +""" +type UpdateEnterpriseMembersCanViewDependencyInsightsSettingPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """ + The enterprise with the updated members can view dependency insights setting. + """ + enterprise: Enterprise - """A unique identifier for the client performing the mutation.""" - clientMutationId: String + """ + A message confirming the result of updating the members can view dependency insights setting. + """ + message: String } """ @@ -18592,8 +23225,27 @@ input UpdateEnterpriseOrganizationProjectsSettingInput { """ enterpriseId: ID! + """The value for the organization projects setting on the enterprise.""" + settingValue: EnterpriseEnabledDisabledSettingValue! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +""" +Autogenerated return type of UpdateEnterpriseOrganizationProjectsSetting +""" +type UpdateEnterpriseOrganizationProjectsSettingPayload { """A unique identifier for the client performing the mutation.""" clientMutationId: String + + """The enterprise with the updated organization projects setting.""" + enterprise: Enterprise + + """ + A message confirming the result of updating the organization projects setting. + """ + message: String } """Autogenerated input type of UpdateEnterpriseProfile""" @@ -18617,6 +23269,15 @@ input UpdateEnterpriseProfileInput { clientMutationId: String } +"""Autogenerated return type of UpdateEnterpriseProfile""" +type UpdateEnterpriseProfilePayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The updated enterprise.""" + enterprise: Enterprise +} + """Autogenerated input type of UpdateEnterpriseRepositoryProjectsSetting""" input UpdateEnterpriseRepositoryProjectsSettingInput { """ @@ -18624,17 +23285,51 @@ input UpdateEnterpriseRepositoryProjectsSettingInput { """ enterpriseId: ID! + """The value for the repository projects setting on the enterprise.""" + settingValue: EnterpriseEnabledDisabledSettingValue! + """A unique identifier for the client performing the mutation.""" clientMutationId: String } +"""Autogenerated return type of UpdateEnterpriseRepositoryProjectsSetting""" +type UpdateEnterpriseRepositoryProjectsSettingPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The enterprise with the updated repository projects setting.""" + enterprise: Enterprise + + """ + A message confirming the result of updating the repository projects setting. + """ + message: String +} + """Autogenerated input type of UpdateEnterpriseTeamDiscussionsSetting""" input UpdateEnterpriseTeamDiscussionsSettingInput { """The ID of the enterprise on which to set the team discussions setting.""" enterpriseId: ID! + """The value for the team discussions setting on the enterprise.""" + settingValue: EnterpriseEnabledDisabledSettingValue! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of UpdateEnterpriseTeamDiscussionsSetting""" +type UpdateEnterpriseTeamDiscussionsSettingPayload { """A unique identifier for the client performing the mutation.""" clientMutationId: String + + """The enterprise with the updated team discussions setting.""" + enterprise: Enterprise + + """ + A message confirming the result of updating the team discussions setting. + """ + message: String } """ @@ -18646,8 +23341,81 @@ input UpdateEnterpriseTwoFactorAuthenticationRequiredSettingInput { """ enterpriseId: ID! + """ + The value for the two factor authentication required setting on the enterprise. + """ + settingValue: EnterpriseEnabledSettingValue! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +""" +Autogenerated return type of UpdateEnterpriseTwoFactorAuthenticationRequiredSetting +""" +type UpdateEnterpriseTwoFactorAuthenticationRequiredSettingPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """ + The enterprise with the updated two factor authentication required setting. + """ + enterprise: Enterprise + + """ + A message confirming the result of updating the two factor authentication required setting. + """ + message: String +} + +"""Autogenerated input type of UpdateIpAllowListEnabledSetting""" +input UpdateIpAllowListEnabledSettingInput { + """The ID of the owner on which to set the IP allow list enabled setting.""" + ownerId: ID! + + """The value for the IP allow list enabled setting.""" + settingValue: IpAllowListEnabledSettingValue! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of UpdateIpAllowListEnabledSetting""" +type UpdateIpAllowListEnabledSettingPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The IP allow list owner on which the setting was updated.""" + owner: IpAllowListOwner +} + +"""Autogenerated input type of UpdateIpAllowListEntry""" +input UpdateIpAllowListEntryInput { + """The ID of the IP allow list entry to update.""" + ipAllowListEntryId: ID! + + """An IP address or range of addresses in CIDR notation.""" + allowListValue: String! + + """An optional name for the IP allow list entry.""" + name: String + + """ + Whether the IP allow list entry is active when an IP allow list is enabled. + """ + isActive: Boolean! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of UpdateIpAllowListEntry""" +type UpdateIpAllowListEntryPayload { """A unique identifier for the client performing the mutation.""" clientMutationId: String + + """The IP allow list entry that was updated.""" + ipAllowListEntry: IpAllowListEntry } """Autogenerated input type of UpdateIssueComment""" @@ -18703,6 +23471,9 @@ input UpdateIssueInput { """Autogenerated return type of UpdateIssue""" type UpdateIssuePayload { + """Identifies the actor who performed the event.""" + actor: Actor + """A unique identifier for the client performing the mutation.""" clientMutationId: String @@ -18803,15 +23574,33 @@ input UpdatePullRequestInput { """The contents of the pull request.""" body: String + """The target state of the pull request.""" + state: PullRequestUpdateState + """Indicates whether maintainers can modify the pull request.""" maintainerCanModify: Boolean + """An array of Node IDs of users for this pull request.""" + assigneeIds: [ID!] + + """The Node ID of the milestone for this pull request.""" + milestoneId: ID + + """An array of Node IDs of labels for this pull request.""" + labelIds: [ID!] + + """An array of Node IDs for projects associated with this pull request.""" + projectIds: [ID!] + """A unique identifier for the client performing the mutation.""" clientMutationId: String } """Autogenerated return type of UpdatePullRequest""" type UpdatePullRequestPayload { + """Identifies the actor who performed the event.""" + actor: Actor + """A unique identifier for the client performing the mutation.""" clientMutationId: String @@ -18954,6 +23743,63 @@ type UpdateSubscriptionPayload { subscribable: Subscribable } +"""Autogenerated input type of UpdateTeamDiscussionComment""" +input UpdateTeamDiscussionCommentInput { + """The ID of the comment to modify.""" + id: ID! + + """The updated text of the comment.""" + body: String! + + """The current version of the body content.""" + bodyVersion: String + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of UpdateTeamDiscussionComment""" +type UpdateTeamDiscussionCommentPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The updated comment.""" + teamDiscussionComment: TeamDiscussionComment +} + +"""Autogenerated input type of UpdateTeamDiscussion""" +input UpdateTeamDiscussionInput { + """The Node ID of the discussion to modify.""" + id: ID! + + """The updated title of the discussion.""" + title: String + + """The updated text of the discussion.""" + body: String + + """ + The current version of the body content. If provided, this update operation + will be rejected if the given version does not match the latest version on the server. + """ + bodyVersion: String + + """If provided, sets the pinned state of the updated discussion.""" + pinned: Boolean + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of UpdateTeamDiscussion""" +type UpdateTeamDiscussionPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The updated discussion.""" + teamDiscussion: TeamDiscussion +} + """Autogenerated input type of UpdateTopics""" input UpdateTopicsInput { """The Node ID of the repository.""" @@ -18984,7 +23830,7 @@ scalar URI """ A user is an individual's account on GitHub that owns repositories and can make new content. """ -type User implements Node & Actor & RegistryPackageOwner & RegistryPackageSearch & ProjectOwner & RepositoryOwner & UniformResourceLocatable & ProfileOwner & Sponsorable { +type User implements Node & Actor & PackageOwner & ProjectOwner & RepositoryOwner & UniformResourceLocatable & ProfileOwner & Sponsorable { """ Determine if this repository owner has any items that can be pinned to their profile. """ @@ -19135,8 +23981,20 @@ type User implements Node & Actor & RegistryPackageOwner & RegistryPackageSearch """Returns the last _n_ elements from the list.""" last: Int ): GistConnection! + + """True if this user/organization has a GitHub Sponsors listing.""" + hasSponsorsListing: Boolean! + + """The hovercard information for this user in a given context""" + hovercard( + """The ID of the subject to get the hovercard in the context of""" + primarySubjectId: ID + ): Hovercard! id: ID! + """The interaction ability settings for this user.""" + interactionAbility: RepositoryInteractionAbility + """ Whether or not this user is a participant in the GitHub Security Bug Bounty. """ @@ -19159,11 +24017,17 @@ type User implements Node & Actor & RegistryPackageOwner & RegistryPackageSearch """Whether or not this user is a site administrator.""" isSiteAdmin: Boolean! + """True if the viewer is sponsored by this user/organization.""" + isSponsoringViewer: Boolean! + """Whether or not this user is the viewing user.""" isViewer: Boolean! """A list of issue comments made by this user.""" issueComments( + """Ordering options for issue comments returned from the connection.""" + orderBy: IssueCommentOrder + """Returns the elements in the list that come after the specified cursor.""" after: String @@ -19229,6 +24093,14 @@ type User implements Node & Actor & RegistryPackageOwner & RegistryPackageSearch login: String! ): Organization + """ + Verified email addresses that match verified domains for a specified organization the user is a member of. + """ + organizationVerifiedDomainEmails( + """The login of the organization to match verified domains from.""" + login: String! + ): [String!]! + """A list of organizations the user belongs to.""" organizations( """Returns the elements in the list that come after the specified cursor.""" @@ -19246,6 +24118,35 @@ type User implements Node & Actor & RegistryPackageOwner & RegistryPackageSearch last: Int ): OrganizationConnection! + """A list of packages under the owner.""" + packages( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + + """Find packages by their names.""" + names: [String] + + """Find packages in a repository by ID.""" + repositoryId: ID + + """Filter registry package by type.""" + packageType: PackageType + + """Ordering of the returned packages.""" + orderBy: PackageOrder = {field: CREATED_AT, direction: DESC} + ): PackageConnection! + """ A list of repositories and gists this profile owner can pin to their profile. """ @@ -19382,64 +24283,6 @@ type User implements Node & Actor & RegistryPackageOwner & RegistryPackageSearch last: Int ): PullRequestConnection! - """A list of registry packages under the owner.""" - registryPackages( - """Returns the elements in the list that come after the specified cursor.""" - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """Returns the first _n_ elements from the list.""" - first: Int - - """Returns the last _n_ elements from the list.""" - last: Int - - """Find registry package by name.""" - name: String - - """Find registry packages by their names.""" - names: [String] - - """Find registry packages in a repository.""" - repositoryId: ID - - """Filter registry package by type.""" - packageType: RegistryPackageType - - """Filter registry package by type (string).""" - registryPackageType: String - - """Filter registry package by whether it is publicly visible""" - publicOnly: Boolean = false - ): RegistryPackageConnection! - - """A list of registry packages for a particular search query.""" - registryPackagesForQuery( - """Returns the elements in the list that come after the specified cursor.""" - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """Returns the first _n_ elements from the list.""" - first: Int - - """Returns the last _n_ elements from the list.""" - last: Int - - """Find registry package by search query.""" - query: String - - """Filter registry package by type.""" - packageType: RegistryPackageType - ): RegistryPackageConnection! - """A list of repositories that the user owns.""" repositories( """If non-null, filters repositories according to privacy""" @@ -19453,7 +24296,7 @@ type User implements Node & Actor & RegistryPackageOwner & RegistryPackageSearch connection. For example, OWNER will include only repositories that the current viewer owns. """ - affiliations: [RepositoryAffiliation] = [OWNER, COLLABORATOR] + affiliations: [RepositoryAffiliation] """ Array of owner's affiliation options for repositories returned from the @@ -19550,9 +24393,12 @@ type User implements Node & Actor & RegistryPackageOwner & RegistryPackageSearch last: Int """The field to order saved replies by.""" - orderBy: SavedReplyOrder + orderBy: SavedReplyOrder = {field: UPDATED_AT, direction: DESC} ): SavedReplyConnection + """The GitHub Sponsors listing for this user or organization.""" + sponsorsListing: SponsorsListing + """This object's sponsorships as the maintainer.""" sponsorshipsAsMaintainer( """Returns the elements in the list that come after the specified cursor.""" @@ -19604,6 +24450,20 @@ type User implements Node & Actor & RegistryPackageOwner & RegistryPackageSearch """Repositories the user has starred.""" starredRepositories( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + """ Filters starred repositories to only return repositories owned by the viewer. """ @@ -19611,7 +24471,16 @@ type User implements Node & Actor & RegistryPackageOwner & RegistryPackageSearch """Order for connection""" orderBy: StarOrder + ): StarredRepositoryConnection! + + """The user's description of what they're currently doing.""" + status: UserStatus + """ + Repositories the user has contributed to, ordered by contribution rank, plus repositories the user has created + + """ + topRepositories( """Returns the elements in the list that come after the specified cursor.""" after: String @@ -19625,10 +24494,16 @@ type User implements Node & Actor & RegistryPackageOwner & RegistryPackageSearch """Returns the last _n_ elements from the list.""" last: Int - ): StarredRepositoryConnection! - """The user's description of what they're currently doing.""" - status: UserStatus + """Ordering options for repositories returned from the connection""" + orderBy: RepositoryOrder! + + """How far back in time to fetch contributed repositories""" + since: DateTime + ): RepositoryConnection! + + """The user's Twitter username.""" + twitterUsername: String """Identifies the date and time when the object was last updated.""" updatedAt: DateTime! @@ -19645,9 +24520,15 @@ type User implements Node & Actor & RegistryPackageOwner & RegistryPackageSearch """Whether or not the viewer is able to follow the user.""" viewerCanFollow: Boolean! + """Whether or not the viewer is able to sponsor this user/organization.""" + viewerCanSponsor: Boolean! + """Whether or not this user is followed by the viewer.""" viewerIsFollowing: Boolean! + """True if the viewer is sponsoring this user/organization.""" + viewerIsSponsoring: Boolean! + """A list of repositories the given user is watching.""" watching( """If non-null, filters repositories according to privacy""" @@ -19656,8 +24537,12 @@ type User implements Node & Actor & RegistryPackageOwner & RegistryPackageSearch """Ordering options for repositories returned from the connection""" orderBy: RepositoryOrder - """Affiliation options for repositories returned from the connection""" - affiliations: [RepositoryAffiliation] = [OWNER, COLLABORATOR, ORGANIZATION_MEMBER] + """ + Affiliation options for repositories returned from the connection. If none + specified, the results will include repositories for which the current + viewer is an owner or collaborator, or member. + """ + affiliations: [RepositoryAffiliation] """ Array of owner's affiliation options for repositories returned from the @@ -19797,6 +24682,18 @@ type UserEdge { node: User } +"""Email attributes from External Identity""" +type UserEmailMetadata { + """Boolean to identify primary emails""" + primary: Boolean + + """Type of email""" + type: String + + """Email id""" + value: String! +} + """The user's description of what they're currently doing.""" type UserStatus implements Node { """Identifies the date and time when the object was created.""" @@ -19873,5 +24770,19 @@ enum UserStatusOrderField { UPDATED_AT } +""" +A hovercard context with a message describing how the viewer is related. +""" +type ViewerHovercardContext implements HovercardContext { + """A string describing this context""" + message: String! + + """An octicon to accompany this context""" + octicon: String! + + """Identifies the user who is related to this context.""" + viewer: User! +} + """A valid x509 certificate string""" scalar X509Certificate diff --git a/img/unlock.svg b/img/unlock.svg new file mode 100644 index 0000000000..9e7927c140 --- /dev/null +++ b/img/unlock.svg @@ -0,0 +1,61 @@ + + + + + + image/svg+xml + + + + + + + + + diff --git a/keymaps/git.cson b/keymaps/git.cson index 2cfc2172a4..f2ba12b483 100644 --- a/keymaps/git.cson +++ b/keymaps/git.cson @@ -112,6 +112,7 @@ 'esc': 'tool-panel:unfocus' '.github-Dialog': + 'tab': 'core:focus-next' 'shift-tab': 'core:focus-previous' '.github-Dialog input': @@ -120,18 +121,20 @@ '.github-CoAuthorForm input': 'enter': 'core:confirm' +'body .github-TabbableWrapper': + 'down': 'github:selectbox-down' + 'up': 'github:selectbox-up' + 'enter': 'github:selectbox-enter' + 'tab': 'github:selectbox-tab' + 'backspace': 'github:selectbox-backspace' + 'pageup': 'github:selectbox-pageup' + 'pagedown': 'github:selectbox-pagedown' + 'end': 'github:selectbox-end' + 'home': 'github:selectbox-home' + 'delete': 'github:selectbox-delete' + 'escape': 'github:selectbox-escape' + 'body .github-CommitView-coAuthorEditor': - 'enter': 'github:co-author:enter' - 'down': 'github:co-author:down' - 'up': 'github:co-author:up' - 'tab': 'github:co-author:tab' - 'backspace': 'github:co-author:backspace' - 'escape': 'github:co-author:escape' - 'pageup': 'github:co-author:pageup' - 'pagedown': 'github:co-author:pagedown' - 'home': 'github:co-author:home' - 'end': 'github:co-author:end' - 'delete': 'github:co-author:delete' 'shift-backspace': 'github:co-author-exclude' '.platform-darwin .github-Reviews': diff --git a/lib/atom/atom-text-editor.js b/lib/atom/atom-text-editor.js index 6f1105dde1..7e0c3f7315 100644 --- a/lib/atom/atom-text-editor.js +++ b/lib/atom/atom-text-editor.js @@ -41,6 +41,7 @@ export default class AtomTextEditor extends React.Component { tabIndex: PropTypes.number, refModel: RefHolderPropType, + refElement: RefHolderPropType, children: PropTypes.node, } @@ -62,7 +63,7 @@ export default class AtomTextEditor extends React.Component { this.subs = new CompositeDisposable(); this.refParent = new RefHolder(); - this.refElement = new RefHolder(); + this.refElement = null; this.refModel = null; } @@ -91,7 +92,7 @@ export default class AtomTextEditor extends React.Component { } element.appendChild(editor.getElement()); this.getRefModel().setter(editor); - this.refElement.setter(editor.getElement()); + this.getRefElement().setter(editor.getElement()); this.subs.add( editor.onDidChangeCursorPosition(this.props.didChangeCursorPosition), @@ -136,20 +137,20 @@ export default class AtomTextEditor extends React.Component { observeEmptiness = () => { this.getRefModel().map(editor => { if (editor.isEmpty() && this.props.hideEmptiness) { - this.refElement.map(element => element.classList.add(EMPTY_CLASS)); + this.getRefElement().map(element => element.classList.add(EMPTY_CLASS)); } else { - this.refElement.map(element => element.classList.remove(EMPTY_CLASS)); + this.getRefElement().map(element => element.classList.remove(EMPTY_CLASS)); } return null; }); } contains(element) { - return this.refElement.map(e => e.contains(element)).getOr(false); + return this.getRefElement().map(e => e.contains(element)).getOr(false); } focus() { - this.refElement.map(e => e.focus()); + this.getRefElement().map(e => e.focus()); } getRefModel() { @@ -164,6 +165,18 @@ export default class AtomTextEditor extends React.Component { return this.refModel; } + getRefElement() { + if (this.props.refElement) { + return this.props.refElement; + } + + if (!this.refElement) { + this.refElement = new RefHolder(); + } + + return this.refElement; + } + getModel() { return this.getRefModel().getOr(undefined); } diff --git a/lib/atom/marker.js b/lib/atom/marker.js index 0fed0f7e01..8f3358142f 100644 --- a/lib/atom/marker.js +++ b/lib/atom/marker.js @@ -25,7 +25,7 @@ export const DecorableContext = React.createContext(); class BareMarker extends React.Component { static propTypes = { ...markerProps, - id: PropTypes.string, + id: PropTypes.number, bufferRange: RangePropType, markableHolder: RefHolderPropType, children: PropTypes.node, diff --git a/lib/atom/octicon.js b/lib/atom/octicon.js index 1f306dda38..c4a3d14676 100644 --- a/lib/atom/octicon.js +++ b/lib/atom/octicon.js @@ -2,8 +2,32 @@ import React from 'react'; import PropTypes from 'prop-types'; import cx from 'classnames'; +/* eslint-disable max-len */ +const SVG = { + unlock: { + viewBox: '0 0 24 16', + element: ( + + ), + }, +}; +/* eslint-enable max-len */ + export default function Octicon({icon, ...others}) { const classes = cx('icon', `icon-${icon}`, others.className); + + const svgContent = SVG[icon]; + if (svgContent) { + return ( + + {svgContent.element} + + ); + } + return ; } diff --git a/lib/atom/pane-item.js b/lib/atom/pane-item.js index f4c306c2de..66563b9949 100644 --- a/lib/atom/pane-item.js +++ b/lib/atom/pane-item.js @@ -71,6 +71,37 @@ export default class PaneItem extends React.Component { } componentDidMount() { + // Listen for and adopt StubItems that are added after this component has + // already been mounted. + this.subs.add(this.props.workspace.onDidAddPaneItem(({item}) => { + if (!item._getStub) { + return; + } + const stub = item._getStub(); + + if (stub.getRealItem() !== null) { + return; + } + + const match = this.state.uriPattern.matches(item.getURI()); + if (!match.ok()) { + return; + } + + const openItem = new OpenItem(match, stub.getElement(), stub); + openItem.hydrateStub({ + copy: () => this.copyOpenItem(openItem), + }); + if (this.props.className) { + openItem.addClassName(this.props.className); + } + this.registerCloseListener(item, openItem); + + this.setState(prevState => ({ + currentlyOpen: [...prevState.currentlyOpen, openItem], + })); + })); + for (const openItem of this.state.currentlyOpen) { this.registerCloseListener(openItem.stubItem, openItem); diff --git a/lib/containers/__generated__/aggregatedReviewsContainerRefetchQuery.graphql.js b/lib/containers/__generated__/aggregatedReviewsContainerRefetchQuery.graphql.js index 3de4b8baeb..048f7ccb26 100644 --- a/lib/containers/__generated__/aggregatedReviewsContainerRefetchQuery.graphql.js +++ b/lib/containers/__generated__/aggregatedReviewsContainerRefetchQuery.graphql.js @@ -1,6 +1,6 @@ /** * @flow - * @relayHash 1a195aa12b0b6f9427454c2b28dfac39 + * @relayHash f294a17e7a12256bf4437f6cb9f06f80 */ /* eslint-disable */ @@ -50,6 +50,29 @@ query aggregatedReviewsContainerRefetchQuery( } } +fragment aggregatedReviewsContainer_pullRequest_qdneZ on PullRequest { + id + ...reviewSummariesAccumulator_pullRequest_2zzc96 + ...reviewThreadsAccumulator_pullRequest_CKDvj +} + +fragment emojiReactionsController_reactable on Reactable { + id + ...emojiReactionsView_reactable +} + +fragment emojiReactionsView_reactable on Reactable { + id + reactionGroups { + content + viewerHasReacted + users { + totalCount + } + } + viewerCanReact +} + fragment prCheckoutController_pullRequest on PullRequest { number headRefName @@ -66,10 +89,43 @@ fragment prCheckoutController_pullRequest on PullRequest { } } -fragment aggregatedReviewsContainer_pullRequest_qdneZ on PullRequest { +fragment reviewCommentsAccumulator_reviewThread_1VbUmL on PullRequestReviewThread { id - ...reviewSummariesAccumulator_pullRequest_2zzc96 - ...reviewThreadsAccumulator_pullRequest_CKDvj + comments(first: $commentCount, after: $commentCursor) { + pageInfo { + hasNextPage + endCursor + } + edges { + cursor + node { + id + author { + __typename + avatarUrl + login + url + ... on Node { + id + } + } + bodyHTML + body + isMinimized + state + viewerCanReact + viewerCanUpdate + path + position + createdAt + lastEditedAt + url + authorAssociation + ...emojiReactionsController_reactable + __typename + } + } + } } fragment reviewSummariesAccumulator_pullRequest_2zzc96 on PullRequest { @@ -131,62 +187,6 @@ fragment reviewThreadsAccumulator_pullRequest_CKDvj on PullRequest { } } } - -fragment reviewCommentsAccumulator_reviewThread_1VbUmL on PullRequestReviewThread { - id - comments(first: $commentCount, after: $commentCursor) { - pageInfo { - hasNextPage - endCursor - } - edges { - cursor - node { - id - author { - __typename - avatarUrl - login - url - ... on Node { - id - } - } - bodyHTML - body - isMinimized - state - viewerCanReact - viewerCanUpdate - path - position - createdAt - lastEditedAt - url - authorAssociation - ...emojiReactionsController_reactable - __typename - } - } - } -} - -fragment emojiReactionsController_reactable on Reactable { - id - ...emojiReactionsView_reactable -} - -fragment emojiReactionsView_reactable on Reactable { - id - reactionGroups { - content - viewerHasReacted - users { - totalCount - } - } - viewerCanReact -} */ const node/*: ConcreteRequest*/ = (function(){ @@ -842,7 +842,7 @@ return { "operationKind": "query", "name": "aggregatedReviewsContainerRefetchQuery", "id": null, - "text": "query aggregatedReviewsContainerRefetchQuery(\n $prId: ID!\n $reviewCount: Int!\n $reviewCursor: String\n $threadCount: Int!\n $threadCursor: String\n $commentCount: Int!\n $commentCursor: String\n) {\n pullRequest: node(id: $prId) {\n __typename\n ...prCheckoutController_pullRequest\n ...aggregatedReviewsContainer_pullRequest_qdneZ\n id\n }\n}\n\nfragment prCheckoutController_pullRequest on PullRequest {\n number\n headRefName\n headRepository {\n name\n url\n sshUrl\n owner {\n __typename\n login\n id\n }\n id\n }\n}\n\nfragment aggregatedReviewsContainer_pullRequest_qdneZ on PullRequest {\n id\n ...reviewSummariesAccumulator_pullRequest_2zzc96\n ...reviewThreadsAccumulator_pullRequest_CKDvj\n}\n\nfragment reviewSummariesAccumulator_pullRequest_2zzc96 on PullRequest {\n url\n reviews(first: $reviewCount, after: $reviewCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n body\n bodyHTML\n state\n submittedAt\n lastEditedAt\n url\n author {\n __typename\n login\n avatarUrl\n url\n ... on Node {\n id\n }\n }\n viewerCanUpdate\n authorAssociation\n ...emojiReactionsController_reactable\n __typename\n }\n }\n }\n}\n\nfragment reviewThreadsAccumulator_pullRequest_CKDvj on PullRequest {\n url\n reviewThreads(first: $threadCount, after: $threadCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n isResolved\n resolvedBy {\n login\n id\n }\n viewerCanResolve\n viewerCanUnresolve\n ...reviewCommentsAccumulator_reviewThread_1VbUmL\n __typename\n }\n }\n }\n}\n\nfragment reviewCommentsAccumulator_reviewThread_1VbUmL on PullRequestReviewThread {\n id\n comments(first: $commentCount, after: $commentCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n author {\n __typename\n avatarUrl\n login\n url\n ... on Node {\n id\n }\n }\n bodyHTML\n body\n isMinimized\n state\n viewerCanReact\n viewerCanUpdate\n path\n position\n createdAt\n lastEditedAt\n url\n authorAssociation\n ...emojiReactionsController_reactable\n __typename\n }\n }\n }\n}\n\nfragment emojiReactionsController_reactable on Reactable {\n id\n ...emojiReactionsView_reactable\n}\n\nfragment emojiReactionsView_reactable on Reactable {\n id\n reactionGroups {\n content\n viewerHasReacted\n users {\n totalCount\n }\n }\n viewerCanReact\n}\n", + "text": "query aggregatedReviewsContainerRefetchQuery(\n $prId: ID!\n $reviewCount: Int!\n $reviewCursor: String\n $threadCount: Int!\n $threadCursor: String\n $commentCount: Int!\n $commentCursor: String\n) {\n pullRequest: node(id: $prId) {\n __typename\n ...prCheckoutController_pullRequest\n ...aggregatedReviewsContainer_pullRequest_qdneZ\n id\n }\n}\n\nfragment aggregatedReviewsContainer_pullRequest_qdneZ on PullRequest {\n id\n ...reviewSummariesAccumulator_pullRequest_2zzc96\n ...reviewThreadsAccumulator_pullRequest_CKDvj\n}\n\nfragment emojiReactionsController_reactable on Reactable {\n id\n ...emojiReactionsView_reactable\n}\n\nfragment emojiReactionsView_reactable on Reactable {\n id\n reactionGroups {\n content\n viewerHasReacted\n users {\n totalCount\n }\n }\n viewerCanReact\n}\n\nfragment prCheckoutController_pullRequest on PullRequest {\n number\n headRefName\n headRepository {\n name\n url\n sshUrl\n owner {\n __typename\n login\n id\n }\n id\n }\n}\n\nfragment reviewCommentsAccumulator_reviewThread_1VbUmL on PullRequestReviewThread {\n id\n comments(first: $commentCount, after: $commentCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n author {\n __typename\n avatarUrl\n login\n url\n ... on Node {\n id\n }\n }\n bodyHTML\n body\n isMinimized\n state\n viewerCanReact\n viewerCanUpdate\n path\n position\n createdAt\n lastEditedAt\n url\n authorAssociation\n ...emojiReactionsController_reactable\n __typename\n }\n }\n }\n}\n\nfragment reviewSummariesAccumulator_pullRequest_2zzc96 on PullRequest {\n url\n reviews(first: $reviewCount, after: $reviewCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n body\n bodyHTML\n state\n submittedAt\n lastEditedAt\n url\n author {\n __typename\n login\n avatarUrl\n url\n ... on Node {\n id\n }\n }\n viewerCanUpdate\n authorAssociation\n ...emojiReactionsController_reactable\n __typename\n }\n }\n }\n}\n\nfragment reviewThreadsAccumulator_pullRequest_CKDvj on PullRequest {\n url\n reviewThreads(first: $threadCount, after: $threadCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n isResolved\n resolvedBy {\n login\n id\n }\n viewerCanResolve\n viewerCanUnresolve\n ...reviewCommentsAccumulator_reviewThread_1VbUmL\n __typename\n }\n }\n }\n}\n", "metadata": {} } }; diff --git a/lib/containers/__generated__/commentDecorationsContainerQuery.graphql.js b/lib/containers/__generated__/commentDecorationsContainerQuery.graphql.js index 3e41dc0e96..1bf7d342c3 100644 --- a/lib/containers/__generated__/commentDecorationsContainerQuery.graphql.js +++ b/lib/containers/__generated__/commentDecorationsContainerQuery.graphql.js @@ -1,6 +1,6 @@ /** * @flow - * @relayHash 7fbd3f9952895ce8b0dcee6a0b4dc580 + * @relayHash d80b4439da3a2474f993fc4d9264153c */ /* eslint-disable */ @@ -75,6 +75,12 @@ query commentDecorationsContainerQuery( } } +fragment aggregatedReviewsContainer_pullRequest_qdneZ on PullRequest { + id + ...reviewSummariesAccumulator_pullRequest_2zzc96 + ...reviewThreadsAccumulator_pullRequest_CKDvj +} + fragment commentDecorationsController_pullRequests on PullRequest { number headRefName @@ -99,10 +105,60 @@ fragment commentDecorationsController_pullRequests on PullRequest { } } -fragment aggregatedReviewsContainer_pullRequest_qdneZ on PullRequest { +fragment emojiReactionsController_reactable on Reactable { id - ...reviewSummariesAccumulator_pullRequest_2zzc96 - ...reviewThreadsAccumulator_pullRequest_CKDvj + ...emojiReactionsView_reactable +} + +fragment emojiReactionsView_reactable on Reactable { + id + reactionGroups { + content + viewerHasReacted + users { + totalCount + } + } + viewerCanReact +} + +fragment reviewCommentsAccumulator_reviewThread_1VbUmL on PullRequestReviewThread { + id + comments(first: $commentCount, after: $commentCursor) { + pageInfo { + hasNextPage + endCursor + } + edges { + cursor + node { + id + author { + __typename + avatarUrl + login + url + ... on Node { + id + } + } + bodyHTML + body + isMinimized + state + viewerCanReact + viewerCanUpdate + path + position + createdAt + lastEditedAt + url + authorAssociation + ...emojiReactionsController_reactable + __typename + } + } + } } fragment reviewSummariesAccumulator_pullRequest_2zzc96 on PullRequest { @@ -164,62 +220,6 @@ fragment reviewThreadsAccumulator_pullRequest_CKDvj on PullRequest { } } } - -fragment reviewCommentsAccumulator_reviewThread_1VbUmL on PullRequestReviewThread { - id - comments(first: $commentCount, after: $commentCursor) { - pageInfo { - hasNextPage - endCursor - } - edges { - cursor - node { - id - author { - __typename - avatarUrl - login - url - ... on Node { - id - } - } - bodyHTML - body - isMinimized - state - viewerCanReact - viewerCanUpdate - path - position - createdAt - lastEditedAt - url - authorAssociation - ...emojiReactionsController_reactable - __typename - } - } - } -} - -fragment emojiReactionsController_reactable on Reactable { - id - ...emojiReactionsView_reactable -} - -fragment emojiReactionsView_reactable on Reactable { - id - reactionGroups { - content - viewerHasReacted - users { - totalCount - } - } - viewerCanReact -} */ const node/*: ConcreteRequest*/ = (function(){ @@ -997,7 +997,7 @@ return { "operationKind": "query", "name": "commentDecorationsContainerQuery", "id": null, - "text": "query commentDecorationsContainerQuery(\n $headOwner: String!\n $headName: String!\n $headRef: String!\n $reviewCount: Int!\n $reviewCursor: String\n $threadCount: Int!\n $threadCursor: String\n $commentCount: Int!\n $commentCursor: String\n $first: Int!\n) {\n repository(owner: $headOwner, name: $headName) {\n ref(qualifiedName: $headRef) {\n associatedPullRequests(first: $first, states: [OPEN]) {\n totalCount\n nodes {\n number\n headRefOid\n ...commentDecorationsController_pullRequests\n ...aggregatedReviewsContainer_pullRequest_qdneZ\n id\n }\n }\n id\n }\n id\n }\n}\n\nfragment commentDecorationsController_pullRequests on PullRequest {\n number\n headRefName\n headRefOid\n headRepository {\n name\n owner {\n __typename\n login\n id\n }\n id\n }\n repository {\n name\n owner {\n __typename\n login\n id\n }\n id\n }\n}\n\nfragment aggregatedReviewsContainer_pullRequest_qdneZ on PullRequest {\n id\n ...reviewSummariesAccumulator_pullRequest_2zzc96\n ...reviewThreadsAccumulator_pullRequest_CKDvj\n}\n\nfragment reviewSummariesAccumulator_pullRequest_2zzc96 on PullRequest {\n url\n reviews(first: $reviewCount, after: $reviewCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n body\n bodyHTML\n state\n submittedAt\n lastEditedAt\n url\n author {\n __typename\n login\n avatarUrl\n url\n ... on Node {\n id\n }\n }\n viewerCanUpdate\n authorAssociation\n ...emojiReactionsController_reactable\n __typename\n }\n }\n }\n}\n\nfragment reviewThreadsAccumulator_pullRequest_CKDvj on PullRequest {\n url\n reviewThreads(first: $threadCount, after: $threadCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n isResolved\n resolvedBy {\n login\n id\n }\n viewerCanResolve\n viewerCanUnresolve\n ...reviewCommentsAccumulator_reviewThread_1VbUmL\n __typename\n }\n }\n }\n}\n\nfragment reviewCommentsAccumulator_reviewThread_1VbUmL on PullRequestReviewThread {\n id\n comments(first: $commentCount, after: $commentCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n author {\n __typename\n avatarUrl\n login\n url\n ... on Node {\n id\n }\n }\n bodyHTML\n body\n isMinimized\n state\n viewerCanReact\n viewerCanUpdate\n path\n position\n createdAt\n lastEditedAt\n url\n authorAssociation\n ...emojiReactionsController_reactable\n __typename\n }\n }\n }\n}\n\nfragment emojiReactionsController_reactable on Reactable {\n id\n ...emojiReactionsView_reactable\n}\n\nfragment emojiReactionsView_reactable on Reactable {\n id\n reactionGroups {\n content\n viewerHasReacted\n users {\n totalCount\n }\n }\n viewerCanReact\n}\n", + "text": "query commentDecorationsContainerQuery(\n $headOwner: String!\n $headName: String!\n $headRef: String!\n $reviewCount: Int!\n $reviewCursor: String\n $threadCount: Int!\n $threadCursor: String\n $commentCount: Int!\n $commentCursor: String\n $first: Int!\n) {\n repository(owner: $headOwner, name: $headName) {\n ref(qualifiedName: $headRef) {\n associatedPullRequests(first: $first, states: [OPEN]) {\n totalCount\n nodes {\n number\n headRefOid\n ...commentDecorationsController_pullRequests\n ...aggregatedReviewsContainer_pullRequest_qdneZ\n id\n }\n }\n id\n }\n id\n }\n}\n\nfragment aggregatedReviewsContainer_pullRequest_qdneZ on PullRequest {\n id\n ...reviewSummariesAccumulator_pullRequest_2zzc96\n ...reviewThreadsAccumulator_pullRequest_CKDvj\n}\n\nfragment commentDecorationsController_pullRequests on PullRequest {\n number\n headRefName\n headRefOid\n headRepository {\n name\n owner {\n __typename\n login\n id\n }\n id\n }\n repository {\n name\n owner {\n __typename\n login\n id\n }\n id\n }\n}\n\nfragment emojiReactionsController_reactable on Reactable {\n id\n ...emojiReactionsView_reactable\n}\n\nfragment emojiReactionsView_reactable on Reactable {\n id\n reactionGroups {\n content\n viewerHasReacted\n users {\n totalCount\n }\n }\n viewerCanReact\n}\n\nfragment reviewCommentsAccumulator_reviewThread_1VbUmL on PullRequestReviewThread {\n id\n comments(first: $commentCount, after: $commentCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n author {\n __typename\n avatarUrl\n login\n url\n ... on Node {\n id\n }\n }\n bodyHTML\n body\n isMinimized\n state\n viewerCanReact\n viewerCanUpdate\n path\n position\n createdAt\n lastEditedAt\n url\n authorAssociation\n ...emojiReactionsController_reactable\n __typename\n }\n }\n }\n}\n\nfragment reviewSummariesAccumulator_pullRequest_2zzc96 on PullRequest {\n url\n reviews(first: $reviewCount, after: $reviewCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n body\n bodyHTML\n state\n submittedAt\n lastEditedAt\n url\n author {\n __typename\n login\n avatarUrl\n url\n ... on Node {\n id\n }\n }\n viewerCanUpdate\n authorAssociation\n ...emojiReactionsController_reactable\n __typename\n }\n }\n }\n}\n\nfragment reviewThreadsAccumulator_pullRequest_CKDvj on PullRequest {\n url\n reviewThreads(first: $threadCount, after: $threadCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n isResolved\n resolvedBy {\n login\n id\n }\n viewerCanResolve\n viewerCanUnresolve\n ...reviewCommentsAccumulator_reviewThread_1VbUmL\n __typename\n }\n }\n }\n}\n", "metadata": {} } }; diff --git a/lib/containers/__generated__/createDialogContainerQuery.graphql.js b/lib/containers/__generated__/createDialogContainerQuery.graphql.js new file mode 100644 index 0000000000..e37eaefb04 --- /dev/null +++ b/lib/containers/__generated__/createDialogContainerQuery.graphql.js @@ -0,0 +1,283 @@ +/** + * @flow + * @relayHash 72a9fbd2efed6312f034405f54084c6f + */ + +/* eslint-disable */ + +'use strict'; + +/*:: +import type { ConcreteRequest } from 'relay-runtime'; +type createDialogController_user$ref = any; +export type createDialogContainerQueryVariables = {| + organizationCount: number, + organizationCursor?: ?string, +|}; +export type createDialogContainerQueryResponse = {| + +viewer: {| + +$fragmentRefs: createDialogController_user$ref + |} +|}; +export type createDialogContainerQuery = {| + variables: createDialogContainerQueryVariables, + response: createDialogContainerQueryResponse, +|}; +*/ + + +/* +query createDialogContainerQuery( + $organizationCount: Int! + $organizationCursor: String +) { + viewer { + ...createDialogController_user_12CDS5 + id + } +} + +fragment createDialogController_user_12CDS5 on User { + id + ...repositoryHomeSelectionView_user_12CDS5 +} + +fragment repositoryHomeSelectionView_user_12CDS5 on User { + id + login + avatarUrl(size: 24) + organizations(first: $organizationCount, after: $organizationCursor) { + pageInfo { + hasNextPage + endCursor + } + edges { + cursor + node { + id + login + avatarUrl(size: 24) + viewerCanCreateRepositories + __typename + } + } + } +} +*/ + +const node/*: ConcreteRequest*/ = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "organizationCount", + "type": "Int!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "organizationCursor", + "type": "String", + "defaultValue": null + } +], +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null +}, +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "login", + "args": null, + "storageKey": null +}, +v3 = { + "kind": "ScalarField", + "alias": null, + "name": "avatarUrl", + "args": [ + { + "kind": "Literal", + "name": "size", + "value": 24 + } + ], + "storageKey": "avatarUrl(size:24)" +}, +v4 = [ + { + "kind": "Variable", + "name": "after", + "variableName": "organizationCursor" + }, + { + "kind": "Variable", + "name": "first", + "variableName": "organizationCount" + } +]; +return { + "kind": "Request", + "fragment": { + "kind": "Fragment", + "name": "createDialogContainerQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": (v0/*: any*/), + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "viewer", + "storageKey": null, + "args": null, + "concreteType": "User", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "createDialogController_user", + "args": [ + { + "kind": "Variable", + "name": "organizationCount", + "variableName": "organizationCount" + }, + { + "kind": "Variable", + "name": "organizationCursor", + "variableName": "organizationCursor" + } + ] + } + ] + } + ] + }, + "operation": { + "kind": "Operation", + "name": "createDialogContainerQuery", + "argumentDefinitions": (v0/*: any*/), + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "viewer", + "storageKey": null, + "args": null, + "concreteType": "User", + "plural": false, + "selections": [ + (v1/*: any*/), + (v2/*: any*/), + (v3/*: any*/), + { + "kind": "LinkedField", + "alias": null, + "name": "organizations", + "storageKey": null, + "args": (v4/*: any*/), + "concreteType": "OrganizationConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "OrganizationEdge", + "plural": true, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Organization", + "plural": false, + "selections": [ + (v1/*: any*/), + (v2/*: any*/), + (v3/*: any*/), + { + "kind": "ScalarField", + "alias": null, + "name": "viewerCanCreateRepositories", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ] + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": null, + "name": "organizations", + "args": (v4/*: any*/), + "handle": "connection", + "key": "RepositoryHomeSelectionView_organizations", + "filters": null + } + ] + } + ] + }, + "params": { + "operationKind": "query", + "name": "createDialogContainerQuery", + "id": null, + "text": "query createDialogContainerQuery(\n $organizationCount: Int!\n $organizationCursor: String\n) {\n viewer {\n ...createDialogController_user_12CDS5\n id\n }\n}\n\nfragment createDialogController_user_12CDS5 on User {\n id\n ...repositoryHomeSelectionView_user_12CDS5\n}\n\nfragment repositoryHomeSelectionView_user_12CDS5 on User {\n id\n login\n avatarUrl(size: 24)\n organizations(first: $organizationCount, after: $organizationCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n login\n avatarUrl(size: 24)\n viewerCanCreateRepositories\n __typename\n }\n }\n }\n}\n", + "metadata": {} + } +}; +})(); +// prettier-ignore +(node/*: any*/).hash = '862b8ec3127c9a52e9a54020afa47792'; +module.exports = node; diff --git a/lib/containers/__generated__/currentPullRequestContainerQuery.graphql.js b/lib/containers/__generated__/currentPullRequestContainerQuery.graphql.js index a9b69b1f57..1ca9ff9057 100644 --- a/lib/containers/__generated__/currentPullRequestContainerQuery.graphql.js +++ b/lib/containers/__generated__/currentPullRequestContainerQuery.graphql.js @@ -1,6 +1,6 @@ /** * @flow - * @relayHash 211c0401afb52b44e2cd596957148b75 + * @relayHash 11d909ebcdc948ee058ed9dced388da7 */ /* eslint-disable */ @@ -65,50 +65,19 @@ query currentPullRequestContainerQuery( } } -fragment issueishListController_results_1oGSNs on PullRequest { - number +fragment checkRunView_checkRun on CheckRun { + name + status + conclusion title - url - author { - __typename - login - avatarUrl - ... on Node { - id - } - } - createdAt - headRefName - repository { - id - name - owner { - __typename - login - id - } - } - commits(last: 1) { - nodes { - commit { - status { - contexts { - id - state - } - id - } - ...checkSuitesAccumulator_commit_1oGSNs - id - } - id - } - } + summary + permalink + detailsUrl } -fragment checkSuitesAccumulator_commit_1oGSNs on Commit { +fragment checkRunsAccumulator_checkSuite_Rvfr1 on CheckSuite { id - checkSuites(first: $checkSuiteCount, after: $checkSuiteCursor) { + checkRuns(first: $checkRunCount, after: $checkRunCursor) { pageInfo { hasNextPage endCursor @@ -119,8 +88,7 @@ fragment checkSuitesAccumulator_commit_1oGSNs on Commit { id status conclusion - ...checkSuiteView_checkSuite - ...checkRunsAccumulator_checkSuite_Rvfr1 + ...checkRunView_checkRun __typename } } @@ -136,9 +104,9 @@ fragment checkSuiteView_checkSuite on CheckSuite { conclusion } -fragment checkRunsAccumulator_checkSuite_Rvfr1 on CheckSuite { +fragment checkSuitesAccumulator_commit_1oGSNs on Commit { id - checkRuns(first: $checkRunCount, after: $checkRunCursor) { + checkSuites(first: $checkSuiteCount, after: $checkSuiteCursor) { pageInfo { hasNextPage endCursor @@ -149,21 +117,53 @@ fragment checkRunsAccumulator_checkSuite_Rvfr1 on CheckSuite { id status conclusion - ...checkRunView_checkRun + ...checkSuiteView_checkSuite + ...checkRunsAccumulator_checkSuite_Rvfr1 __typename } } } } -fragment checkRunView_checkRun on CheckRun { - name - status - conclusion +fragment issueishListController_results_1oGSNs on PullRequest { + number title - summary - permalink - detailsUrl + url + author { + __typename + login + avatarUrl + ... on Node { + id + } + } + createdAt + headRefName + repository { + id + name + owner { + __typename + login + id + } + } + commits(last: 1) { + nodes { + commit { + status { + contexts { + id + state + } + id + } + ...checkSuitesAccumulator_commit_1oGSNs + id + } + id + } + } } */ @@ -785,7 +785,7 @@ return { "operationKind": "query", "name": "currentPullRequestContainerQuery", "id": null, - "text": "query currentPullRequestContainerQuery(\n $headOwner: String!\n $headName: String!\n $headRef: String!\n $first: Int!\n $checkSuiteCount: Int!\n $checkSuiteCursor: String\n $checkRunCount: Int!\n $checkRunCursor: String\n) {\n repository(owner: $headOwner, name: $headName) {\n ref(qualifiedName: $headRef) {\n associatedPullRequests(first: $first, states: [OPEN]) {\n totalCount\n nodes {\n ...issueishListController_results_1oGSNs\n id\n }\n }\n id\n }\n id\n }\n}\n\nfragment issueishListController_results_1oGSNs on PullRequest {\n number\n title\n url\n author {\n __typename\n login\n avatarUrl\n ... on Node {\n id\n }\n }\n createdAt\n headRefName\n repository {\n id\n name\n owner {\n __typename\n login\n id\n }\n }\n commits(last: 1) {\n nodes {\n commit {\n status {\n contexts {\n id\n state\n }\n id\n }\n ...checkSuitesAccumulator_commit_1oGSNs\n id\n }\n id\n }\n }\n}\n\nfragment checkSuitesAccumulator_commit_1oGSNs on Commit {\n id\n checkSuites(first: $checkSuiteCount, after: $checkSuiteCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n status\n conclusion\n ...checkSuiteView_checkSuite\n ...checkRunsAccumulator_checkSuite_Rvfr1\n __typename\n }\n }\n }\n}\n\nfragment checkSuiteView_checkSuite on CheckSuite {\n app {\n name\n id\n }\n status\n conclusion\n}\n\nfragment checkRunsAccumulator_checkSuite_Rvfr1 on CheckSuite {\n id\n checkRuns(first: $checkRunCount, after: $checkRunCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n status\n conclusion\n ...checkRunView_checkRun\n __typename\n }\n }\n }\n}\n\nfragment checkRunView_checkRun on CheckRun {\n name\n status\n conclusion\n title\n summary\n permalink\n detailsUrl\n}\n", + "text": "query currentPullRequestContainerQuery(\n $headOwner: String!\n $headName: String!\n $headRef: String!\n $first: Int!\n $checkSuiteCount: Int!\n $checkSuiteCursor: String\n $checkRunCount: Int!\n $checkRunCursor: String\n) {\n repository(owner: $headOwner, name: $headName) {\n ref(qualifiedName: $headRef) {\n associatedPullRequests(first: $first, states: [OPEN]) {\n totalCount\n nodes {\n ...issueishListController_results_1oGSNs\n id\n }\n }\n id\n }\n id\n }\n}\n\nfragment checkRunView_checkRun on CheckRun {\n name\n status\n conclusion\n title\n summary\n permalink\n detailsUrl\n}\n\nfragment checkRunsAccumulator_checkSuite_Rvfr1 on CheckSuite {\n id\n checkRuns(first: $checkRunCount, after: $checkRunCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n status\n conclusion\n ...checkRunView_checkRun\n __typename\n }\n }\n }\n}\n\nfragment checkSuiteView_checkSuite on CheckSuite {\n app {\n name\n id\n }\n status\n conclusion\n}\n\nfragment checkSuitesAccumulator_commit_1oGSNs on Commit {\n id\n checkSuites(first: $checkSuiteCount, after: $checkSuiteCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n status\n conclusion\n ...checkSuiteView_checkSuite\n ...checkRunsAccumulator_checkSuite_Rvfr1\n __typename\n }\n }\n }\n}\n\nfragment issueishListController_results_1oGSNs on PullRequest {\n number\n title\n url\n author {\n __typename\n login\n avatarUrl\n ... on Node {\n id\n }\n }\n createdAt\n headRefName\n repository {\n id\n name\n owner {\n __typename\n login\n id\n }\n }\n commits(last: 1) {\n nodes {\n commit {\n status {\n contexts {\n id\n state\n }\n id\n }\n ...checkSuitesAccumulator_commit_1oGSNs\n id\n }\n id\n }\n }\n}\n", "metadata": {} } }; diff --git a/lib/containers/__generated__/githubTabHeaderContainerQuery.graphql.js b/lib/containers/__generated__/githubTabHeaderContainerQuery.graphql.js new file mode 100644 index 0000000000..0fe81b38b8 --- /dev/null +++ b/lib/containers/__generated__/githubTabHeaderContainerQuery.graphql.js @@ -0,0 +1,135 @@ +/** + * @flow + * @relayHash 180d6bab8f919e61ddfec71b206e25a5 + */ + +/* eslint-disable */ + +'use strict'; + +/*:: +import type { ConcreteRequest } from 'relay-runtime'; +export type githubTabHeaderContainerQueryVariables = {||}; +export type githubTabHeaderContainerQueryResponse = {| + +viewer: {| + +name: ?string, + +email: string, + +avatarUrl: any, + +login: string, + |} +|}; +export type githubTabHeaderContainerQuery = {| + variables: githubTabHeaderContainerQueryVariables, + response: githubTabHeaderContainerQueryResponse, +|}; +*/ + + +/* +query githubTabHeaderContainerQuery { + viewer { + name + email + avatarUrl + login + id + } +} +*/ + +const node/*: ConcreteRequest*/ = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null +}, +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "email", + "args": null, + "storageKey": null +}, +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "avatarUrl", + "args": null, + "storageKey": null +}, +v3 = { + "kind": "ScalarField", + "alias": null, + "name": "login", + "args": null, + "storageKey": null +}; +return { + "kind": "Request", + "fragment": { + "kind": "Fragment", + "name": "githubTabHeaderContainerQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "viewer", + "storageKey": null, + "args": null, + "concreteType": "User", + "plural": false, + "selections": [ + (v0/*: any*/), + (v1/*: any*/), + (v2/*: any*/), + (v3/*: any*/) + ] + } + ] + }, + "operation": { + "kind": "Operation", + "name": "githubTabHeaderContainerQuery", + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "viewer", + "storageKey": null, + "args": null, + "concreteType": "User", + "plural": false, + "selections": [ + (v0/*: any*/), + (v1/*: any*/), + (v2/*: any*/), + (v3/*: any*/), + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + } + ] + } + ] + }, + "params": { + "operationKind": "query", + "name": "githubTabHeaderContainerQuery", + "id": null, + "text": "query githubTabHeaderContainerQuery {\n viewer {\n name\n email\n avatarUrl\n login\n id\n }\n}\n", + "metadata": {} + } +}; +})(); +// prettier-ignore +(node/*: any*/).hash = '003bcc6b15469f788437eba2b4ce780b'; +module.exports = node; diff --git a/lib/containers/__generated__/issueishDetailContainerQuery.graphql.js b/lib/containers/__generated__/issueishDetailContainerQuery.graphql.js index 498aee0a0a..2d0941dd95 100644 --- a/lib/containers/__generated__/issueishDetailContainerQuery.graphql.js +++ b/lib/containers/__generated__/issueishDetailContainerQuery.graphql.js @@ -1,6 +1,6 @@ /** * @flow - * @relayHash 0e1bad582fd3bff4f3eb3c865c94e153 + * @relayHash 85e978dc2d00ae09ae543bf716b313c9 */ /* eslint-disable */ @@ -91,206 +91,203 @@ fragment aggregatedReviewsContainer_pullRequest_qdneZ on PullRequest { ...reviewThreadsAccumulator_pullRequest_CKDvj } -fragment issueishDetailController_repository_3iQpNL on Repository { - ...issueDetailView_repository - ...prCheckoutController_repository - ...prDetailView_repository +fragment checkRunView_checkRun on CheckRun { name - owner { - __typename - login - id - } - issue: issueOrPullRequest(number: $issueishNumber) { - __typename - ... on Issue { - title - number - ...issueDetailView_issue_3D8CP9 - } - ... on Node { - id - } - } - pullRequest: issueOrPullRequest(number: $issueishNumber) { - __typename - ... on PullRequest { - title - number - ...prCheckoutController_pullRequest - ...prDetailView_pullRequest_1UVrY8 + status + conclusion + title + summary + permalink + detailsUrl +} + +fragment checkRunsAccumulator_checkSuite_Rvfr1 on CheckSuite { + id + checkRuns(first: $checkRunCount, after: $checkRunCursor) { + pageInfo { + hasNextPage + endCursor } - ... on Node { - id + edges { + cursor + node { + id + status + conclusion + ...checkRunView_checkRun + __typename + } } } } -fragment issueDetailView_repository on Repository { - id - name - owner { - __typename - login +fragment checkSuiteView_checkSuite on CheckSuite { + app { + name id } + status + conclusion } -fragment prCheckoutController_repository on Repository { - name - owner { - __typename - login - id +fragment checkSuitesAccumulator_commit_1oGSNs on Commit { + id + checkSuites(first: $checkSuiteCount, after: $checkSuiteCursor) { + pageInfo { + hasNextPage + endCursor + } + edges { + cursor + node { + id + status + conclusion + ...checkSuiteView_checkSuite + ...checkRunsAccumulator_checkSuite_Rvfr1 + __typename + } + } } } -fragment prDetailView_repository on Repository { - id - name - owner { - __typename - login +fragment commitCommentThreadView_item on PullRequestCommitCommentThread { + commit { + oid id } + comments(first: 100) { + edges { + node { + id + ...commitCommentView_item + } + } + } } -fragment issueDetailView_issue_3D8CP9 on Issue { - id - __typename - url - state - number - title - bodyHTML +fragment commitCommentView_item on CommitComment { author { __typename login avatarUrl - url ... on Node { id } } - ...issueTimelineController_issue_3D8CP9 - ...emojiReactionsView_reactable + commit { + oid + id + } + bodyHTML + createdAt + path + position } -fragment prCheckoutController_pullRequest on PullRequest { - number - headRefName - headRepository { +fragment commitView_commit on Commit { + author { name - url - sshUrl - owner { - __typename + avatarUrl + user { login id } - id } -} - -fragment prDetailView_pullRequest_1UVrY8 on PullRequest { - id - __typename - url - isCrossRepository - changedFiles - state - number - title - bodyHTML - baseRefName - headRefName - countedCommits: commits { - totalCount - } - author { - __typename - login + committer { + name avatarUrl - url - ... on Node { + user { + login id } } - ...prCommitsView_pullRequest_38TpXw - ...prStatusesView_pullRequest_1oGSNs - ...prTimelineController_pullRequest_3D8CP9 - ...emojiReactionsController_reactable + authoredByCommitter + sha: oid + message + messageHeadlineHTML + commitUrl } -fragment prCommitsView_pullRequest_38TpXw on PullRequest { - url - commits(first: $commitCount, after: $commitCursor) { - pageInfo { - endCursor - hasNextPage - } - edges { - cursor - node { - commit { - id - ...prCommitView_item - } +fragment commitsView_nodes on PullRequestCommit { + commit { + id + author { + name + user { + login id - __typename } } + ...commitView_commit } } -fragment prStatusesView_pullRequest_1oGSNs on PullRequest { +fragment crossReferencedEventView_item on CrossReferencedEvent { id - recentCommits: commits(last: 1) { - edges { - node { - commit { - status { - state - contexts { - id - state - ...prStatusContextView_context - } - id - } - ...checkSuitesAccumulator_commit_1oGSNs + isCrossRepository + source { + __typename + ... on Issue { + number + title + url + issueState: state + } + ... on PullRequest { + number + title + url + prState: state + } + ... on RepositoryNode { + repository { + name + isPrivate + owner { + __typename + login id } id } } + ... on Node { + id + } } } -fragment prTimelineController_pullRequest_3D8CP9 on PullRequest { - url - ...headRefForcePushedEventView_issueish - timelineItems(first: $timelineCount, after: $timelineCursor) { - pageInfo { - endCursor - hasNextPage +fragment crossReferencedEventsView_nodes on CrossReferencedEvent { + id + referencedAt + isCrossRepository + actor { + __typename + login + avatarUrl + ... on Node { + id } - edges { - cursor - node { - __typename - ...commitsView_nodes - ...issueCommentView_item - ...mergedEventView_item - ...headRefForcePushedEventView_item - ...commitCommentThreadView_item - ...crossReferencedEventsView_nodes - ... on Node { + } + source { + __typename + ... on RepositoryNode { + repository { + name + owner { + __typename + login id } + id } } + ... on Node { + id + } } + ...crossReferencedEventView_item } fragment emojiReactionsController_reactable on Reactable { @@ -327,18 +324,24 @@ fragment headRefForcePushedEventView_issueish on PullRequest { } } -fragment commitsView_nodes on PullRequestCommit { - commit { - id - author { - name - user { - login - id - } +fragment headRefForcePushedEventView_item on HeadRefForcePushedEvent { + actor { + __typename + avatarUrl + login + ... on Node { + id } - ...commitView_commit } + beforeCommit { + oid + id + } + afterCommit { + oid + id + } + createdAt } fragment issueCommentView_item on IssueComment { @@ -355,118 +358,86 @@ fragment issueCommentView_item on IssueComment { url } -fragment mergedEventView_item on MergedEvent { - actor { +fragment issueDetailView_issue_3D8CP9 on Issue { + id + __typename + url + state + number + title + bodyHTML + author { __typename - avatarUrl login + avatarUrl + url ... on Node { id } } - commit { - oid - id - } - mergeRefName - createdAt + ...issueTimelineController_issue_3D8CP9 + ...emojiReactionsView_reactable } -fragment headRefForcePushedEventView_item on HeadRefForcePushedEvent { - actor { +fragment issueDetailView_repository on Repository { + id + name + owner { __typename - avatarUrl login - ... on Node { - id - } - } - beforeCommit { - oid - id - } - afterCommit { - oid id } - createdAt } -fragment commitCommentThreadView_item on PullRequestCommitCommentThread { - commit { - oid - id - } - comments(first: 100) { +fragment issueTimelineController_issue_3D8CP9 on Issue { + url + timelineItems(first: $timelineCount, after: $timelineCursor) { + pageInfo { + endCursor + hasNextPage + } edges { + cursor node { - id - ...commitCommentView_item + __typename + ...issueCommentView_item + ...crossReferencedEventsView_nodes + ... on Node { + id + } } } } } -fragment crossReferencedEventsView_nodes on CrossReferencedEvent { - id - referencedAt - isCrossRepository - actor { +fragment issueishDetailController_repository_3iQpNL on Repository { + ...issueDetailView_repository + ...prCheckoutController_repository + ...prDetailView_repository + name + owner { __typename login - avatarUrl - ... on Node { - id - } + id } - source { + issue: issueOrPullRequest(number: $issueishNumber) { __typename - ... on RepositoryNode { - repository { - name - owner { - __typename - login - id - } - id - } + ... on Issue { + title + number + ...issueDetailView_issue_3D8CP9 } ... on Node { id } } - ...crossReferencedEventView_item -} - -fragment crossReferencedEventView_item on CrossReferencedEvent { - id - isCrossRepository - source { + pullRequest: issueOrPullRequest(number: $issueishNumber) { __typename - ... on Issue { - number - title - url - issueState: state - } ... on PullRequest { - number title - url - prState: state - } - ... on RepositoryNode { - repository { - name - isPrivate - owner { - __typename - login - id - } - id - } + number + ...prCheckoutController_pullRequest + ...prDetailView_pullRequest_1UVrY8 } ... on Node { id @@ -474,11 +445,11 @@ fragment crossReferencedEventView_item on CrossReferencedEvent { } } -fragment commitCommentView_item on CommitComment { - author { +fragment mergedEventView_item on MergedEvent { + actor { __typename - login avatarUrl + login ... on Node { id } @@ -487,118 +458,143 @@ fragment commitCommentView_item on CommitComment { oid id } - bodyHTML + mergeRefName createdAt - path - position } -fragment commitView_commit on Commit { - author { +fragment prCheckoutController_pullRequest on PullRequest { + number + headRefName + headRepository { name - avatarUrl - user { + url + sshUrl + owner { + __typename login id } + id + } +} + +fragment prCheckoutController_repository on Repository { + name + owner { + __typename + login + id } +} + +fragment prCommitView_item on Commit { committer { - name avatarUrl - user { - login - id - } + name + date } - authoredByCommitter + messageHeadline + messageBody + shortSha: abbreviatedOid sha: oid - message - messageHeadlineHTML - commitUrl -} - -fragment prStatusContextView_context on StatusContext { - context - description - state - targetUrl + url } -fragment checkSuitesAccumulator_commit_1oGSNs on Commit { - id - checkSuites(first: $checkSuiteCount, after: $checkSuiteCursor) { +fragment prCommitsView_pullRequest_38TpXw on PullRequest { + url + commits(first: $commitCount, after: $commitCursor) { pageInfo { - hasNextPage endCursor + hasNextPage } edges { cursor node { + commit { + id + ...prCommitView_item + } id - status - conclusion - ...checkSuiteView_checkSuite - ...checkRunsAccumulator_checkSuite_Rvfr1 __typename } } } } -fragment checkSuiteView_checkSuite on CheckSuite { - app { - name +fragment prDetailView_pullRequest_1UVrY8 on PullRequest { + id + __typename + url + isCrossRepository + changedFiles + state + number + title + bodyHTML + baseRefName + headRefName + countedCommits: commits { + totalCount + } + author { + __typename + login + avatarUrl + url + ... on Node { + id + } + } + ...prCommitsView_pullRequest_38TpXw + ...prStatusesView_pullRequest_1oGSNs + ...prTimelineController_pullRequest_3D8CP9 + ...emojiReactionsController_reactable +} + +fragment prDetailView_repository on Repository { + id + name + owner { + __typename + login id } - status - conclusion } -fragment checkRunsAccumulator_checkSuite_Rvfr1 on CheckSuite { +fragment prStatusContextView_context on StatusContext { + context + description + state + targetUrl +} + +fragment prStatusesView_pullRequest_1oGSNs on PullRequest { id - checkRuns(first: $checkRunCount, after: $checkRunCursor) { - pageInfo { - hasNextPage - endCursor - } + recentCommits: commits(last: 1) { edges { - cursor node { + commit { + status { + state + contexts { + id + state + ...prStatusContextView_context + } + id + } + ...checkSuitesAccumulator_commit_1oGSNs + id + } id - status - conclusion - ...checkRunView_checkRun - __typename } } } } -fragment checkRunView_checkRun on CheckRun { - name - status - conclusion - title - summary - permalink - detailsUrl -} - -fragment prCommitView_item on Commit { - committer { - avatarUrl - name - date - } - messageHeadline - messageBody - shortSha: abbreviatedOid - sha: oid - url -} - -fragment issueTimelineController_issue_3D8CP9 on Issue { +fragment prTimelineController_pullRequest_3D8CP9 on PullRequest { url + ...headRefForcePushedEventView_issueish timelineItems(first: $timelineCount, after: $timelineCursor) { pageInfo { endCursor @@ -608,7 +604,11 @@ fragment issueTimelineController_issue_3D8CP9 on Issue { cursor node { __typename + ...commitsView_nodes ...issueCommentView_item + ...mergedEventView_item + ...headRefForcePushedEventView_item + ...commitCommentThreadView_item ...crossReferencedEventsView_nodes ... on Node { id @@ -618,6 +618,45 @@ fragment issueTimelineController_issue_3D8CP9 on Issue { } } +fragment reviewCommentsAccumulator_reviewThread_1VbUmL on PullRequestReviewThread { + id + comments(first: $commentCount, after: $commentCursor) { + pageInfo { + hasNextPage + endCursor + } + edges { + cursor + node { + id + author { + __typename + avatarUrl + login + url + ... on Node { + id + } + } + bodyHTML + body + isMinimized + state + viewerCanReact + viewerCanUpdate + path + position + createdAt + lastEditedAt + url + authorAssociation + ...emojiReactionsController_reactable + __typename + } + } + } +} + fragment reviewSummariesAccumulator_pullRequest_2zzc96 on PullRequest { url reviews(first: $reviewCount, after: $reviewCursor) { @@ -677,45 +716,6 @@ fragment reviewThreadsAccumulator_pullRequest_CKDvj on PullRequest { } } } - -fragment reviewCommentsAccumulator_reviewThread_1VbUmL on PullRequestReviewThread { - id - comments(first: $commentCount, after: $commentCursor) { - pageInfo { - hasNextPage - endCursor - } - edges { - cursor - node { - id - author { - __typename - avatarUrl - login - url - ... on Node { - id - } - } - bodyHTML - body - isMinimized - state - viewerCanReact - viewerCanUpdate - path - position - createdAt - lastEditedAt - url - authorAssociation - ...emojiReactionsController_reactable - __typename - } - } - } -} */ const node/*: ConcreteRequest*/ = (function(){ @@ -2500,7 +2500,7 @@ return { "operationKind": "query", "name": "issueishDetailContainerQuery", "id": null, - "text": "query issueishDetailContainerQuery(\n $repoOwner: String!\n $repoName: String!\n $issueishNumber: Int!\n $timelineCount: Int!\n $timelineCursor: String\n $commitCount: Int!\n $commitCursor: String\n $reviewCount: Int!\n $reviewCursor: String\n $threadCount: Int!\n $threadCursor: String\n $commentCount: Int!\n $commentCursor: String\n $checkSuiteCount: Int!\n $checkSuiteCursor: String\n $checkRunCount: Int!\n $checkRunCursor: String\n) {\n repository(owner: $repoOwner, name: $repoName) {\n issueish: issueOrPullRequest(number: $issueishNumber) {\n __typename\n ... on PullRequest {\n ...aggregatedReviewsContainer_pullRequest_qdneZ\n }\n ... on Node {\n id\n }\n }\n ...issueishDetailController_repository_3iQpNL\n id\n }\n}\n\nfragment aggregatedReviewsContainer_pullRequest_qdneZ on PullRequest {\n id\n ...reviewSummariesAccumulator_pullRequest_2zzc96\n ...reviewThreadsAccumulator_pullRequest_CKDvj\n}\n\nfragment issueishDetailController_repository_3iQpNL on Repository {\n ...issueDetailView_repository\n ...prCheckoutController_repository\n ...prDetailView_repository\n name\n owner {\n __typename\n login\n id\n }\n issue: issueOrPullRequest(number: $issueishNumber) {\n __typename\n ... on Issue {\n title\n number\n ...issueDetailView_issue_3D8CP9\n }\n ... on Node {\n id\n }\n }\n pullRequest: issueOrPullRequest(number: $issueishNumber) {\n __typename\n ... on PullRequest {\n title\n number\n ...prCheckoutController_pullRequest\n ...prDetailView_pullRequest_1UVrY8\n }\n ... on Node {\n id\n }\n }\n}\n\nfragment issueDetailView_repository on Repository {\n id\n name\n owner {\n __typename\n login\n id\n }\n}\n\nfragment prCheckoutController_repository on Repository {\n name\n owner {\n __typename\n login\n id\n }\n}\n\nfragment prDetailView_repository on Repository {\n id\n name\n owner {\n __typename\n login\n id\n }\n}\n\nfragment issueDetailView_issue_3D8CP9 on Issue {\n id\n __typename\n url\n state\n number\n title\n bodyHTML\n author {\n __typename\n login\n avatarUrl\n url\n ... on Node {\n id\n }\n }\n ...issueTimelineController_issue_3D8CP9\n ...emojiReactionsView_reactable\n}\n\nfragment prCheckoutController_pullRequest on PullRequest {\n number\n headRefName\n headRepository {\n name\n url\n sshUrl\n owner {\n __typename\n login\n id\n }\n id\n }\n}\n\nfragment prDetailView_pullRequest_1UVrY8 on PullRequest {\n id\n __typename\n url\n isCrossRepository\n changedFiles\n state\n number\n title\n bodyHTML\n baseRefName\n headRefName\n countedCommits: commits {\n totalCount\n }\n author {\n __typename\n login\n avatarUrl\n url\n ... on Node {\n id\n }\n }\n ...prCommitsView_pullRequest_38TpXw\n ...prStatusesView_pullRequest_1oGSNs\n ...prTimelineController_pullRequest_3D8CP9\n ...emojiReactionsController_reactable\n}\n\nfragment prCommitsView_pullRequest_38TpXw on PullRequest {\n url\n commits(first: $commitCount, after: $commitCursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n cursor\n node {\n commit {\n id\n ...prCommitView_item\n }\n id\n __typename\n }\n }\n }\n}\n\nfragment prStatusesView_pullRequest_1oGSNs on PullRequest {\n id\n recentCommits: commits(last: 1) {\n edges {\n node {\n commit {\n status {\n state\n contexts {\n id\n state\n ...prStatusContextView_context\n }\n id\n }\n ...checkSuitesAccumulator_commit_1oGSNs\n id\n }\n id\n }\n }\n }\n}\n\nfragment prTimelineController_pullRequest_3D8CP9 on PullRequest {\n url\n ...headRefForcePushedEventView_issueish\n timelineItems(first: $timelineCount, after: $timelineCursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n cursor\n node {\n __typename\n ...commitsView_nodes\n ...issueCommentView_item\n ...mergedEventView_item\n ...headRefForcePushedEventView_item\n ...commitCommentThreadView_item\n ...crossReferencedEventsView_nodes\n ... on Node {\n id\n }\n }\n }\n }\n}\n\nfragment emojiReactionsController_reactable on Reactable {\n id\n ...emojiReactionsView_reactable\n}\n\nfragment emojiReactionsView_reactable on Reactable {\n id\n reactionGroups {\n content\n viewerHasReacted\n users {\n totalCount\n }\n }\n viewerCanReact\n}\n\nfragment headRefForcePushedEventView_issueish on PullRequest {\n headRefName\n headRepositoryOwner {\n __typename\n login\n id\n }\n repository {\n owner {\n __typename\n login\n id\n }\n id\n }\n}\n\nfragment commitsView_nodes on PullRequestCommit {\n commit {\n id\n author {\n name\n user {\n login\n id\n }\n }\n ...commitView_commit\n }\n}\n\nfragment issueCommentView_item on IssueComment {\n author {\n __typename\n avatarUrl\n login\n ... on Node {\n id\n }\n }\n bodyHTML\n createdAt\n url\n}\n\nfragment mergedEventView_item on MergedEvent {\n actor {\n __typename\n avatarUrl\n login\n ... on Node {\n id\n }\n }\n commit {\n oid\n id\n }\n mergeRefName\n createdAt\n}\n\nfragment headRefForcePushedEventView_item on HeadRefForcePushedEvent {\n actor {\n __typename\n avatarUrl\n login\n ... on Node {\n id\n }\n }\n beforeCommit {\n oid\n id\n }\n afterCommit {\n oid\n id\n }\n createdAt\n}\n\nfragment commitCommentThreadView_item on PullRequestCommitCommentThread {\n commit {\n oid\n id\n }\n comments(first: 100) {\n edges {\n node {\n id\n ...commitCommentView_item\n }\n }\n }\n}\n\nfragment crossReferencedEventsView_nodes on CrossReferencedEvent {\n id\n referencedAt\n isCrossRepository\n actor {\n __typename\n login\n avatarUrl\n ... on Node {\n id\n }\n }\n source {\n __typename\n ... on RepositoryNode {\n repository {\n name\n owner {\n __typename\n login\n id\n }\n id\n }\n }\n ... on Node {\n id\n }\n }\n ...crossReferencedEventView_item\n}\n\nfragment crossReferencedEventView_item on CrossReferencedEvent {\n id\n isCrossRepository\n source {\n __typename\n ... on Issue {\n number\n title\n url\n issueState: state\n }\n ... on PullRequest {\n number\n title\n url\n prState: state\n }\n ... on RepositoryNode {\n repository {\n name\n isPrivate\n owner {\n __typename\n login\n id\n }\n id\n }\n }\n ... on Node {\n id\n }\n }\n}\n\nfragment commitCommentView_item on CommitComment {\n author {\n __typename\n login\n avatarUrl\n ... on Node {\n id\n }\n }\n commit {\n oid\n id\n }\n bodyHTML\n createdAt\n path\n position\n}\n\nfragment commitView_commit on Commit {\n author {\n name\n avatarUrl\n user {\n login\n id\n }\n }\n committer {\n name\n avatarUrl\n user {\n login\n id\n }\n }\n authoredByCommitter\n sha: oid\n message\n messageHeadlineHTML\n commitUrl\n}\n\nfragment prStatusContextView_context on StatusContext {\n context\n description\n state\n targetUrl\n}\n\nfragment checkSuitesAccumulator_commit_1oGSNs on Commit {\n id\n checkSuites(first: $checkSuiteCount, after: $checkSuiteCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n status\n conclusion\n ...checkSuiteView_checkSuite\n ...checkRunsAccumulator_checkSuite_Rvfr1\n __typename\n }\n }\n }\n}\n\nfragment checkSuiteView_checkSuite on CheckSuite {\n app {\n name\n id\n }\n status\n conclusion\n}\n\nfragment checkRunsAccumulator_checkSuite_Rvfr1 on CheckSuite {\n id\n checkRuns(first: $checkRunCount, after: $checkRunCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n status\n conclusion\n ...checkRunView_checkRun\n __typename\n }\n }\n }\n}\n\nfragment checkRunView_checkRun on CheckRun {\n name\n status\n conclusion\n title\n summary\n permalink\n detailsUrl\n}\n\nfragment prCommitView_item on Commit {\n committer {\n avatarUrl\n name\n date\n }\n messageHeadline\n messageBody\n shortSha: abbreviatedOid\n sha: oid\n url\n}\n\nfragment issueTimelineController_issue_3D8CP9 on Issue {\n url\n timelineItems(first: $timelineCount, after: $timelineCursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n cursor\n node {\n __typename\n ...issueCommentView_item\n ...crossReferencedEventsView_nodes\n ... on Node {\n id\n }\n }\n }\n }\n}\n\nfragment reviewSummariesAccumulator_pullRequest_2zzc96 on PullRequest {\n url\n reviews(first: $reviewCount, after: $reviewCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n body\n bodyHTML\n state\n submittedAt\n lastEditedAt\n url\n author {\n __typename\n login\n avatarUrl\n url\n ... on Node {\n id\n }\n }\n viewerCanUpdate\n authorAssociation\n ...emojiReactionsController_reactable\n __typename\n }\n }\n }\n}\n\nfragment reviewThreadsAccumulator_pullRequest_CKDvj on PullRequest {\n url\n reviewThreads(first: $threadCount, after: $threadCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n isResolved\n resolvedBy {\n login\n id\n }\n viewerCanResolve\n viewerCanUnresolve\n ...reviewCommentsAccumulator_reviewThread_1VbUmL\n __typename\n }\n }\n }\n}\n\nfragment reviewCommentsAccumulator_reviewThread_1VbUmL on PullRequestReviewThread {\n id\n comments(first: $commentCount, after: $commentCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n author {\n __typename\n avatarUrl\n login\n url\n ... on Node {\n id\n }\n }\n bodyHTML\n body\n isMinimized\n state\n viewerCanReact\n viewerCanUpdate\n path\n position\n createdAt\n lastEditedAt\n url\n authorAssociation\n ...emojiReactionsController_reactable\n __typename\n }\n }\n }\n}\n", + "text": "query issueishDetailContainerQuery(\n $repoOwner: String!\n $repoName: String!\n $issueishNumber: Int!\n $timelineCount: Int!\n $timelineCursor: String\n $commitCount: Int!\n $commitCursor: String\n $reviewCount: Int!\n $reviewCursor: String\n $threadCount: Int!\n $threadCursor: String\n $commentCount: Int!\n $commentCursor: String\n $checkSuiteCount: Int!\n $checkSuiteCursor: String\n $checkRunCount: Int!\n $checkRunCursor: String\n) {\n repository(owner: $repoOwner, name: $repoName) {\n issueish: issueOrPullRequest(number: $issueishNumber) {\n __typename\n ... on PullRequest {\n ...aggregatedReviewsContainer_pullRequest_qdneZ\n }\n ... on Node {\n id\n }\n }\n ...issueishDetailController_repository_3iQpNL\n id\n }\n}\n\nfragment aggregatedReviewsContainer_pullRequest_qdneZ on PullRequest {\n id\n ...reviewSummariesAccumulator_pullRequest_2zzc96\n ...reviewThreadsAccumulator_pullRequest_CKDvj\n}\n\nfragment checkRunView_checkRun on CheckRun {\n name\n status\n conclusion\n title\n summary\n permalink\n detailsUrl\n}\n\nfragment checkRunsAccumulator_checkSuite_Rvfr1 on CheckSuite {\n id\n checkRuns(first: $checkRunCount, after: $checkRunCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n status\n conclusion\n ...checkRunView_checkRun\n __typename\n }\n }\n }\n}\n\nfragment checkSuiteView_checkSuite on CheckSuite {\n app {\n name\n id\n }\n status\n conclusion\n}\n\nfragment checkSuitesAccumulator_commit_1oGSNs on Commit {\n id\n checkSuites(first: $checkSuiteCount, after: $checkSuiteCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n status\n conclusion\n ...checkSuiteView_checkSuite\n ...checkRunsAccumulator_checkSuite_Rvfr1\n __typename\n }\n }\n }\n}\n\nfragment commitCommentThreadView_item on PullRequestCommitCommentThread {\n commit {\n oid\n id\n }\n comments(first: 100) {\n edges {\n node {\n id\n ...commitCommentView_item\n }\n }\n }\n}\n\nfragment commitCommentView_item on CommitComment {\n author {\n __typename\n login\n avatarUrl\n ... on Node {\n id\n }\n }\n commit {\n oid\n id\n }\n bodyHTML\n createdAt\n path\n position\n}\n\nfragment commitView_commit on Commit {\n author {\n name\n avatarUrl\n user {\n login\n id\n }\n }\n committer {\n name\n avatarUrl\n user {\n login\n id\n }\n }\n authoredByCommitter\n sha: oid\n message\n messageHeadlineHTML\n commitUrl\n}\n\nfragment commitsView_nodes on PullRequestCommit {\n commit {\n id\n author {\n name\n user {\n login\n id\n }\n }\n ...commitView_commit\n }\n}\n\nfragment crossReferencedEventView_item on CrossReferencedEvent {\n id\n isCrossRepository\n source {\n __typename\n ... on Issue {\n number\n title\n url\n issueState: state\n }\n ... on PullRequest {\n number\n title\n url\n prState: state\n }\n ... on RepositoryNode {\n repository {\n name\n isPrivate\n owner {\n __typename\n login\n id\n }\n id\n }\n }\n ... on Node {\n id\n }\n }\n}\n\nfragment crossReferencedEventsView_nodes on CrossReferencedEvent {\n id\n referencedAt\n isCrossRepository\n actor {\n __typename\n login\n avatarUrl\n ... on Node {\n id\n }\n }\n source {\n __typename\n ... on RepositoryNode {\n repository {\n name\n owner {\n __typename\n login\n id\n }\n id\n }\n }\n ... on Node {\n id\n }\n }\n ...crossReferencedEventView_item\n}\n\nfragment emojiReactionsController_reactable on Reactable {\n id\n ...emojiReactionsView_reactable\n}\n\nfragment emojiReactionsView_reactable on Reactable {\n id\n reactionGroups {\n content\n viewerHasReacted\n users {\n totalCount\n }\n }\n viewerCanReact\n}\n\nfragment headRefForcePushedEventView_issueish on PullRequest {\n headRefName\n headRepositoryOwner {\n __typename\n login\n id\n }\n repository {\n owner {\n __typename\n login\n id\n }\n id\n }\n}\n\nfragment headRefForcePushedEventView_item on HeadRefForcePushedEvent {\n actor {\n __typename\n avatarUrl\n login\n ... on Node {\n id\n }\n }\n beforeCommit {\n oid\n id\n }\n afterCommit {\n oid\n id\n }\n createdAt\n}\n\nfragment issueCommentView_item on IssueComment {\n author {\n __typename\n avatarUrl\n login\n ... on Node {\n id\n }\n }\n bodyHTML\n createdAt\n url\n}\n\nfragment issueDetailView_issue_3D8CP9 on Issue {\n id\n __typename\n url\n state\n number\n title\n bodyHTML\n author {\n __typename\n login\n avatarUrl\n url\n ... on Node {\n id\n }\n }\n ...issueTimelineController_issue_3D8CP9\n ...emojiReactionsView_reactable\n}\n\nfragment issueDetailView_repository on Repository {\n id\n name\n owner {\n __typename\n login\n id\n }\n}\n\nfragment issueTimelineController_issue_3D8CP9 on Issue {\n url\n timelineItems(first: $timelineCount, after: $timelineCursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n cursor\n node {\n __typename\n ...issueCommentView_item\n ...crossReferencedEventsView_nodes\n ... on Node {\n id\n }\n }\n }\n }\n}\n\nfragment issueishDetailController_repository_3iQpNL on Repository {\n ...issueDetailView_repository\n ...prCheckoutController_repository\n ...prDetailView_repository\n name\n owner {\n __typename\n login\n id\n }\n issue: issueOrPullRequest(number: $issueishNumber) {\n __typename\n ... on Issue {\n title\n number\n ...issueDetailView_issue_3D8CP9\n }\n ... on Node {\n id\n }\n }\n pullRequest: issueOrPullRequest(number: $issueishNumber) {\n __typename\n ... on PullRequest {\n title\n number\n ...prCheckoutController_pullRequest\n ...prDetailView_pullRequest_1UVrY8\n }\n ... on Node {\n id\n }\n }\n}\n\nfragment mergedEventView_item on MergedEvent {\n actor {\n __typename\n avatarUrl\n login\n ... on Node {\n id\n }\n }\n commit {\n oid\n id\n }\n mergeRefName\n createdAt\n}\n\nfragment prCheckoutController_pullRequest on PullRequest {\n number\n headRefName\n headRepository {\n name\n url\n sshUrl\n owner {\n __typename\n login\n id\n }\n id\n }\n}\n\nfragment prCheckoutController_repository on Repository {\n name\n owner {\n __typename\n login\n id\n }\n}\n\nfragment prCommitView_item on Commit {\n committer {\n avatarUrl\n name\n date\n }\n messageHeadline\n messageBody\n shortSha: abbreviatedOid\n sha: oid\n url\n}\n\nfragment prCommitsView_pullRequest_38TpXw on PullRequest {\n url\n commits(first: $commitCount, after: $commitCursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n cursor\n node {\n commit {\n id\n ...prCommitView_item\n }\n id\n __typename\n }\n }\n }\n}\n\nfragment prDetailView_pullRequest_1UVrY8 on PullRequest {\n id\n __typename\n url\n isCrossRepository\n changedFiles\n state\n number\n title\n bodyHTML\n baseRefName\n headRefName\n countedCommits: commits {\n totalCount\n }\n author {\n __typename\n login\n avatarUrl\n url\n ... on Node {\n id\n }\n }\n ...prCommitsView_pullRequest_38TpXw\n ...prStatusesView_pullRequest_1oGSNs\n ...prTimelineController_pullRequest_3D8CP9\n ...emojiReactionsController_reactable\n}\n\nfragment prDetailView_repository on Repository {\n id\n name\n owner {\n __typename\n login\n id\n }\n}\n\nfragment prStatusContextView_context on StatusContext {\n context\n description\n state\n targetUrl\n}\n\nfragment prStatusesView_pullRequest_1oGSNs on PullRequest {\n id\n recentCommits: commits(last: 1) {\n edges {\n node {\n commit {\n status {\n state\n contexts {\n id\n state\n ...prStatusContextView_context\n }\n id\n }\n ...checkSuitesAccumulator_commit_1oGSNs\n id\n }\n id\n }\n }\n }\n}\n\nfragment prTimelineController_pullRequest_3D8CP9 on PullRequest {\n url\n ...headRefForcePushedEventView_issueish\n timelineItems(first: $timelineCount, after: $timelineCursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n cursor\n node {\n __typename\n ...commitsView_nodes\n ...issueCommentView_item\n ...mergedEventView_item\n ...headRefForcePushedEventView_item\n ...commitCommentThreadView_item\n ...crossReferencedEventsView_nodes\n ... on Node {\n id\n }\n }\n }\n }\n}\n\nfragment reviewCommentsAccumulator_reviewThread_1VbUmL on PullRequestReviewThread {\n id\n comments(first: $commentCount, after: $commentCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n author {\n __typename\n avatarUrl\n login\n url\n ... on Node {\n id\n }\n }\n bodyHTML\n body\n isMinimized\n state\n viewerCanReact\n viewerCanUpdate\n path\n position\n createdAt\n lastEditedAt\n url\n authorAssociation\n ...emojiReactionsController_reactable\n __typename\n }\n }\n }\n}\n\nfragment reviewSummariesAccumulator_pullRequest_2zzc96 on PullRequest {\n url\n reviews(first: $reviewCount, after: $reviewCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n body\n bodyHTML\n state\n submittedAt\n lastEditedAt\n url\n author {\n __typename\n login\n avatarUrl\n url\n ... on Node {\n id\n }\n }\n viewerCanUpdate\n authorAssociation\n ...emojiReactionsController_reactable\n __typename\n }\n }\n }\n}\n\nfragment reviewThreadsAccumulator_pullRequest_CKDvj on PullRequest {\n url\n reviewThreads(first: $threadCount, after: $threadCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n isResolved\n resolvedBy {\n login\n id\n }\n viewerCanResolve\n viewerCanUnresolve\n ...reviewCommentsAccumulator_reviewThread_1VbUmL\n __typename\n }\n }\n }\n}\n", "metadata": {} } }; diff --git a/lib/containers/__generated__/issueishSearchContainerQuery.graphql.js b/lib/containers/__generated__/issueishSearchContainerQuery.graphql.js index eee782d198..db55294f7e 100644 --- a/lib/containers/__generated__/issueishSearchContainerQuery.graphql.js +++ b/lib/containers/__generated__/issueishSearchContainerQuery.graphql.js @@ -1,6 +1,6 @@ /** * @flow - * @relayHash 4ff9b711e1716eb7eb3d3ae3a15eb77e + * @relayHash e417ad69b38ec06ea8e246355192c05a */ /* eslint-disable */ @@ -54,50 +54,19 @@ query issueishSearchContainerQuery( } } -fragment issueishListController_results_1oGSNs on PullRequest { - number +fragment checkRunView_checkRun on CheckRun { + name + status + conclusion title - url - author { - __typename - login - avatarUrl - ... on Node { - id - } - } - createdAt - headRefName - repository { - id - name - owner { - __typename - login - id - } - } - commits(last: 1) { - nodes { - commit { - status { - contexts { - id - state - } - id - } - ...checkSuitesAccumulator_commit_1oGSNs - id - } - id - } - } + summary + permalink + detailsUrl } -fragment checkSuitesAccumulator_commit_1oGSNs on Commit { +fragment checkRunsAccumulator_checkSuite_Rvfr1 on CheckSuite { id - checkSuites(first: $checkSuiteCount, after: $checkSuiteCursor) { + checkRuns(first: $checkRunCount, after: $checkRunCursor) { pageInfo { hasNextPage endCursor @@ -108,8 +77,7 @@ fragment checkSuitesAccumulator_commit_1oGSNs on Commit { id status conclusion - ...checkSuiteView_checkSuite - ...checkRunsAccumulator_checkSuite_Rvfr1 + ...checkRunView_checkRun __typename } } @@ -125,9 +93,9 @@ fragment checkSuiteView_checkSuite on CheckSuite { conclusion } -fragment checkRunsAccumulator_checkSuite_Rvfr1 on CheckSuite { +fragment checkSuitesAccumulator_commit_1oGSNs on Commit { id - checkRuns(first: $checkRunCount, after: $checkRunCursor) { + checkSuites(first: $checkSuiteCount, after: $checkSuiteCursor) { pageInfo { hasNextPage endCursor @@ -138,21 +106,53 @@ fragment checkRunsAccumulator_checkSuite_Rvfr1 on CheckSuite { id status conclusion - ...checkRunView_checkRun + ...checkSuiteView_checkSuite + ...checkRunsAccumulator_checkSuite_Rvfr1 __typename } } } } -fragment checkRunView_checkRun on CheckRun { - name - status - conclusion +fragment issueishListController_results_1oGSNs on PullRequest { + number title - summary - permalink - detailsUrl + url + author { + __typename + login + avatarUrl + ... on Node { + id + } + } + createdAt + headRefName + repository { + id + name + owner { + __typename + login + id + } + } + commits(last: 1) { + nodes { + commit { + status { + contexts { + id + state + } + id + } + ...checkSuitesAccumulator_commit_1oGSNs + id + } + id + } + } } */ @@ -707,7 +707,7 @@ return { "operationKind": "query", "name": "issueishSearchContainerQuery", "id": null, - "text": "query issueishSearchContainerQuery(\n $query: String!\n $first: Int!\n $checkSuiteCount: Int!\n $checkSuiteCursor: String\n $checkRunCount: Int!\n $checkRunCursor: String\n) {\n search(first: $first, query: $query, type: ISSUE) {\n issueCount\n nodes {\n __typename\n ...issueishListController_results_1oGSNs\n ... on Node {\n id\n }\n }\n }\n}\n\nfragment issueishListController_results_1oGSNs on PullRequest {\n number\n title\n url\n author {\n __typename\n login\n avatarUrl\n ... on Node {\n id\n }\n }\n createdAt\n headRefName\n repository {\n id\n name\n owner {\n __typename\n login\n id\n }\n }\n commits(last: 1) {\n nodes {\n commit {\n status {\n contexts {\n id\n state\n }\n id\n }\n ...checkSuitesAccumulator_commit_1oGSNs\n id\n }\n id\n }\n }\n}\n\nfragment checkSuitesAccumulator_commit_1oGSNs on Commit {\n id\n checkSuites(first: $checkSuiteCount, after: $checkSuiteCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n status\n conclusion\n ...checkSuiteView_checkSuite\n ...checkRunsAccumulator_checkSuite_Rvfr1\n __typename\n }\n }\n }\n}\n\nfragment checkSuiteView_checkSuite on CheckSuite {\n app {\n name\n id\n }\n status\n conclusion\n}\n\nfragment checkRunsAccumulator_checkSuite_Rvfr1 on CheckSuite {\n id\n checkRuns(first: $checkRunCount, after: $checkRunCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n status\n conclusion\n ...checkRunView_checkRun\n __typename\n }\n }\n }\n}\n\nfragment checkRunView_checkRun on CheckRun {\n name\n status\n conclusion\n title\n summary\n permalink\n detailsUrl\n}\n", + "text": "query issueishSearchContainerQuery(\n $query: String!\n $first: Int!\n $checkSuiteCount: Int!\n $checkSuiteCursor: String\n $checkRunCount: Int!\n $checkRunCursor: String\n) {\n search(first: $first, query: $query, type: ISSUE) {\n issueCount\n nodes {\n __typename\n ...issueishListController_results_1oGSNs\n ... on Node {\n id\n }\n }\n }\n}\n\nfragment checkRunView_checkRun on CheckRun {\n name\n status\n conclusion\n title\n summary\n permalink\n detailsUrl\n}\n\nfragment checkRunsAccumulator_checkSuite_Rvfr1 on CheckSuite {\n id\n checkRuns(first: $checkRunCount, after: $checkRunCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n status\n conclusion\n ...checkRunView_checkRun\n __typename\n }\n }\n }\n}\n\nfragment checkSuiteView_checkSuite on CheckSuite {\n app {\n name\n id\n }\n status\n conclusion\n}\n\nfragment checkSuitesAccumulator_commit_1oGSNs on Commit {\n id\n checkSuites(first: $checkSuiteCount, after: $checkSuiteCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n status\n conclusion\n ...checkSuiteView_checkSuite\n ...checkRunsAccumulator_checkSuite_Rvfr1\n __typename\n }\n }\n }\n}\n\nfragment issueishListController_results_1oGSNs on PullRequest {\n number\n title\n url\n author {\n __typename\n login\n avatarUrl\n ... on Node {\n id\n }\n }\n createdAt\n headRefName\n repository {\n id\n name\n owner {\n __typename\n login\n id\n }\n }\n commits(last: 1) {\n nodes {\n commit {\n status {\n contexts {\n id\n state\n }\n id\n }\n ...checkSuitesAccumulator_commit_1oGSNs\n id\n }\n id\n }\n }\n}\n", "metadata": {} } }; diff --git a/lib/containers/__generated__/reviewsContainerQuery.graphql.js b/lib/containers/__generated__/reviewsContainerQuery.graphql.js index 5d7c973fac..c1cde41d65 100644 --- a/lib/containers/__generated__/reviewsContainerQuery.graphql.js +++ b/lib/containers/__generated__/reviewsContainerQuery.graphql.js @@ -1,6 +1,6 @@ /** * @flow - * @relayHash 77a45108e1d6daa4a300498cebb15219 + * @relayHash 1f2dd1b13010dfeb3407599ff1b7e83a */ /* eslint-disable */ @@ -71,25 +71,27 @@ query reviewsContainerQuery( } } -fragment reviewsController_repository on Repository { - ...prCheckoutController_repository -} - fragment aggregatedReviewsContainer_pullRequest_qdneZ on PullRequest { id ...reviewSummariesAccumulator_pullRequest_2zzc96 ...reviewThreadsAccumulator_pullRequest_CKDvj } -fragment reviewsController_pullRequest on PullRequest { +fragment emojiReactionsController_reactable on Reactable { id - ...prCheckoutController_pullRequest + ...emojiReactionsView_reactable } -fragment reviewsController_viewer on User { +fragment emojiReactionsView_reactable on Reactable { id - login - avatarUrl + reactionGroups { + content + viewerHasReacted + users { + totalCount + } + } + viewerCanReact } fragment prCheckoutController_pullRequest on PullRequest { @@ -108,6 +110,54 @@ fragment prCheckoutController_pullRequest on PullRequest { } } +fragment prCheckoutController_repository on Repository { + name + owner { + __typename + login + id + } +} + +fragment reviewCommentsAccumulator_reviewThread_1VbUmL on PullRequestReviewThread { + id + comments(first: $commentCount, after: $commentCursor) { + pageInfo { + hasNextPage + endCursor + } + edges { + cursor + node { + id + author { + __typename + avatarUrl + login + url + ... on Node { + id + } + } + bodyHTML + body + isMinimized + state + viewerCanReact + viewerCanUpdate + path + position + createdAt + lastEditedAt + url + authorAssociation + ...emojiReactionsController_reactable + __typename + } + } + } +} + fragment reviewSummariesAccumulator_pullRequest_2zzc96 on PullRequest { url reviews(first: $reviewCount, after: $reviewCursor) { @@ -168,69 +218,19 @@ fragment reviewThreadsAccumulator_pullRequest_CKDvj on PullRequest { } } -fragment reviewCommentsAccumulator_reviewThread_1VbUmL on PullRequestReviewThread { +fragment reviewsController_pullRequest on PullRequest { id - comments(first: $commentCount, after: $commentCursor) { - pageInfo { - hasNextPage - endCursor - } - edges { - cursor - node { - id - author { - __typename - avatarUrl - login - url - ... on Node { - id - } - } - bodyHTML - body - isMinimized - state - viewerCanReact - viewerCanUpdate - path - position - createdAt - lastEditedAt - url - authorAssociation - ...emojiReactionsController_reactable - __typename - } - } - } + ...prCheckoutController_pullRequest } -fragment emojiReactionsController_reactable on Reactable { - id - ...emojiReactionsView_reactable +fragment reviewsController_repository on Repository { + ...prCheckoutController_repository } -fragment emojiReactionsView_reactable on Reactable { +fragment reviewsController_viewer on User { id - reactionGroups { - content - viewerHasReacted - users { - totalCount - } - } - viewerCanReact -} - -fragment prCheckoutController_repository on Repository { - name - owner { - __typename - login - id - } + login + avatarUrl } */ @@ -975,7 +975,7 @@ return { "operationKind": "query", "name": "reviewsContainerQuery", "id": null, - "text": "query reviewsContainerQuery(\n $repoOwner: String!\n $repoName: String!\n $prNumber: Int!\n $reviewCount: Int!\n $reviewCursor: String\n $threadCount: Int!\n $threadCursor: String\n $commentCount: Int!\n $commentCursor: String\n) {\n repository(owner: $repoOwner, name: $repoName) {\n ...reviewsController_repository\n pullRequest(number: $prNumber) {\n headRefOid\n ...aggregatedReviewsContainer_pullRequest_qdneZ\n ...reviewsController_pullRequest\n id\n }\n id\n }\n viewer {\n ...reviewsController_viewer\n id\n }\n}\n\nfragment reviewsController_repository on Repository {\n ...prCheckoutController_repository\n}\n\nfragment aggregatedReviewsContainer_pullRequest_qdneZ on PullRequest {\n id\n ...reviewSummariesAccumulator_pullRequest_2zzc96\n ...reviewThreadsAccumulator_pullRequest_CKDvj\n}\n\nfragment reviewsController_pullRequest on PullRequest {\n id\n ...prCheckoutController_pullRequest\n}\n\nfragment reviewsController_viewer on User {\n id\n login\n avatarUrl\n}\n\nfragment prCheckoutController_pullRequest on PullRequest {\n number\n headRefName\n headRepository {\n name\n url\n sshUrl\n owner {\n __typename\n login\n id\n }\n id\n }\n}\n\nfragment reviewSummariesAccumulator_pullRequest_2zzc96 on PullRequest {\n url\n reviews(first: $reviewCount, after: $reviewCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n body\n bodyHTML\n state\n submittedAt\n lastEditedAt\n url\n author {\n __typename\n login\n avatarUrl\n url\n ... on Node {\n id\n }\n }\n viewerCanUpdate\n authorAssociation\n ...emojiReactionsController_reactable\n __typename\n }\n }\n }\n}\n\nfragment reviewThreadsAccumulator_pullRequest_CKDvj on PullRequest {\n url\n reviewThreads(first: $threadCount, after: $threadCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n isResolved\n resolvedBy {\n login\n id\n }\n viewerCanResolve\n viewerCanUnresolve\n ...reviewCommentsAccumulator_reviewThread_1VbUmL\n __typename\n }\n }\n }\n}\n\nfragment reviewCommentsAccumulator_reviewThread_1VbUmL on PullRequestReviewThread {\n id\n comments(first: $commentCount, after: $commentCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n author {\n __typename\n avatarUrl\n login\n url\n ... on Node {\n id\n }\n }\n bodyHTML\n body\n isMinimized\n state\n viewerCanReact\n viewerCanUpdate\n path\n position\n createdAt\n lastEditedAt\n url\n authorAssociation\n ...emojiReactionsController_reactable\n __typename\n }\n }\n }\n}\n\nfragment emojiReactionsController_reactable on Reactable {\n id\n ...emojiReactionsView_reactable\n}\n\nfragment emojiReactionsView_reactable on Reactable {\n id\n reactionGroups {\n content\n viewerHasReacted\n users {\n totalCount\n }\n }\n viewerCanReact\n}\n\nfragment prCheckoutController_repository on Repository {\n name\n owner {\n __typename\n login\n id\n }\n}\n", + "text": "query reviewsContainerQuery(\n $repoOwner: String!\n $repoName: String!\n $prNumber: Int!\n $reviewCount: Int!\n $reviewCursor: String\n $threadCount: Int!\n $threadCursor: String\n $commentCount: Int!\n $commentCursor: String\n) {\n repository(owner: $repoOwner, name: $repoName) {\n ...reviewsController_repository\n pullRequest(number: $prNumber) {\n headRefOid\n ...aggregatedReviewsContainer_pullRequest_qdneZ\n ...reviewsController_pullRequest\n id\n }\n id\n }\n viewer {\n ...reviewsController_viewer\n id\n }\n}\n\nfragment aggregatedReviewsContainer_pullRequest_qdneZ on PullRequest {\n id\n ...reviewSummariesAccumulator_pullRequest_2zzc96\n ...reviewThreadsAccumulator_pullRequest_CKDvj\n}\n\nfragment emojiReactionsController_reactable on Reactable {\n id\n ...emojiReactionsView_reactable\n}\n\nfragment emojiReactionsView_reactable on Reactable {\n id\n reactionGroups {\n content\n viewerHasReacted\n users {\n totalCount\n }\n }\n viewerCanReact\n}\n\nfragment prCheckoutController_pullRequest on PullRequest {\n number\n headRefName\n headRepository {\n name\n url\n sshUrl\n owner {\n __typename\n login\n id\n }\n id\n }\n}\n\nfragment prCheckoutController_repository on Repository {\n name\n owner {\n __typename\n login\n id\n }\n}\n\nfragment reviewCommentsAccumulator_reviewThread_1VbUmL on PullRequestReviewThread {\n id\n comments(first: $commentCount, after: $commentCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n author {\n __typename\n avatarUrl\n login\n url\n ... on Node {\n id\n }\n }\n bodyHTML\n body\n isMinimized\n state\n viewerCanReact\n viewerCanUpdate\n path\n position\n createdAt\n lastEditedAt\n url\n authorAssociation\n ...emojiReactionsController_reactable\n __typename\n }\n }\n }\n}\n\nfragment reviewSummariesAccumulator_pullRequest_2zzc96 on PullRequest {\n url\n reviews(first: $reviewCount, after: $reviewCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n body\n bodyHTML\n state\n submittedAt\n lastEditedAt\n url\n author {\n __typename\n login\n avatarUrl\n url\n ... on Node {\n id\n }\n }\n viewerCanUpdate\n authorAssociation\n ...emojiReactionsController_reactable\n __typename\n }\n }\n }\n}\n\nfragment reviewThreadsAccumulator_pullRequest_CKDvj on PullRequest {\n url\n reviewThreads(first: $threadCount, after: $threadCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n isResolved\n resolvedBy {\n login\n id\n }\n viewerCanResolve\n viewerCanUnresolve\n ...reviewCommentsAccumulator_reviewThread_1VbUmL\n __typename\n }\n }\n }\n}\n\nfragment reviewsController_pullRequest on PullRequest {\n id\n ...prCheckoutController_pullRequest\n}\n\nfragment reviewsController_repository on Repository {\n ...prCheckoutController_repository\n}\n\nfragment reviewsController_viewer on User {\n id\n login\n avatarUrl\n}\n", "metadata": {} } }; diff --git a/lib/containers/accumulators/__generated__/checkRunsAccumulatorQuery.graphql.js b/lib/containers/accumulators/__generated__/checkRunsAccumulatorQuery.graphql.js index bee99daff1..008ca0f07b 100644 --- a/lib/containers/accumulators/__generated__/checkRunsAccumulatorQuery.graphql.js +++ b/lib/containers/accumulators/__generated__/checkRunsAccumulatorQuery.graphql.js @@ -1,6 +1,6 @@ /** * @flow - * @relayHash 02aaf9415bc5094d60d46842d42c1206 + * @relayHash 0a5804395d7c847efc0a27cdb35910b1 */ /* eslint-disable */ @@ -42,6 +42,16 @@ query checkRunsAccumulatorQuery( } } +fragment checkRunView_checkRun on CheckRun { + name + status + conclusion + title + summary + permalink + detailsUrl +} + fragment checkRunsAccumulator_checkSuite_Rvfr1 on CheckSuite { id checkRuns(first: $checkRunCount, after: $checkRunCursor) { @@ -61,16 +71,6 @@ fragment checkRunsAccumulator_checkSuite_Rvfr1 on CheckSuite { } } } - -fragment checkRunView_checkRun on CheckRun { - name - status - conclusion - title - summary - permalink - detailsUrl -} */ const node/*: ConcreteRequest*/ = (function(){ @@ -326,7 +326,7 @@ return { "operationKind": "query", "name": "checkRunsAccumulatorQuery", "id": null, - "text": "query checkRunsAccumulatorQuery(\n $id: ID!\n $checkRunCount: Int!\n $checkRunCursor: String\n) {\n node(id: $id) {\n __typename\n ... on CheckSuite {\n ...checkRunsAccumulator_checkSuite_Rvfr1\n }\n id\n }\n}\n\nfragment checkRunsAccumulator_checkSuite_Rvfr1 on CheckSuite {\n id\n checkRuns(first: $checkRunCount, after: $checkRunCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n status\n conclusion\n ...checkRunView_checkRun\n __typename\n }\n }\n }\n}\n\nfragment checkRunView_checkRun on CheckRun {\n name\n status\n conclusion\n title\n summary\n permalink\n detailsUrl\n}\n", + "text": "query checkRunsAccumulatorQuery(\n $id: ID!\n $checkRunCount: Int!\n $checkRunCursor: String\n) {\n node(id: $id) {\n __typename\n ... on CheckSuite {\n ...checkRunsAccumulator_checkSuite_Rvfr1\n }\n id\n }\n}\n\nfragment checkRunView_checkRun on CheckRun {\n name\n status\n conclusion\n title\n summary\n permalink\n detailsUrl\n}\n\nfragment checkRunsAccumulator_checkSuite_Rvfr1 on CheckSuite {\n id\n checkRuns(first: $checkRunCount, after: $checkRunCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n status\n conclusion\n ...checkRunView_checkRun\n __typename\n }\n }\n }\n}\n", "metadata": {} } }; diff --git a/lib/containers/accumulators/__generated__/checkRunsAccumulator_checkSuite.graphql.js b/lib/containers/accumulators/__generated__/checkRunsAccumulator_checkSuite.graphql.js index 6c77766c49..ceec76c168 100644 --- a/lib/containers/accumulators/__generated__/checkRunsAccumulator_checkSuite.graphql.js +++ b/lib/containers/accumulators/__generated__/checkRunsAccumulator_checkSuite.graphql.js @@ -9,7 +9,7 @@ /*:: import type { ReaderFragment } from 'relay-runtime'; type checkRunView_checkRun$ref = any; -export type CheckConclusionState = "ACTION_REQUIRED" | "CANCELLED" | "FAILURE" | "NEUTRAL" | "SUCCESS" | "TIMED_OUT" | "%future added value"; +export type CheckConclusionState = "ACTION_REQUIRED" | "CANCELLED" | "FAILURE" | "NEUTRAL" | "SKIPPED" | "STALE" | "STARTUP_FAILURE" | "SUCCESS" | "TIMED_OUT" | "%future added value"; export type CheckStatusState = "COMPLETED" | "IN_PROGRESS" | "QUEUED" | "REQUESTED" | "%future added value"; import type { FragmentReference } from "relay-runtime"; declare export opaque type checkRunsAccumulator_checkSuite$ref: FragmentReference; diff --git a/lib/containers/accumulators/__generated__/checkSuitesAccumulatorQuery.graphql.js b/lib/containers/accumulators/__generated__/checkSuitesAccumulatorQuery.graphql.js index 50eb1bfe8e..0fbe000d07 100644 --- a/lib/containers/accumulators/__generated__/checkSuitesAccumulatorQuery.graphql.js +++ b/lib/containers/accumulators/__generated__/checkSuitesAccumulatorQuery.graphql.js @@ -1,6 +1,6 @@ /** * @flow - * @relayHash a7dd5634fc91c829036616f04cc09090 + * @relayHash 82a4dc1cfbeddf93b9ee378148cff9ce */ /* eslint-disable */ @@ -44,9 +44,19 @@ query checkSuitesAccumulatorQuery( } } -fragment checkSuitesAccumulator_commit_4ncEVO on Commit { +fragment checkRunView_checkRun on CheckRun { + name + status + conclusion + title + summary + permalink + detailsUrl +} + +fragment checkRunsAccumulator_checkSuite_2YXw6r on CheckSuite { id - checkSuites(first: $checkSuiteCount, after: $checkSuiteCursor) { + checkRuns(first: $checkRunCount) { pageInfo { hasNextPage endCursor @@ -57,8 +67,7 @@ fragment checkSuitesAccumulator_commit_4ncEVO on Commit { id status conclusion - ...checkSuiteView_checkSuite - ...checkRunsAccumulator_checkSuite_2YXw6r + ...checkRunView_checkRun __typename } } @@ -74,9 +83,9 @@ fragment checkSuiteView_checkSuite on CheckSuite { conclusion } -fragment checkRunsAccumulator_checkSuite_2YXw6r on CheckSuite { +fragment checkSuitesAccumulator_commit_4ncEVO on Commit { id - checkRuns(first: $checkRunCount) { + checkSuites(first: $checkSuiteCount, after: $checkSuiteCursor) { pageInfo { hasNextPage endCursor @@ -87,22 +96,13 @@ fragment checkRunsAccumulator_checkSuite_2YXw6r on CheckSuite { id status conclusion - ...checkRunView_checkRun + ...checkSuiteView_checkSuite + ...checkRunsAccumulator_checkSuite_2YXw6r __typename } } } } - -fragment checkRunView_checkRun on CheckRun { - name - status - conclusion - title - summary - permalink - detailsUrl -} */ const node/*: ConcreteRequest*/ = (function(){ @@ -442,7 +442,7 @@ return { "operationKind": "query", "name": "checkSuitesAccumulatorQuery", "id": null, - "text": "query checkSuitesAccumulatorQuery(\n $id: ID!\n $checkSuiteCount: Int!\n $checkSuiteCursor: String\n $checkRunCount: Int!\n) {\n node(id: $id) {\n __typename\n ... on Commit {\n ...checkSuitesAccumulator_commit_4ncEVO\n }\n id\n }\n}\n\nfragment checkSuitesAccumulator_commit_4ncEVO on Commit {\n id\n checkSuites(first: $checkSuiteCount, after: $checkSuiteCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n status\n conclusion\n ...checkSuiteView_checkSuite\n ...checkRunsAccumulator_checkSuite_2YXw6r\n __typename\n }\n }\n }\n}\n\nfragment checkSuiteView_checkSuite on CheckSuite {\n app {\n name\n id\n }\n status\n conclusion\n}\n\nfragment checkRunsAccumulator_checkSuite_2YXw6r on CheckSuite {\n id\n checkRuns(first: $checkRunCount) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n status\n conclusion\n ...checkRunView_checkRun\n __typename\n }\n }\n }\n}\n\nfragment checkRunView_checkRun on CheckRun {\n name\n status\n conclusion\n title\n summary\n permalink\n detailsUrl\n}\n", + "text": "query checkSuitesAccumulatorQuery(\n $id: ID!\n $checkSuiteCount: Int!\n $checkSuiteCursor: String\n $checkRunCount: Int!\n) {\n node(id: $id) {\n __typename\n ... on Commit {\n ...checkSuitesAccumulator_commit_4ncEVO\n }\n id\n }\n}\n\nfragment checkRunView_checkRun on CheckRun {\n name\n status\n conclusion\n title\n summary\n permalink\n detailsUrl\n}\n\nfragment checkRunsAccumulator_checkSuite_2YXw6r on CheckSuite {\n id\n checkRuns(first: $checkRunCount) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n status\n conclusion\n ...checkRunView_checkRun\n __typename\n }\n }\n }\n}\n\nfragment checkSuiteView_checkSuite on CheckSuite {\n app {\n name\n id\n }\n status\n conclusion\n}\n\nfragment checkSuitesAccumulator_commit_4ncEVO on Commit {\n id\n checkSuites(first: $checkSuiteCount, after: $checkSuiteCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n status\n conclusion\n ...checkSuiteView_checkSuite\n ...checkRunsAccumulator_checkSuite_2YXw6r\n __typename\n }\n }\n }\n}\n", "metadata": {} } }; diff --git a/lib/containers/accumulators/__generated__/checkSuitesAccumulator_commit.graphql.js b/lib/containers/accumulators/__generated__/checkSuitesAccumulator_commit.graphql.js index d26c355a22..784202f2ea 100644 --- a/lib/containers/accumulators/__generated__/checkSuitesAccumulator_commit.graphql.js +++ b/lib/containers/accumulators/__generated__/checkSuitesAccumulator_commit.graphql.js @@ -10,7 +10,7 @@ import type { ReaderFragment } from 'relay-runtime'; type checkRunsAccumulator_checkSuite$ref = any; type checkSuiteView_checkSuite$ref = any; -export type CheckConclusionState = "ACTION_REQUIRED" | "CANCELLED" | "FAILURE" | "NEUTRAL" | "SUCCESS" | "TIMED_OUT" | "%future added value"; +export type CheckConclusionState = "ACTION_REQUIRED" | "CANCELLED" | "FAILURE" | "NEUTRAL" | "SKIPPED" | "STALE" | "STARTUP_FAILURE" | "SUCCESS" | "TIMED_OUT" | "%future added value"; export type CheckStatusState = "COMPLETED" | "IN_PROGRESS" | "QUEUED" | "REQUESTED" | "%future added value"; import type { FragmentReference } from "relay-runtime"; declare export opaque type checkSuitesAccumulator_commit$ref: FragmentReference; diff --git a/lib/containers/accumulators/__generated__/reviewCommentsAccumulatorQuery.graphql.js b/lib/containers/accumulators/__generated__/reviewCommentsAccumulatorQuery.graphql.js index 7caf390355..1508dbb498 100644 --- a/lib/containers/accumulators/__generated__/reviewCommentsAccumulatorQuery.graphql.js +++ b/lib/containers/accumulators/__generated__/reviewCommentsAccumulatorQuery.graphql.js @@ -1,6 +1,6 @@ /** * @flow - * @relayHash 86521576ed6d95983534962769a6f6e0 + * @relayHash 3aaba36cb5f7b9befa6832a08ff9c11f */ /* eslint-disable */ @@ -42,6 +42,23 @@ query reviewCommentsAccumulatorQuery( } } +fragment emojiReactionsController_reactable on Reactable { + id + ...emojiReactionsView_reactable +} + +fragment emojiReactionsView_reactable on Reactable { + id + reactionGroups { + content + viewerHasReacted + users { + totalCount + } + } + viewerCanReact +} + fragment reviewCommentsAccumulator_reviewThread_1VbUmL on PullRequestReviewThread { id comments(first: $commentCount, after: $commentCursor) { @@ -80,23 +97,6 @@ fragment reviewCommentsAccumulator_reviewThread_1VbUmL on PullRequestReviewThrea } } } - -fragment emojiReactionsController_reactable on Reactable { - id - ...emojiReactionsView_reactable -} - -fragment emojiReactionsView_reactable on Reactable { - id - reactionGroups { - content - viewerHasReacted - users { - totalCount - } - } - viewerCanReact -} */ const node/*: ConcreteRequest*/ = (function(){ @@ -459,7 +459,7 @@ return { "operationKind": "query", "name": "reviewCommentsAccumulatorQuery", "id": null, - "text": "query reviewCommentsAccumulatorQuery(\n $id: ID!\n $commentCount: Int!\n $commentCursor: String\n) {\n node(id: $id) {\n __typename\n ... on PullRequestReviewThread {\n ...reviewCommentsAccumulator_reviewThread_1VbUmL\n }\n id\n }\n}\n\nfragment reviewCommentsAccumulator_reviewThread_1VbUmL on PullRequestReviewThread {\n id\n comments(first: $commentCount, after: $commentCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n author {\n __typename\n avatarUrl\n login\n url\n ... on Node {\n id\n }\n }\n bodyHTML\n body\n isMinimized\n state\n viewerCanReact\n viewerCanUpdate\n path\n position\n createdAt\n lastEditedAt\n url\n authorAssociation\n ...emojiReactionsController_reactable\n __typename\n }\n }\n }\n}\n\nfragment emojiReactionsController_reactable on Reactable {\n id\n ...emojiReactionsView_reactable\n}\n\nfragment emojiReactionsView_reactable on Reactable {\n id\n reactionGroups {\n content\n viewerHasReacted\n users {\n totalCount\n }\n }\n viewerCanReact\n}\n", + "text": "query reviewCommentsAccumulatorQuery(\n $id: ID!\n $commentCount: Int!\n $commentCursor: String\n) {\n node(id: $id) {\n __typename\n ... on PullRequestReviewThread {\n ...reviewCommentsAccumulator_reviewThread_1VbUmL\n }\n id\n }\n}\n\nfragment emojiReactionsController_reactable on Reactable {\n id\n ...emojiReactionsView_reactable\n}\n\nfragment emojiReactionsView_reactable on Reactable {\n id\n reactionGroups {\n content\n viewerHasReacted\n users {\n totalCount\n }\n }\n viewerCanReact\n}\n\nfragment reviewCommentsAccumulator_reviewThread_1VbUmL on PullRequestReviewThread {\n id\n comments(first: $commentCount, after: $commentCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n author {\n __typename\n avatarUrl\n login\n url\n ... on Node {\n id\n }\n }\n bodyHTML\n body\n isMinimized\n state\n viewerCanReact\n viewerCanUpdate\n path\n position\n createdAt\n lastEditedAt\n url\n authorAssociation\n ...emojiReactionsController_reactable\n __typename\n }\n }\n }\n}\n", "metadata": {} } }; diff --git a/lib/containers/accumulators/__generated__/reviewCommentsAccumulator_reviewThread.graphql.js b/lib/containers/accumulators/__generated__/reviewCommentsAccumulator_reviewThread.graphql.js index ce9d2f7370..0d12e1b7c6 100644 --- a/lib/containers/accumulators/__generated__/reviewCommentsAccumulator_reviewThread.graphql.js +++ b/lib/containers/accumulators/__generated__/reviewCommentsAccumulator_reviewThread.graphql.js @@ -9,7 +9,7 @@ /*:: import type { ReaderFragment } from 'relay-runtime'; type emojiReactionsController_reactable$ref = any; -export type CommentAuthorAssociation = "COLLABORATOR" | "CONTRIBUTOR" | "FIRST_TIMER" | "FIRST_TIME_CONTRIBUTOR" | "MEMBER" | "NONE" | "OWNER" | "%future added value"; +export type CommentAuthorAssociation = "COLLABORATOR" | "CONTRIBUTOR" | "FIRST_TIMER" | "FIRST_TIME_CONTRIBUTOR" | "MANNEQUIN" | "MEMBER" | "NONE" | "OWNER" | "%future added value"; export type PullRequestReviewCommentState = "PENDING" | "SUBMITTED" | "%future added value"; import type { FragmentReference } from "relay-runtime"; declare export opaque type reviewCommentsAccumulator_reviewThread$ref: FragmentReference; diff --git a/lib/containers/accumulators/__generated__/reviewSummariesAccumulatorQuery.graphql.js b/lib/containers/accumulators/__generated__/reviewSummariesAccumulatorQuery.graphql.js index 5b461726ca..aae2eca316 100644 --- a/lib/containers/accumulators/__generated__/reviewSummariesAccumulatorQuery.graphql.js +++ b/lib/containers/accumulators/__generated__/reviewSummariesAccumulatorQuery.graphql.js @@ -1,6 +1,6 @@ /** * @flow - * @relayHash d618c3ed33b3c3cf6d3a48d314d3e80e + * @relayHash ca680104e44962e2e537a87c1d3b80cc */ /* eslint-disable */ @@ -44,6 +44,23 @@ query reviewSummariesAccumulatorQuery( } } +fragment emojiReactionsController_reactable on Reactable { + id + ...emojiReactionsView_reactable +} + +fragment emojiReactionsView_reactable on Reactable { + id + reactionGroups { + content + viewerHasReacted + users { + totalCount + } + } + viewerCanReact +} + fragment reviewSummariesAccumulator_pullRequest_2zzc96 on PullRequest { url reviews(first: $reviewCount, after: $reviewCursor) { @@ -78,23 +95,6 @@ fragment reviewSummariesAccumulator_pullRequest_2zzc96 on PullRequest { } } } - -fragment emojiReactionsController_reactable on Reactable { - id - ...emojiReactionsView_reactable -} - -fragment emojiReactionsView_reactable on Reactable { - id - reactionGroups { - content - viewerHasReacted - users { - totalCount - } - } - viewerCanReact -} */ const node/*: ConcreteRequest*/ = (function(){ @@ -437,7 +437,7 @@ return { "operationKind": "query", "name": "reviewSummariesAccumulatorQuery", "id": null, - "text": "query reviewSummariesAccumulatorQuery(\n $url: URI!\n $reviewCount: Int!\n $reviewCursor: String\n) {\n resource(url: $url) {\n __typename\n ... on PullRequest {\n ...reviewSummariesAccumulator_pullRequest_2zzc96\n }\n ... on Node {\n id\n }\n }\n}\n\nfragment reviewSummariesAccumulator_pullRequest_2zzc96 on PullRequest {\n url\n reviews(first: $reviewCount, after: $reviewCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n body\n bodyHTML\n state\n submittedAt\n lastEditedAt\n url\n author {\n __typename\n login\n avatarUrl\n url\n ... on Node {\n id\n }\n }\n viewerCanUpdate\n authorAssociation\n ...emojiReactionsController_reactable\n __typename\n }\n }\n }\n}\n\nfragment emojiReactionsController_reactable on Reactable {\n id\n ...emojiReactionsView_reactable\n}\n\nfragment emojiReactionsView_reactable on Reactable {\n id\n reactionGroups {\n content\n viewerHasReacted\n users {\n totalCount\n }\n }\n viewerCanReact\n}\n", + "text": "query reviewSummariesAccumulatorQuery(\n $url: URI!\n $reviewCount: Int!\n $reviewCursor: String\n) {\n resource(url: $url) {\n __typename\n ... on PullRequest {\n ...reviewSummariesAccumulator_pullRequest_2zzc96\n }\n ... on Node {\n id\n }\n }\n}\n\nfragment emojiReactionsController_reactable on Reactable {\n id\n ...emojiReactionsView_reactable\n}\n\nfragment emojiReactionsView_reactable on Reactable {\n id\n reactionGroups {\n content\n viewerHasReacted\n users {\n totalCount\n }\n }\n viewerCanReact\n}\n\nfragment reviewSummariesAccumulator_pullRequest_2zzc96 on PullRequest {\n url\n reviews(first: $reviewCount, after: $reviewCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n body\n bodyHTML\n state\n submittedAt\n lastEditedAt\n url\n author {\n __typename\n login\n avatarUrl\n url\n ... on Node {\n id\n }\n }\n viewerCanUpdate\n authorAssociation\n ...emojiReactionsController_reactable\n __typename\n }\n }\n }\n}\n", "metadata": {} } }; diff --git a/lib/containers/accumulators/__generated__/reviewSummariesAccumulator_pullRequest.graphql.js b/lib/containers/accumulators/__generated__/reviewSummariesAccumulator_pullRequest.graphql.js index 7f058e4f2d..1e201b739b 100644 --- a/lib/containers/accumulators/__generated__/reviewSummariesAccumulator_pullRequest.graphql.js +++ b/lib/containers/accumulators/__generated__/reviewSummariesAccumulator_pullRequest.graphql.js @@ -9,7 +9,7 @@ /*:: import type { ReaderFragment } from 'relay-runtime'; type emojiReactionsController_reactable$ref = any; -export type CommentAuthorAssociation = "COLLABORATOR" | "CONTRIBUTOR" | "FIRST_TIMER" | "FIRST_TIME_CONTRIBUTOR" | "MEMBER" | "NONE" | "OWNER" | "%future added value"; +export type CommentAuthorAssociation = "COLLABORATOR" | "CONTRIBUTOR" | "FIRST_TIMER" | "FIRST_TIME_CONTRIBUTOR" | "MANNEQUIN" | "MEMBER" | "NONE" | "OWNER" | "%future added value"; export type PullRequestReviewState = "APPROVED" | "CHANGES_REQUESTED" | "COMMENTED" | "DISMISSED" | "PENDING" | "%future added value"; import type { FragmentReference } from "relay-runtime"; declare export opaque type reviewSummariesAccumulator_pullRequest$ref: FragmentReference; diff --git a/lib/containers/accumulators/__generated__/reviewThreadsAccumulatorQuery.graphql.js b/lib/containers/accumulators/__generated__/reviewThreadsAccumulatorQuery.graphql.js index 46beeb0e95..0520a0b819 100644 --- a/lib/containers/accumulators/__generated__/reviewThreadsAccumulatorQuery.graphql.js +++ b/lib/containers/accumulators/__generated__/reviewThreadsAccumulatorQuery.graphql.js @@ -1,6 +1,6 @@ /** * @flow - * @relayHash c0ec05d1a25c7132b5fff75f82d96cce + * @relayHash be25db19c5f00a90f96d8749bda8f67d */ /* eslint-disable */ @@ -46,29 +46,21 @@ query reviewThreadsAccumulatorQuery( } } -fragment reviewThreadsAccumulator_pullRequest_3dVVow on PullRequest { - url - reviewThreads(first: $threadCount, after: $threadCursor) { - pageInfo { - hasNextPage - endCursor - } - edges { - cursor - node { - id - isResolved - resolvedBy { - login - id - } - viewerCanResolve - viewerCanUnresolve - ...reviewCommentsAccumulator_reviewThread_1UlnwR - __typename - } +fragment emojiReactionsController_reactable on Reactable { + id + ...emojiReactionsView_reactable +} + +fragment emojiReactionsView_reactable on Reactable { + id + reactionGroups { + content + viewerHasReacted + users { + totalCount } } + viewerCanReact } fragment reviewCommentsAccumulator_reviewThread_1UlnwR on PullRequestReviewThread { @@ -110,21 +102,29 @@ fragment reviewCommentsAccumulator_reviewThread_1UlnwR on PullRequestReviewThrea } } -fragment emojiReactionsController_reactable on Reactable { - id - ...emojiReactionsView_reactable -} - -fragment emojiReactionsView_reactable on Reactable { - id - reactionGroups { - content - viewerHasReacted - users { - totalCount +fragment reviewThreadsAccumulator_pullRequest_3dVVow on PullRequest { + url + reviewThreads(first: $threadCount, after: $threadCursor) { + pageInfo { + hasNextPage + endCursor + } + edges { + cursor + node { + id + isResolved + resolvedBy { + login + id + } + viewerCanResolve + viewerCanUnresolve + ...reviewCommentsAccumulator_reviewThread_1UlnwR + __typename + } } } - viewerCanReact } */ @@ -590,7 +590,7 @@ return { "operationKind": "query", "name": "reviewThreadsAccumulatorQuery", "id": null, - "text": "query reviewThreadsAccumulatorQuery(\n $url: URI!\n $threadCount: Int!\n $threadCursor: String\n $commentCount: Int!\n) {\n resource(url: $url) {\n __typename\n ... on PullRequest {\n ...reviewThreadsAccumulator_pullRequest_3dVVow\n }\n ... on Node {\n id\n }\n }\n}\n\nfragment reviewThreadsAccumulator_pullRequest_3dVVow on PullRequest {\n url\n reviewThreads(first: $threadCount, after: $threadCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n isResolved\n resolvedBy {\n login\n id\n }\n viewerCanResolve\n viewerCanUnresolve\n ...reviewCommentsAccumulator_reviewThread_1UlnwR\n __typename\n }\n }\n }\n}\n\nfragment reviewCommentsAccumulator_reviewThread_1UlnwR on PullRequestReviewThread {\n id\n comments(first: $commentCount) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n author {\n __typename\n avatarUrl\n login\n url\n ... on Node {\n id\n }\n }\n bodyHTML\n body\n isMinimized\n state\n viewerCanReact\n viewerCanUpdate\n path\n position\n createdAt\n lastEditedAt\n url\n authorAssociation\n ...emojiReactionsController_reactable\n __typename\n }\n }\n }\n}\n\nfragment emojiReactionsController_reactable on Reactable {\n id\n ...emojiReactionsView_reactable\n}\n\nfragment emojiReactionsView_reactable on Reactable {\n id\n reactionGroups {\n content\n viewerHasReacted\n users {\n totalCount\n }\n }\n viewerCanReact\n}\n", + "text": "query reviewThreadsAccumulatorQuery(\n $url: URI!\n $threadCount: Int!\n $threadCursor: String\n $commentCount: Int!\n) {\n resource(url: $url) {\n __typename\n ... on PullRequest {\n ...reviewThreadsAccumulator_pullRequest_3dVVow\n }\n ... on Node {\n id\n }\n }\n}\n\nfragment emojiReactionsController_reactable on Reactable {\n id\n ...emojiReactionsView_reactable\n}\n\nfragment emojiReactionsView_reactable on Reactable {\n id\n reactionGroups {\n content\n viewerHasReacted\n users {\n totalCount\n }\n }\n viewerCanReact\n}\n\nfragment reviewCommentsAccumulator_reviewThread_1UlnwR on PullRequestReviewThread {\n id\n comments(first: $commentCount) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n author {\n __typename\n avatarUrl\n login\n url\n ... on Node {\n id\n }\n }\n bodyHTML\n body\n isMinimized\n state\n viewerCanReact\n viewerCanUpdate\n path\n position\n createdAt\n lastEditedAt\n url\n authorAssociation\n ...emojiReactionsController_reactable\n __typename\n }\n }\n }\n}\n\nfragment reviewThreadsAccumulator_pullRequest_3dVVow on PullRequest {\n url\n reviewThreads(first: $threadCount, after: $threadCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n isResolved\n resolvedBy {\n login\n id\n }\n viewerCanResolve\n viewerCanUnresolve\n ...reviewCommentsAccumulator_reviewThread_1UlnwR\n __typename\n }\n }\n }\n}\n", "metadata": {} } }; diff --git a/lib/containers/comment-decorations-container.js b/lib/containers/comment-decorations-container.js index 81fd521b90..6cab8d4ae0 100644 --- a/lib/containers/comment-decorations-container.js +++ b/lib/containers/comment-decorations-container.js @@ -146,6 +146,7 @@ export default class CommentDecorationsContainer extends React.Component { if ( !props || !props.repository || !props.repository.ref || + !props.repository.ref.associatedPullRequests || props.repository.ref.associatedPullRequests.totalCount === 0 ) { // no loading spinner for you diff --git a/lib/containers/create-dialog-container.js b/lib/containers/create-dialog-container.js new file mode 100644 index 0000000000..267a811676 --- /dev/null +++ b/lib/containers/create-dialog-container.js @@ -0,0 +1,123 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import {QueryRenderer, graphql} from 'react-relay'; + +import CreateDialogController from '../controllers/create-dialog-controller'; +import ObserveModel from '../views/observe-model'; +import {PAGE_SIZE} from '../views/repository-home-selection-view'; +import RelayNetworkLayerManager from '../relay-network-layer-manager'; +import {getEndpoint} from '../models/endpoint'; +import {GithubLoginModelPropType} from '../prop-types'; + +const DOTCOM = getEndpoint('github.com'); + +export default class CreateDialogContainer extends React.Component { + static propTypes = { + // Model + loginModel: GithubLoginModelPropType.isRequired, + request: PropTypes.object.isRequired, + error: PropTypes.instanceOf(Error), + inProgress: PropTypes.bool.isRequired, + + // Atom environment + currentWindow: PropTypes.object.isRequired, + workspace: PropTypes.object.isRequired, + commands: PropTypes.object.isRequired, + config: PropTypes.object.isRequired, + } + + constructor(props) { + super(props); + + this.lastProps = null; + } + + render() { + return ( + + {this.renderWithToken} + + ); + } + + renderWithToken = token => { + if (!token) { + return null; + } + + const environment = RelayNetworkLayerManager.getEnvironmentForHost(DOTCOM, token); + const query = graphql` + query createDialogContainerQuery( + $organizationCount: Int! + $organizationCursor: String + ) { + viewer { + ...createDialogController_user @arguments( + organizationCount: $organizationCount + organizationCursor: $organizationCursor + ) + } + } + `; + const variables = { + organizationCount: PAGE_SIZE, + organizationCursor: null, + + // Force QueryRenderer to re-render when dialog request state changes + error: this.props.error, + inProgress: this.props.inProgress, + }; + + return ( + + ); + } + + renderWithResult = ({error, props}) => { + if (error) { + return this.renderError(error); + } + + if (!props && !this.lastProps) { + return this.renderLoading(); + } + + const currentProps = props || this.lastProps; + + return ( + + ); + } + + renderError(error) { + return ( + + ); + } + + renderLoading() { + return ( + + ); + } + + fetchToken = loginModel => loginModel.getToken(DOTCOM.getLoginAccount()) +} diff --git a/lib/containers/current-pull-request-container.js b/lib/containers/current-pull-request-container.js index 95cba9103d..13541bca76 100644 --- a/lib/containers/current-pull-request-container.js +++ b/lib/containers/current-pull-request-container.js @@ -4,9 +4,7 @@ import {QueryRenderer, graphql} from 'react-relay'; import {Disposable} from 'event-kit'; import {autobind, CHECK_SUITE_PAGE_SIZE, CHECK_RUN_PAGE_SIZE} from '../helpers'; -import { - RemotePropType, RemoteSetPropType, BranchSetPropType, OperationStateObserverPropType, EndpointPropType, -} from '../prop-types'; +import {RemotePropType, RemoteSetPropType, BranchSetPropType, EndpointPropType} from '../prop-types'; import IssueishListController, {BareIssueishListController} from '../controllers/issueish-list-controller'; import CreatePullRequestTile from '../views/create-pull-request-tile'; import RelayNetworkLayerManager from '../relay-network-layer-manager'; @@ -30,15 +28,12 @@ export default class CurrentPullRequestContainer extends React.Component { limit: PropTypes.number, // Repository model attributes - remoteOperationObserver: OperationStateObserverPropType.isRequired, remote: RemotePropType.isRequired, remotes: RemoteSetPropType.isRequired, branches: BranchSetPropType.isRequired, aheadCount: PropTypes.number, pushInProgress: PropTypes.bool.isRequired, - workspace: PropTypes.object.isRequired, - // Actions onOpenIssueish: PropTypes.func.isRequired, onOpenReviews: PropTypes.func.isRequired, @@ -122,18 +117,10 @@ export default class CurrentPullRequestContainer extends React.Component { } renderEmptyResult() { - this.sub.dispose(); - this.sub = this.props.remoteOperationObserver.onDidComplete(() => this.forceUpdate()); - return ; } - renderQueryResult({error, props, retry}) { - if (retry) { - this.sub.dispose(); - this.sub = this.props.remoteOperationObserver.onDidComplete(retry); - } - + renderQueryResult({error, props}) { if (error) { return ( issueish.getHeadRepositoryID() === this.props.repository.id} {...this.controllerProps()} diff --git a/lib/containers/git-tab-container.js b/lib/containers/git-tab-container.js index e8ddef3cf7..bdcda090c2 100644 --- a/lib/containers/git-tab-container.js +++ b/lib/containers/git-tab-container.js @@ -2,13 +2,15 @@ import React from 'react'; import PropTypes from 'prop-types'; import yubikiri from 'yubikiri'; -import {autobind} from '../helpers'; import {nullCommit} from '../models/commit'; import {nullBranch} from '../models/branch'; import ObserveModel from '../views/observe-model'; import GitTabController from '../controllers/git-tab-controller'; const DEFAULT_REPO_DATA = { + repository: null, + username: '', + email: '', lastCommit: nullCommit, recentCommits: [], isMerging: false, @@ -28,14 +30,11 @@ export default class GitTabContainer extends React.Component { repository: PropTypes.object.isRequired, } - constructor(props) { - super(props); - - autobind(this, 'fetchData'); - } - - fetchData(repository) { + fetchData = repository => { return yubikiri({ + repository, + username: repository.getConfig('user.name').then(n => n || ''), + email: repository.getConfig('user.email').then(n => n || ''), lastCommit: repository.getLastCommit(), recentCommits: repository.getRecentCommits({max: 10}), isMerging: repository.isMerging(), @@ -57,7 +56,17 @@ export default class GitTabContainer extends React.Component { render() { return ( - {data => } + {data => { + const dataProps = data || DEFAULT_REPO_DATA; + + return ( + + ); + }} ); } diff --git a/lib/containers/github-tab-container.js b/lib/containers/github-tab-container.js index 0805632222..0477e205d5 100644 --- a/lib/containers/github-tab-container.js +++ b/lib/containers/github-tab-container.js @@ -1,13 +1,18 @@ import React from 'react'; import PropTypes from 'prop-types'; import yubikiri from 'yubikiri'; +import {Disposable} from 'event-kit'; import {GithubLoginModelPropType, RefHolderPropType} from '../prop-types'; import OperationStateObserver, {PUSH, PULL, FETCH} from '../models/operation-state-observer'; +import Refresher from '../models/refresher'; import GitHubTabController from '../controllers/github-tab-controller'; import ObserveModel from '../views/observe-model'; import RemoteSet from '../models/remote-set'; +import {nullRemote} from '../models/remote'; import BranchSet from '../models/branch-set'; +import {nullBranch} from '../models/branch'; +import {DOTCOM} from '../models/endpoint'; export default class GitHubTabContainer extends React.Component { static propTypes = { @@ -15,21 +20,51 @@ export default class GitHubTabContainer extends React.Component { repository: PropTypes.object, loginModel: GithubLoginModelPropType.isRequired, rootHolder: RefHolderPropType.isRequired, + + changeWorkingDirectory: PropTypes.func.isRequired, + onDidChangeWorkDirs: PropTypes.func.isRequired, + getCurrentWorkDirs: PropTypes.func.isRequired, + openCreateDialog: PropTypes.func.isRequired, + openPublishDialog: PropTypes.func.isRequired, + openCloneDialog: PropTypes.func.isRequired, + openGitTab: PropTypes.func.isRequired, } - state = {}; + constructor(props) { + super(props); + + this.state = { + lastRepository: null, + remoteOperationObserver: new Disposable(), + refresher: new Refresher(), + observerSub: new Disposable(), + }; + } static getDerivedStateFromProps(props, state) { if (props.repository !== state.lastRepository) { + state.remoteOperationObserver.dispose(); + state.observerSub.dispose(); + + const remoteOperationObserver = new OperationStateObserver(props.repository, PUSH, PULL, FETCH); + const observerSub = remoteOperationObserver.onDidComplete(() => state.refresher.trigger()); + return { lastRepository: props.repository, - remoteOperationObserver: new OperationStateObserver(props.repository, PUSH, PULL, FETCH), + remoteOperationObserver, + observerSub, }; } return null; } + componentWillUnmount() { + this.state.observerSub.dispose(); + this.state.remoteOperationObserver.dispose(); + this.state.refresher.dispose(); + } + fetchRepositoryData = repository => { return yubikiri({ workingDirectory: repository.getWorkingDirectoryPath(), @@ -45,6 +80,8 @@ export default class GitHubTabContainer extends React.Component { }); } + fetchToken = (loginModel, endpoint) => loginModel.getToken(endpoint.getLoginAccount()); + render() { return ( @@ -53,33 +90,78 @@ export default class GitHubTabContainer extends React.Component { ); } - renderRepositoryData = data => { - if (!data || this.props.repository.isLoading()) { + renderRepositoryData = repoData => { + let endpoint = DOTCOM; + + if (repoData) { + repoData.githubRemotes = repoData.allRemotes.filter(remote => remote.isGithubRepo()); + repoData.currentBranch = repoData.branches.getHeadBranch(); + + repoData.currentRemote = repoData.githubRemotes.withName(repoData.selectedRemoteName); + repoData.manyRemotesAvailable = false; + if (!repoData.currentRemote.isPresent() && repoData.githubRemotes.size() === 1) { + repoData.currentRemote = Array.from(repoData.githubRemotes)[0]; + } else if (!repoData.currentRemote.isPresent() && repoData.githubRemotes.size() > 1) { + repoData.manyRemotesAvailable = true; + } + repoData.endpoint = endpoint = repoData.currentRemote.getEndpointOrDotcom(); + } + + return ( + + {token => this.renderToken(token, repoData)} + + ); + } + + renderToken(token, repoData) { + if (!repoData || this.props.repository.isLoading()) { return ( ); } if (!this.props.repository.isPresent()) { - // TODO include a better message here. - return null; + return ( + + ); } return ( ); } diff --git a/lib/containers/github-tab-header-container.js b/lib/containers/github-tab-header-container.js new file mode 100644 index 0000000000..17224df13f --- /dev/null +++ b/lib/containers/github-tab-header-container.js @@ -0,0 +1,102 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import {QueryRenderer, graphql} from 'react-relay'; + +import {EndpointPropType, TokenPropType} from '../prop-types'; +import RelayNetworkLayerManager from '../relay-network-layer-manager'; +import {UNAUTHENTICATED, INSUFFICIENT} from '../shared/keytar-strategy'; +import Author, {nullAuthor} from '../models/author'; +import GithubTabHeaderController from '../controllers/github-tab-header-controller'; + +export default class GithubTabHeaderContainer extends React.Component { + static propTypes = { + // Connection + endpoint: EndpointPropType.isRequired, + token: TokenPropType, + + // Workspace + currentWorkDir: PropTypes.string, + contextLocked: PropTypes.bool.isRequired, + changeWorkingDirectory: PropTypes.func.isRequired, + setContextLock: PropTypes.func.isRequired, + getCurrentWorkDirs: PropTypes.func.isRequired, + + // Event Handlers + onDidChangeWorkDirs: PropTypes.func, + } + + render() { + if ( + this.props.token == null + || this.props.token instanceof Error + || this.props.token === UNAUTHENTICATED + || this.props.token === INSUFFICIENT + ) { + return this.renderNoResult(); + } + + const environment = RelayNetworkLayerManager.getEnvironmentForHost(this.props.endpoint, this.props.token); + const query = graphql` + query githubTabHeaderContainerQuery { + viewer { + name, + email, + avatarUrl, + login + } + } + `; + + return ( + + ); + } + + renderWithResult = ({error, props}) => { + if (error || props === null) { + return this.renderNoResult(); + } + + // eslint-disable-next-line react/prop-types + const {email, name, avatarUrl, login} = props.viewer; + + return ( + + ); + } + + renderNoResult() { + return ( + + ); + } +} diff --git a/lib/containers/issueish-search-container.js b/lib/containers/issueish-search-container.js index 024eeb51d0..b8f45b5287 100644 --- a/lib/containers/issueish-search-container.js +++ b/lib/containers/issueish-search-container.js @@ -4,7 +4,7 @@ import {QueryRenderer, graphql} from 'react-relay'; import {Disposable} from 'event-kit'; import {autobind, CHECK_SUITE_PAGE_SIZE, CHECK_RUN_PAGE_SIZE} from '../helpers'; -import {SearchPropType, OperationStateObserverPropType, EndpointPropType} from '../prop-types'; +import {SearchPropType, EndpointPropType} from '../prop-types'; import IssueishListController, {BareIssueishListController} from '../controllers/issueish-list-controller'; import RelayNetworkLayerManager from '../relay-network-layer-manager'; @@ -17,7 +17,6 @@ export default class IssueishSearchContainer extends React.Component { // Search model limit: PropTypes.number, search: SearchPropType.isRequired, - remoteOperationObserver: OperationStateObserverPropType.isRequired, // Action methods onOpenIssueish: PropTypes.func.isRequired, @@ -89,12 +88,7 @@ export default class IssueishSearchContainer extends React.Component { ); } - renderQueryResult({error, props, retry}) { - if (retry) { - this.sub.dispose(); - this.sub = this.props.remoteOperationObserver.onDidComplete(retry); - } - + renderQueryResult({error, props}) { if (error) { return ( { - return loginModel.getToken(this.props.endpoint.getLoginAccount()); - } - render() { - return ( - - {this.renderWithToken} - - ); - } - - renderWithToken = token => { - if (token === null) { - return ; - } - - if (token instanceof Error) { - return ( - - ); - } - - if (token === UNAUTHENTICATED) { - return ; - } - - if (token === INSUFFICIENT) { - return ( - -

- Your token no longer has sufficient authorizations. Please re-authenticate and generate a new one. -

-
- ); - } - - const environment = RelayNetworkLayerManager.getEnvironmentForHost(this.props.endpoint, token); + const environment = RelayNetworkLayerManager.getEnvironmentForHost(this.props.endpoint, this.props.token); const query = graphql` query remoteContainerQuery($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { @@ -98,19 +56,21 @@ export default class RemoteContainer extends React.Component { environment={environment} variables={variables} query={query} - render={result => this.renderWithResult(result, token)} + render={this.renderWithResult} /> ); } - renderWithResult({error, props, retry}, token) { + renderWithResult = ({error, props, retry}) => { + this.props.refresher.setRetryCallback(this, retry); + if (error) { return ( ); } @@ -122,11 +82,10 @@ export default class RemoteContainer extends React.Component { return ( ); } - - handleLogin = token => { - incrementCounter('github-login'); - this.props.loginModel.setToken(this.props.endpoint.getLoginAccount(), token); - } - - handleLogout = () => { - incrementCounter('github-logout'); - this.props.loginModel.removeToken(this.props.endpoint.getLoginAccount()); - } - - handleTokenRetry = () => this.props.loginModel.didUpdate(); } diff --git a/lib/controllers/__generated__/commentDecorationsController_pullRequests.graphql.js b/lib/controllers/__generated__/commentDecorationsController_pullRequests.graphql.js index 19b45c7308..e81ad36757 100644 --- a/lib/controllers/__generated__/commentDecorationsController_pullRequests.graphql.js +++ b/lib/controllers/__generated__/commentDecorationsController_pullRequests.graphql.js @@ -30,10 +30,10 @@ export type commentDecorationsController_pullRequests = $ReadOnlyArray<{| +$refType: commentDecorationsController_pullRequests$ref, |}>; export type commentDecorationsController_pullRequests$data = commentDecorationsController_pullRequests; -export type commentDecorationsController_pullRequests$key = { +export type commentDecorationsController_pullRequests$key = $ReadOnlyArray<{ +$data?: commentDecorationsController_pullRequests$data, +$fragmentRefs: commentDecorationsController_pullRequests$ref, -}; +}>; */ diff --git a/lib/controllers/__generated__/createDialogController_user.graphql.js b/lib/controllers/__generated__/createDialogController_user.graphql.js new file mode 100644 index 0000000000..a519d455ca --- /dev/null +++ b/lib/controllers/__generated__/createDialogController_user.graphql.js @@ -0,0 +1,75 @@ +/** + * @flow + */ + +/* eslint-disable */ + +'use strict'; + +/*:: +import type { ReaderFragment } from 'relay-runtime'; +type repositoryHomeSelectionView_user$ref = any; +import type { FragmentReference } from "relay-runtime"; +declare export opaque type createDialogController_user$ref: FragmentReference; +declare export opaque type createDialogController_user$fragmentType: createDialogController_user$ref; +export type createDialogController_user = {| + +id: string, + +$fragmentRefs: repositoryHomeSelectionView_user$ref, + +$refType: createDialogController_user$ref, +|}; +export type createDialogController_user$data = createDialogController_user; +export type createDialogController_user$key = { + +$data?: createDialogController_user$data, + +$fragmentRefs: createDialogController_user$ref, +}; +*/ + + +const node/*: ReaderFragment*/ = { + "kind": "Fragment", + "name": "createDialogController_user", + "type": "User", + "metadata": null, + "argumentDefinitions": [ + { + "kind": "LocalArgument", + "name": "organizationCount", + "type": "Int!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "organizationCursor", + "type": "String", + "defaultValue": null + } + ], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "FragmentSpread", + "name": "repositoryHomeSelectionView_user", + "args": [ + { + "kind": "Variable", + "name": "organizationCount", + "variableName": "organizationCount" + }, + { + "kind": "Variable", + "name": "organizationCursor", + "variableName": "organizationCursor" + } + ] + } + ] +}; +// prettier-ignore +(node/*: any*/).hash = '729f5d41fc5444c5f12632127f89ed21'; +module.exports = node; diff --git a/lib/controllers/__generated__/issueTimelineControllerQuery.graphql.js b/lib/controllers/__generated__/issueTimelineControllerQuery.graphql.js index 0e6be8c8fd..30b258693d 100644 --- a/lib/controllers/__generated__/issueTimelineControllerQuery.graphql.js +++ b/lib/controllers/__generated__/issueTimelineControllerQuery.graphql.js @@ -1,6 +1,6 @@ /** * @flow - * @relayHash ded8da4da36beb072b57eb871f0652d9 + * @relayHash 7bd37c78149a65bc2e28051101c02b84 */ /* eslint-disable */ @@ -44,39 +44,39 @@ query issueTimelineControllerQuery( } } -fragment issueTimelineController_issue_3D8CP9 on Issue { - url - timelineItems(first: $timelineCount, after: $timelineCursor) { - pageInfo { - endCursor - hasNextPage +fragment crossReferencedEventView_item on CrossReferencedEvent { + id + isCrossRepository + source { + __typename + ... on Issue { + number + title + url + issueState: state } - edges { - cursor - node { - __typename - ...issueCommentView_item - ...crossReferencedEventsView_nodes - ... on Node { + ... on PullRequest { + number + title + url + prState: state + } + ... on RepositoryNode { + repository { + name + isPrivate + owner { + __typename + login id } + id } } - } -} - -fragment issueCommentView_item on IssueComment { - author { - __typename - avatarUrl - login ... on Node { id } } - bodyHTML - createdAt - url } fragment crossReferencedEventsView_nodes on CrossReferencedEvent { @@ -111,38 +111,38 @@ fragment crossReferencedEventsView_nodes on CrossReferencedEvent { ...crossReferencedEventView_item } -fragment crossReferencedEventView_item on CrossReferencedEvent { - id - isCrossRepository - source { +fragment issueCommentView_item on IssueComment { + author { __typename - ... on Issue { - number - title - url - issueState: state + avatarUrl + login + ... on Node { + id } - ... on PullRequest { - number - title - url - prState: state + } + bodyHTML + createdAt + url +} + +fragment issueTimelineController_issue_3D8CP9 on Issue { + url + timelineItems(first: $timelineCount, after: $timelineCursor) { + pageInfo { + endCursor + hasNextPage } - ... on RepositoryNode { - repository { - name - isPrivate - owner { - __typename - login + edges { + cursor + node { + __typename + ...issueCommentView_item + ...crossReferencedEventsView_nodes + ... on Node { id } - id } } - ... on Node { - id - } } } */ @@ -543,7 +543,7 @@ return { "operationKind": "query", "name": "issueTimelineControllerQuery", "id": null, - "text": "query issueTimelineControllerQuery(\n $timelineCount: Int!\n $timelineCursor: String\n $url: URI!\n) {\n resource(url: $url) {\n __typename\n ... on Issue {\n ...issueTimelineController_issue_3D8CP9\n }\n ... on Node {\n id\n }\n }\n}\n\nfragment issueTimelineController_issue_3D8CP9 on Issue {\n url\n timelineItems(first: $timelineCount, after: $timelineCursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n cursor\n node {\n __typename\n ...issueCommentView_item\n ...crossReferencedEventsView_nodes\n ... on Node {\n id\n }\n }\n }\n }\n}\n\nfragment issueCommentView_item on IssueComment {\n author {\n __typename\n avatarUrl\n login\n ... on Node {\n id\n }\n }\n bodyHTML\n createdAt\n url\n}\n\nfragment crossReferencedEventsView_nodes on CrossReferencedEvent {\n id\n referencedAt\n isCrossRepository\n actor {\n __typename\n login\n avatarUrl\n ... on Node {\n id\n }\n }\n source {\n __typename\n ... on RepositoryNode {\n repository {\n name\n owner {\n __typename\n login\n id\n }\n id\n }\n }\n ... on Node {\n id\n }\n }\n ...crossReferencedEventView_item\n}\n\nfragment crossReferencedEventView_item on CrossReferencedEvent {\n id\n isCrossRepository\n source {\n __typename\n ... on Issue {\n number\n title\n url\n issueState: state\n }\n ... on PullRequest {\n number\n title\n url\n prState: state\n }\n ... on RepositoryNode {\n repository {\n name\n isPrivate\n owner {\n __typename\n login\n id\n }\n id\n }\n }\n ... on Node {\n id\n }\n }\n}\n", + "text": "query issueTimelineControllerQuery(\n $timelineCount: Int!\n $timelineCursor: String\n $url: URI!\n) {\n resource(url: $url) {\n __typename\n ... on Issue {\n ...issueTimelineController_issue_3D8CP9\n }\n ... on Node {\n id\n }\n }\n}\n\nfragment crossReferencedEventView_item on CrossReferencedEvent {\n id\n isCrossRepository\n source {\n __typename\n ... on Issue {\n number\n title\n url\n issueState: state\n }\n ... on PullRequest {\n number\n title\n url\n prState: state\n }\n ... on RepositoryNode {\n repository {\n name\n isPrivate\n owner {\n __typename\n login\n id\n }\n id\n }\n }\n ... on Node {\n id\n }\n }\n}\n\nfragment crossReferencedEventsView_nodes on CrossReferencedEvent {\n id\n referencedAt\n isCrossRepository\n actor {\n __typename\n login\n avatarUrl\n ... on Node {\n id\n }\n }\n source {\n __typename\n ... on RepositoryNode {\n repository {\n name\n owner {\n __typename\n login\n id\n }\n id\n }\n }\n ... on Node {\n id\n }\n }\n ...crossReferencedEventView_item\n}\n\nfragment issueCommentView_item on IssueComment {\n author {\n __typename\n avatarUrl\n login\n ... on Node {\n id\n }\n }\n bodyHTML\n createdAt\n url\n}\n\nfragment issueTimelineController_issue_3D8CP9 on Issue {\n url\n timelineItems(first: $timelineCount, after: $timelineCursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n cursor\n node {\n __typename\n ...issueCommentView_item\n ...crossReferencedEventsView_nodes\n ... on Node {\n id\n }\n }\n }\n }\n}\n", "metadata": {} } }; diff --git a/lib/controllers/__generated__/issueishListController_results.graphql.js b/lib/controllers/__generated__/issueishListController_results.graphql.js index d28255ef57..a6e31fe82f 100644 --- a/lib/controllers/__generated__/issueishListController_results.graphql.js +++ b/lib/controllers/__generated__/issueishListController_results.graphql.js @@ -46,10 +46,10 @@ export type issueishListController_results = $ReadOnlyArray<{| +$refType: issueishListController_results$ref, |}>; export type issueishListController_results$data = issueishListController_results; -export type issueishListController_results$key = { +export type issueishListController_results$key = $ReadOnlyArray<{ +$data?: issueishListController_results$data, +$fragmentRefs: issueishListController_results$ref, -}; +}>; */ diff --git a/lib/controllers/__generated__/prTimelineControllerQuery.graphql.js b/lib/controllers/__generated__/prTimelineControllerQuery.graphql.js index 1f38866558..60205c8e70 100644 --- a/lib/controllers/__generated__/prTimelineControllerQuery.graphql.js +++ b/lib/controllers/__generated__/prTimelineControllerQuery.graphql.js @@ -1,6 +1,6 @@ /** * @flow - * @relayHash 0156e9abedeb1fcba09834652c8ea6f0 + * @relayHash bf7feaaf29c7833fac1992a954c2d676 */ /* eslint-disable */ @@ -44,82 +44,26 @@ query prTimelineControllerQuery( } } -fragment prTimelineController_pullRequest_3D8CP9 on PullRequest { - url - ...headRefForcePushedEventView_issueish - timelineItems(first: $timelineCount, after: $timelineCursor) { - pageInfo { - endCursor - hasNextPage - } - edges { - cursor - node { - __typename - ...commitsView_nodes - ...issueCommentView_item - ...mergedEventView_item - ...headRefForcePushedEventView_item - ...commitCommentThreadView_item - ...crossReferencedEventsView_nodes - ... on Node { - id - } - } - } - } -} - -fragment headRefForcePushedEventView_issueish on PullRequest { - headRefName - headRepositoryOwner { - __typename - login - id - } - repository { - owner { - __typename - login - id - } - id - } -} - -fragment commitsView_nodes on PullRequestCommit { +fragment commitCommentThreadView_item on PullRequestCommitCommentThread { commit { + oid id - author { - name - user { - login + } + comments(first: 100) { + edges { + node { id + ...commitCommentView_item } } - ...commitView_commit } } -fragment issueCommentView_item on IssueComment { +fragment commitCommentView_item on CommitComment { author { __typename - avatarUrl login - ... on Node { - id - } - } - bodyHTML - createdAt - url -} - -fragment mergedEventView_item on MergedEvent { - actor { - __typename avatarUrl - login ... on Node { id } @@ -128,62 +72,71 @@ fragment mergedEventView_item on MergedEvent { oid id } - mergeRefName + bodyHTML createdAt + path + position } -fragment headRefForcePushedEventView_item on HeadRefForcePushedEvent { - actor { - __typename +fragment commitView_commit on Commit { + author { + name avatarUrl - login - ... on Node { + user { + login id } } - beforeCommit { - oid - id - } - afterCommit { - oid - id + committer { + name + avatarUrl + user { + login + id + } } - createdAt + authoredByCommitter + sha: oid + message + messageHeadlineHTML + commitUrl } -fragment commitCommentThreadView_item on PullRequestCommitCommentThread { +fragment commitsView_nodes on PullRequestCommit { commit { - oid id - } - comments(first: 100) { - edges { - node { + author { + name + user { + login id - ...commitCommentView_item } } + ...commitView_commit } } -fragment crossReferencedEventsView_nodes on CrossReferencedEvent { +fragment crossReferencedEventView_item on CrossReferencedEvent { id - referencedAt isCrossRepository - actor { - __typename - login - avatarUrl - ... on Node { - id - } - } source { __typename + ... on Issue { + number + title + url + issueState: state + } + ... on PullRequest { + number + title + url + prState: state + } ... on RepositoryNode { repository { name + isPrivate owner { __typename login @@ -196,30 +149,25 @@ fragment crossReferencedEventsView_nodes on CrossReferencedEvent { id } } - ...crossReferencedEventView_item } -fragment crossReferencedEventView_item on CrossReferencedEvent { +fragment crossReferencedEventsView_nodes on CrossReferencedEvent { id + referencedAt isCrossRepository - source { + actor { __typename - ... on Issue { - number - title - url - issueState: state - } - ... on PullRequest { - number - title - url - prState: state + login + avatarUrl + ... on Node { + id } + } + source { + __typename ... on RepositoryNode { repository { name - isPrivate owner { __typename login @@ -232,49 +180,101 @@ fragment crossReferencedEventView_item on CrossReferencedEvent { id } } + ...crossReferencedEventView_item } -fragment commitCommentView_item on CommitComment { - author { +fragment headRefForcePushedEventView_issueish on PullRequest { + headRefName + headRepositoryOwner { __typename login + id + } + repository { + owner { + __typename + login + id + } + id + } +} + +fragment headRefForcePushedEventView_item on HeadRefForcePushedEvent { + actor { + __typename avatarUrl + login ... on Node { id } } - commit { + beforeCommit { + oid + id + } + afterCommit { oid id } - bodyHTML createdAt - path - position } -fragment commitView_commit on Commit { +fragment issueCommentView_item on IssueComment { author { - name + __typename avatarUrl - user { - login + login + ... on Node { id } } - committer { - name + bodyHTML + createdAt + url +} + +fragment mergedEventView_item on MergedEvent { + actor { + __typename avatarUrl - user { - login + login + ... on Node { id } } - authoredByCommitter - sha: oid - message - messageHeadlineHTML - commitUrl + commit { + oid + id + } + mergeRefName + createdAt +} + +fragment prTimelineController_pullRequest_3D8CP9 on PullRequest { + url + ...headRefForcePushedEventView_issueish + timelineItems(first: $timelineCount, after: $timelineCursor) { + pageInfo { + endCursor + hasNextPage + } + edges { + cursor + node { + __typename + ...commitsView_nodes + ...issueCommentView_item + ...mergedEventView_item + ...headRefForcePushedEventView_item + ...commitCommentThreadView_item + ...crossReferencedEventsView_nodes + ... on Node { + id + } + } + } + } } */ @@ -953,7 +953,7 @@ return { "operationKind": "query", "name": "prTimelineControllerQuery", "id": null, - "text": "query prTimelineControllerQuery(\n $timelineCount: Int!\n $timelineCursor: String\n $url: URI!\n) {\n resource(url: $url) {\n __typename\n ... on PullRequest {\n ...prTimelineController_pullRequest_3D8CP9\n }\n ... on Node {\n id\n }\n }\n}\n\nfragment prTimelineController_pullRequest_3D8CP9 on PullRequest {\n url\n ...headRefForcePushedEventView_issueish\n timelineItems(first: $timelineCount, after: $timelineCursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n cursor\n node {\n __typename\n ...commitsView_nodes\n ...issueCommentView_item\n ...mergedEventView_item\n ...headRefForcePushedEventView_item\n ...commitCommentThreadView_item\n ...crossReferencedEventsView_nodes\n ... on Node {\n id\n }\n }\n }\n }\n}\n\nfragment headRefForcePushedEventView_issueish on PullRequest {\n headRefName\n headRepositoryOwner {\n __typename\n login\n id\n }\n repository {\n owner {\n __typename\n login\n id\n }\n id\n }\n}\n\nfragment commitsView_nodes on PullRequestCommit {\n commit {\n id\n author {\n name\n user {\n login\n id\n }\n }\n ...commitView_commit\n }\n}\n\nfragment issueCommentView_item on IssueComment {\n author {\n __typename\n avatarUrl\n login\n ... on Node {\n id\n }\n }\n bodyHTML\n createdAt\n url\n}\n\nfragment mergedEventView_item on MergedEvent {\n actor {\n __typename\n avatarUrl\n login\n ... on Node {\n id\n }\n }\n commit {\n oid\n id\n }\n mergeRefName\n createdAt\n}\n\nfragment headRefForcePushedEventView_item on HeadRefForcePushedEvent {\n actor {\n __typename\n avatarUrl\n login\n ... on Node {\n id\n }\n }\n beforeCommit {\n oid\n id\n }\n afterCommit {\n oid\n id\n }\n createdAt\n}\n\nfragment commitCommentThreadView_item on PullRequestCommitCommentThread {\n commit {\n oid\n id\n }\n comments(first: 100) {\n edges {\n node {\n id\n ...commitCommentView_item\n }\n }\n }\n}\n\nfragment crossReferencedEventsView_nodes on CrossReferencedEvent {\n id\n referencedAt\n isCrossRepository\n actor {\n __typename\n login\n avatarUrl\n ... on Node {\n id\n }\n }\n source {\n __typename\n ... on RepositoryNode {\n repository {\n name\n owner {\n __typename\n login\n id\n }\n id\n }\n }\n ... on Node {\n id\n }\n }\n ...crossReferencedEventView_item\n}\n\nfragment crossReferencedEventView_item on CrossReferencedEvent {\n id\n isCrossRepository\n source {\n __typename\n ... on Issue {\n number\n title\n url\n issueState: state\n }\n ... on PullRequest {\n number\n title\n url\n prState: state\n }\n ... on RepositoryNode {\n repository {\n name\n isPrivate\n owner {\n __typename\n login\n id\n }\n id\n }\n }\n ... on Node {\n id\n }\n }\n}\n\nfragment commitCommentView_item on CommitComment {\n author {\n __typename\n login\n avatarUrl\n ... on Node {\n id\n }\n }\n commit {\n oid\n id\n }\n bodyHTML\n createdAt\n path\n position\n}\n\nfragment commitView_commit on Commit {\n author {\n name\n avatarUrl\n user {\n login\n id\n }\n }\n committer {\n name\n avatarUrl\n user {\n login\n id\n }\n }\n authoredByCommitter\n sha: oid\n message\n messageHeadlineHTML\n commitUrl\n}\n", + "text": "query prTimelineControllerQuery(\n $timelineCount: Int!\n $timelineCursor: String\n $url: URI!\n) {\n resource(url: $url) {\n __typename\n ... on PullRequest {\n ...prTimelineController_pullRequest_3D8CP9\n }\n ... on Node {\n id\n }\n }\n}\n\nfragment commitCommentThreadView_item on PullRequestCommitCommentThread {\n commit {\n oid\n id\n }\n comments(first: 100) {\n edges {\n node {\n id\n ...commitCommentView_item\n }\n }\n }\n}\n\nfragment commitCommentView_item on CommitComment {\n author {\n __typename\n login\n avatarUrl\n ... on Node {\n id\n }\n }\n commit {\n oid\n id\n }\n bodyHTML\n createdAt\n path\n position\n}\n\nfragment commitView_commit on Commit {\n author {\n name\n avatarUrl\n user {\n login\n id\n }\n }\n committer {\n name\n avatarUrl\n user {\n login\n id\n }\n }\n authoredByCommitter\n sha: oid\n message\n messageHeadlineHTML\n commitUrl\n}\n\nfragment commitsView_nodes on PullRequestCommit {\n commit {\n id\n author {\n name\n user {\n login\n id\n }\n }\n ...commitView_commit\n }\n}\n\nfragment crossReferencedEventView_item on CrossReferencedEvent {\n id\n isCrossRepository\n source {\n __typename\n ... on Issue {\n number\n title\n url\n issueState: state\n }\n ... on PullRequest {\n number\n title\n url\n prState: state\n }\n ... on RepositoryNode {\n repository {\n name\n isPrivate\n owner {\n __typename\n login\n id\n }\n id\n }\n }\n ... on Node {\n id\n }\n }\n}\n\nfragment crossReferencedEventsView_nodes on CrossReferencedEvent {\n id\n referencedAt\n isCrossRepository\n actor {\n __typename\n login\n avatarUrl\n ... on Node {\n id\n }\n }\n source {\n __typename\n ... on RepositoryNode {\n repository {\n name\n owner {\n __typename\n login\n id\n }\n id\n }\n }\n ... on Node {\n id\n }\n }\n ...crossReferencedEventView_item\n}\n\nfragment headRefForcePushedEventView_issueish on PullRequest {\n headRefName\n headRepositoryOwner {\n __typename\n login\n id\n }\n repository {\n owner {\n __typename\n login\n id\n }\n id\n }\n}\n\nfragment headRefForcePushedEventView_item on HeadRefForcePushedEvent {\n actor {\n __typename\n avatarUrl\n login\n ... on Node {\n id\n }\n }\n beforeCommit {\n oid\n id\n }\n afterCommit {\n oid\n id\n }\n createdAt\n}\n\nfragment issueCommentView_item on IssueComment {\n author {\n __typename\n avatarUrl\n login\n ... on Node {\n id\n }\n }\n bodyHTML\n createdAt\n url\n}\n\nfragment mergedEventView_item on MergedEvent {\n actor {\n __typename\n avatarUrl\n login\n ... on Node {\n id\n }\n }\n commit {\n oid\n id\n }\n mergeRefName\n createdAt\n}\n\nfragment prTimelineController_pullRequest_3D8CP9 on PullRequest {\n url\n ...headRefForcePushedEventView_issueish\n timelineItems(first: $timelineCount, after: $timelineCursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n cursor\n node {\n __typename\n ...commitsView_nodes\n ...issueCommentView_item\n ...mergedEventView_item\n ...headRefForcePushedEventView_item\n ...commitCommentThreadView_item\n ...crossReferencedEventsView_nodes\n ... on Node {\n id\n }\n }\n }\n }\n}\n", "metadata": {} } }; diff --git a/lib/controllers/create-dialog-controller.js b/lib/controllers/create-dialog-controller.js new file mode 100644 index 0000000000..7ec8702c19 --- /dev/null +++ b/lib/controllers/create-dialog-controller.js @@ -0,0 +1,208 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import {createFragmentContainer, graphql} from 'react-relay'; +import {TextBuffer} from 'atom'; +import {CompositeDisposable} from 'event-kit'; +import path from 'path'; + +import CreateDialogView from '../views/create-dialog-view'; + +export class BareCreateDialogController extends React.Component { + static propTypes = { + // Relay + user: PropTypes.shape({ + id: PropTypes.string.isRequired, + }), + + // Model + request: PropTypes.shape({ + getParams: PropTypes.func.isRequired, + accept: PropTypes.func.isRequired, + }).isRequired, + error: PropTypes.instanceOf(Error), + isLoading: PropTypes.bool.isRequired, + inProgress: PropTypes.bool.isRequired, + + // Atom environment + currentWindow: PropTypes.object.isRequired, + workspace: PropTypes.object.isRequired, + commands: PropTypes.object.isRequired, + config: PropTypes.object.isRequired, + } + + constructor(props) { + super(props); + + const {localDir} = this.props.request.getParams(); + + this.projectHome = this.props.config.get('core.projectHome'); + this.modified = { + repoName: false, + localPath: false, + }; + + this.repoName = new TextBuffer({ + text: localDir ? path.basename(localDir) : '', + }); + this.localPath = new TextBuffer({ + text: localDir || this.projectHome, + }); + this.sourceRemoteName = new TextBuffer({ + text: this.props.config.get('github.sourceRemoteName'), + }); + + this.subs = new CompositeDisposable( + this.repoName.onDidChange(this.didChangeRepoName), + this.localPath.onDidChange(this.didChangeLocalPath), + this.sourceRemoteName.onDidChange(this.didChangeSourceRemoteName), + this.props.config.onDidChange('github.sourceRemoteName', this.readSourceRemoteNameSetting), + this.props.config.onDidChange('github.remoteFetchProtocol', this.readRemoteFetchProtocolSetting), + ); + + this.state = { + acceptEnabled: this.acceptIsEnabled(), + selectedVisibility: 'PUBLIC', + selectedProtocol: this.props.config.get('github.remoteFetchProtocol'), + selectedOwnerID: this.props.user ? this.props.user.id : '', + }; + } + + render() { + return ( + + ); + } + + componentDidUpdate(prevProps) { + if (this.props.user !== prevProps.user) { + this.recheckAcceptEnablement(); + } + } + + componentWillUnmount() { + this.subs.dispose(); + } + + didChangeRepoName = () => { + this.modified.repoName = true; + if (!this.modified.localPath) { + if (this.localPath.getText() === this.projectHome) { + this.localPath.setText(path.join(this.projectHome, this.repoName.getText())); + } else { + const dirName = path.dirname(this.localPath.getText()); + this.localPath.setText(path.join(dirName, this.repoName.getText())); + } + this.modified.localPath = false; + } + this.recheckAcceptEnablement(); + } + + didChangeOwnerID = ownerID => new Promise(resolve => this.setState({selectedOwnerID: ownerID}, resolve)) + + didChangeLocalPath = () => { + this.modified.localPath = true; + if (!this.modified.repoName) { + this.repoName.setText(path.basename(this.localPath.getText())); + this.modified.repoName = false; + } + this.recheckAcceptEnablement(); + } + + didChangeVisibility = visibility => { + return new Promise(resolve => this.setState({selectedVisibility: visibility}, resolve)); + } + + didChangeSourceRemoteName = () => { + this.writeSourceRemoteNameSetting(); + this.recheckAcceptEnablement(); + } + + didChangeProtocol = async protocol => { + await new Promise(resolve => this.setState({selectedProtocol: protocol}, resolve)); + this.writeRemoteFetchProtocolSetting(protocol); + } + + readSourceRemoteNameSetting = ({newValue}) => { + if (newValue !== this.sourceRemoteName.getText()) { + this.sourceRemoteName.setText(newValue); + } + } + + writeSourceRemoteNameSetting() { + if (this.props.config.get('github.sourceRemoteName') !== this.sourceRemoteName.getText()) { + this.props.config.set('github.sourceRemoteName', this.sourceRemoteName.getText()); + } + } + + readRemoteFetchProtocolSetting = ({newValue}) => { + if (newValue !== this.state.selectedProtocol) { + this.setState({selectedProtocol: newValue}); + } + } + + writeRemoteFetchProtocolSetting(protocol) { + if (this.props.config.get('github.remoteFetchProtocol') !== protocol) { + this.props.config.set('github.remoteFetchProtocol', protocol); + } + } + + acceptIsEnabled() { + return !this.repoName.isEmpty() && + !this.localPath.isEmpty() && + !this.sourceRemoteName.isEmpty() && + this.props.user !== null; + } + + recheckAcceptEnablement() { + const nextEnablement = this.acceptIsEnabled(); + if (nextEnablement !== this.state.acceptEnabled) { + this.setState({acceptEnabled: nextEnablement}); + } + } + + accept = () => { + if (!this.acceptIsEnabled()) { + return Promise.resolve(); + } + + const ownerID = this.state.selectedOwnerID !== '' ? this.state.selectedOwnerID : this.props.user.id; + + return this.props.request.accept({ + ownerID, + name: this.repoName.getText(), + visibility: this.state.selectedVisibility, + localPath: this.localPath.getText(), + protocol: this.state.selectedProtocol, + sourceRemoteName: this.sourceRemoteName.getText(), + }); + } +} + +export default createFragmentContainer(BareCreateDialogController, { + user: graphql` + fragment createDialogController_user on User + @argumentDefinitions( + organizationCount: {type: "Int!"} + organizationCursor: {type: "String"} + ) { + id + ...repositoryHomeSelectionView_user @arguments( + organizationCount: $organizationCount + organizationCursor: $organizationCursor + ) + } + `, +}); diff --git a/lib/controllers/dialogs-controller.js b/lib/controllers/dialogs-controller.js index 6c3a2f845f..edf272c4ff 100644 --- a/lib/controllers/dialogs-controller.js +++ b/lib/controllers/dialogs-controller.js @@ -6,6 +6,8 @@ import CloneDialog from '../views/clone-dialog'; import CredentialDialog from '../views/credential-dialog'; import OpenIssueishDialog from '../views/open-issueish-dialog'; import OpenCommitDialog from '../views/open-commit-dialog'; +import CreateDialog from '../views/create-dialog'; +import {GithubLoginModelPropType} from '../prop-types'; const DIALOG_COMPONENTS = { null: NullDialog, @@ -14,17 +16,21 @@ const DIALOG_COMPONENTS = { credential: CredentialDialog, issueish: OpenIssueishDialog, commit: OpenCommitDialog, + create: CreateDialog, + publish: CreateDialog, }; export default class DialogsController extends React.Component { static propTypes = { // Model + loginModel: GithubLoginModelPropType.isRequired, request: PropTypes.shape({ identifier: PropTypes.string.isRequired, isProgressing: PropTypes.bool.isRequired, }).isRequired, // Atom environment + currentWindow: PropTypes.object.isRequired, workspace: PropTypes.object.isRequired, commands: PropTypes.object.isRequired, config: PropTypes.object.isRequired, @@ -65,12 +71,14 @@ export default class DialogsController extends React.Component { const wrapped = wrapDialogRequest(request, {accept}); return { - config: this.props.config, - commands: this.props.commands, - workspace: this.props.workspace, + loginModel: this.props.loginModel, + request: wrapped, inProgress: this.state.requestInProgress === request, + currentWindow: this.props.currentWindow, + workspace: this.props.workspace, + commands: this.props.commands, + config: this.props.config, error: this.state.requestError[0] === request ? this.state.requestError[1] : null, - request: wrapped, }; } } @@ -151,4 +159,12 @@ export const dialogRequests = { commit() { return new DialogRequest('commit'); }, + + create() { + return new DialogRequest('create'); + }, + + publish({localDir}) { + return new DialogRequest('publish', {localDir}); + }, }; diff --git a/lib/controllers/editor-conflict-controller.js b/lib/controllers/editor-conflict-controller.js index ad4c3c2848..174f84f724 100644 --- a/lib/controllers/editor-conflict-controller.js +++ b/lib/controllers/editor-conflict-controller.js @@ -48,6 +48,8 @@ export default class EditorConflictController extends React.Component { this.props.editor.onDidDestroy(() => this.props.refreshResolutionProgress(this.props.editor.getPath())), buffer.onDidReload(() => this.reparseConflicts()), ); + + this.scrollToFirstConflict(); } render() { @@ -219,6 +221,19 @@ export default class EditorConflictController extends React.Component { this.updateMarkerCount(); } + scrollToFirstConflict() { + let firstConflict = null; + for (const conflict of this.state.conflicts) { + if (firstConflict == null || firstConflict.getRange().compare(conflict.getRange()) > 0) { + firstConflict = conflict; + } + } + + if (firstConflict) { + this.props.editor.scrollToBufferPosition(firstConflict.getRange().start, {center: true}); + } + } + reparseConflicts() { const newConflicts = new Set(Conflict.allFromEditor(this.props.editor, this.layer, this.props.isRebase)); this.setState({conflicts: newConflicts}); diff --git a/lib/controllers/git-tab-controller.js b/lib/controllers/git-tab-controller.js index b75afe868d..d34d42723f 100644 --- a/lib/controllers/git-tab-controller.js +++ b/lib/controllers/git-tab-controller.js @@ -2,15 +2,14 @@ import path from 'path'; import React from 'react'; import PropTypes from 'prop-types'; +import {TextBuffer} from 'atom'; -import Author from '../models/author'; import GitTabView from '../views/git-tab-view'; import UserStore from '../models/user-store'; import RefHolder from '../models/ref-holder'; import { CommitPropType, BranchPropType, FilePatchItemPropType, MergeConflictItemPropType, RefHolderPropType, } from '../prop-types'; -import {autobind} from '../helpers'; export default class GitTabController extends React.Component { static focus = { @@ -21,6 +20,8 @@ export default class GitTabController extends React.Component { repository: PropTypes.object.isRequired, loginModel: PropTypes.object.isRequired, + username: PropTypes.string.isRequired, + email: PropTypes.string.isRequired, lastCommit: CommitPropType.isRequired, recentCommits: PropTypes.arrayOf(CommitPropType).isRequired, isMerging: PropTypes.bool.isRequired, @@ -33,6 +34,8 @@ export default class GitTabController extends React.Component { workingDirectoryPath: PropTypes.string, mergeMessage: PropTypes.string, fetchInProgress: PropTypes.bool.isRequired, + currentWorkDir: PropTypes.string, + repositoryDrift: PropTypes.bool.isRequired, workspace: PropTypes.object.isRequired, commands: PropTypes.object.isRequired, @@ -51,16 +54,15 @@ export default class GitTabController extends React.Component { openFiles: PropTypes.func.isRequired, openInitializeDialog: PropTypes.func.isRequired, controllerRef: RefHolderPropType, + contextLocked: PropTypes.bool.isRequired, + changeWorkingDirectory: PropTypes.func.isRequired, + setContextLock: PropTypes.func.isRequired, + onDidChangeWorkDirs: PropTypes.func.isRequired, + getCurrentWorkDirs: PropTypes.func.isRequired, }; constructor(props, context) { super(props, context); - autobind( - this, - 'attemptStageAllOperation', 'attemptFileStageOperation', 'unstageFiles', 'prepareToCommit', - 'commit', 'updateSelectedCoAuthors', 'undoLastCommit', 'abortMerge', 'resolveAsOurs', 'resolveAsTheirs', - 'checkout', 'rememberLastFocus', 'quietlySelectItem', - ); this.stagingOperationInProgress = false; this.lastFocus = GitTabView.focus.STAGING; @@ -71,8 +73,14 @@ export default class GitTabController extends React.Component { this.state = { selectedCoAuthors: [], + editingIdentity: false, }; + this.usernameBuffer = new TextBuffer({text: props.username}); + this.usernameBuffer.retain(); + this.emailBuffer = new TextBuffer({text: props.email}); + this.emailBuffer.retain(); + this.userStore = new UserStore({ repository: this.props.repository, login: this.props.loginModel, @@ -80,6 +88,14 @@ export default class GitTabController extends React.Component { }); } + static getDerivedStateFromProps(props, state) { + return { + editingIdentity: state.editingIdentity || + (!props.fetchInProgress && props.repository.isPresent() && !props.repositoryDrift) && + (props.username === '' || props.email === ''), + }; + } + render() { return ( { return this.attemptFileStageOperation(['.'], stageStatus); } - attemptFileStageOperation(filePaths, stageStatus) { + attemptFileStageOperation = (filePaths, stageStatus) => { if (this.stagingOperationInProgress) { return { stageOperationPromise: Promise.resolve(), @@ -249,15 +285,15 @@ export default class GitTabController extends React.Component { return this.props.repository.unstageFiles(filePaths); } - async prepareToCommit() { + prepareToCommit = async () => { return !await this.props.ensureGitTab(); } - commit(message, options) { + commit = (message, options) => { return this.props.repository.commit(message, options); } - updateSelectedCoAuthors(selectedCoAuthors, newAuthor) { + updateSelectedCoAuthors = (selectedCoAuthors, newAuthor) => { if (newAuthor) { this.userStore.addUsers([newAuthor]); selectedCoAuthors = selectedCoAuthors.concat([newAuthor]); @@ -265,23 +301,19 @@ export default class GitTabController extends React.Component { this.setState({selectedCoAuthors}); } - async undoLastCommit() { + undoLastCommit = async () => { const repo = this.props.repository; const lastCommit = await repo.getLastCommit(); if (lastCommit.isUnbornRef()) { return null; } await repo.undoLastCommit(); repo.setCommitMessage(lastCommit.getFullMessage()); - - const coAuthors = lastCommit.getCoAuthors().map(author => - new Author(author.email, author.name)); - - this.updateSelectedCoAuthors(coAuthors); + this.updateSelectedCoAuthors(lastCommit.getCoAuthors()); return null; } - async abortMerge() { + abortMerge = async () => { const choice = this.props.confirm({ message: 'Abort merge', detailedMessage: 'Are you sure?', @@ -303,7 +335,7 @@ export default class GitTabController extends React.Component { } } - async resolveAsOurs(paths) { + resolveAsOurs = async paths => { if (this.props.fetchInProgress) { return; } @@ -313,7 +345,7 @@ export default class GitTabController extends React.Component { this.refreshResolutionProgress(false, true); } - async resolveAsTheirs(paths) { + resolveAsTheirs = async paths => { if (this.props.fetchInProgress) { return; } @@ -323,14 +355,40 @@ export default class GitTabController extends React.Component { this.refreshResolutionProgress(false, true); } - checkout(branchName, options) { + checkout = (branchName, options) => { return this.props.repository.checkout(branchName, options); } - rememberLastFocus(event) { + rememberLastFocus = event => { this.lastFocus = this.refView.map(view => view.getFocus(event.target)).getOr(null) || GitTabView.focus.STAGING; } + toggleIdentityEditor = () => this.setState(before => ({editingIdentity: !before.editingIdentity})) + + closeIdentityEditor = () => this.setState({editingIdentity: false}) + + setLocalIdentity = () => this.setIdentity({}); + + setGlobalIdentity = () => this.setIdentity({global: true}); + + async setIdentity(options) { + const newUsername = this.usernameBuffer.getText(); + const newEmail = this.emailBuffer.getText(); + + if (newUsername.length > 0 || options.global) { + await this.props.repository.setConfig('user.name', newUsername, options); + } else { + await this.props.repository.unsetConfig('user.name'); + } + + if (newEmail.length > 0 || options.global) { + await this.props.repository.setConfig('user.email', newEmail, options); + } else { + await this.props.repository.unsetConfig('user.email'); + } + this.closeIdentityEditor(); + } + restoreFocus() { this.refView.map(view => view.setFocus(this.lastFocus)); } diff --git a/lib/controllers/git-tab-header-controller.js b/lib/controllers/git-tab-header-controller.js new file mode 100644 index 0000000000..1e149bb38f --- /dev/null +++ b/lib/controllers/git-tab-header-controller.js @@ -0,0 +1,137 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import {CompositeDisposable} from 'atom'; +import {nullAuthor} from '../models/author'; +import GitTabHeaderView from '../views/git-tab-header-view'; + +export default class GitTabHeaderController extends React.Component { + static propTypes = { + getCommitter: PropTypes.func.isRequired, + + // Workspace + currentWorkDir: PropTypes.string, + getCurrentWorkDirs: PropTypes.func.isRequired, + changeWorkingDirectory: PropTypes.func.isRequired, + contextLocked: PropTypes.bool.isRequired, + setContextLock: PropTypes.func.isRequired, + + // Event Handlers + onDidClickAvatar: PropTypes.func.isRequired, + onDidChangeWorkDirs: PropTypes.func.isRequired, + onDidUpdateRepo: PropTypes.func.isRequired, + } + + constructor(props) { + super(props); + this._isMounted = false; + this.state = { + currentWorkDirs: [], + committer: nullAuthor, + changingLock: null, + changingWorkDir: null, + }; + this.disposable = new CompositeDisposable(); + } + + static getDerivedStateFromProps(props) { + return { + currentWorkDirs: props.getCurrentWorkDirs(), + }; + } + + componentDidMount() { + this._isMounted = true; + this.disposable.add(this.props.onDidChangeWorkDirs(this.resetWorkDirs)); + this.disposable.add(this.props.onDidUpdateRepo(this.updateCommitter)); + this.updateCommitter(); + } + + componentDidUpdate(prevProps) { + if ( + prevProps.onDidChangeWorkDirs !== this.props.onDidChangeWorkDirs + || prevProps.onDidUpdateRepo !== this.props.onDidUpdateRepo + ) { + this.disposable.dispose(); + this.disposable = new CompositeDisposable(); + this.disposable.add(this.props.onDidChangeWorkDirs(this.resetWorkDirs)); + this.disposable.add(this.props.onDidUpdateRepo(this.updateCommitter)); + } + if (prevProps.getCommitter !== this.props.getCommitter) { + this.updateCommitter(); + } + } + + render() { + return ( + + ); + } + + handleLockToggle = async () => { + if (this.state.changingLock !== null) { + return; + } + + const nextLock = !this.props.contextLocked; + try { + this.setState({changingLock: nextLock}); + await this.props.setContextLock(this.getWorkDir(), nextLock); + } finally { + await new Promise(resolve => this.setState({changingLock: null}, resolve)); + } + } + + handleWorkDirSelect = async e => { + if (this.state.changingWorkDir !== null) { + return; + } + + const nextWorkDir = e.target.value; + try { + this.setState({changingWorkDir: nextWorkDir}); + await this.props.changeWorkingDirectory(nextWorkDir); + } finally { + await new Promise(resolve => this.setState({changingWorkDir: null}, resolve)); + } + } + + resetWorkDirs = () => { + this.setState(() => ({ + currentWorkDirs: [], + })); + } + + updateCommitter = async () => { + const committer = await this.props.getCommitter() || nullAuthor; + if (this._isMounted) { + this.setState({committer}); + } + } + + getWorkDir() { + return this.state.changingWorkDir !== null ? this.state.changingWorkDir : this.props.currentWorkDir; + } + + getLocked() { + return this.state.changingLock !== null ? this.state.changingLock : this.props.contextLocked; + } + + componentWillUnmount() { + this._isMounted = false; + this.disposable.dispose(); + } +} diff --git a/lib/controllers/github-tab-controller.js b/lib/controllers/github-tab-controller.js index dc850c2e7f..5d7a33010e 100644 --- a/lib/controllers/github-tab-controller.js +++ b/lib/controllers/github-tab-controller.js @@ -2,58 +2,81 @@ import React from 'react'; import PropTypes from 'prop-types'; import { - GithubLoginModelPropType, RefHolderPropType, RemoteSetPropType, BranchSetPropType, OperationStateObserverPropType, + GithubLoginModelPropType, TokenPropType, RefHolderPropType, + RemoteSetPropType, RemotePropType, BranchSetPropType, BranchPropType, + RefresherPropType, } from '../prop-types'; import GitHubTabView from '../views/github-tab-view'; +import {incrementCounter} from '../reporter-proxy'; export default class GitHubTabController extends React.Component { static propTypes = { workspace: PropTypes.object.isRequired, - repository: PropTypes.object.isRequired, - remoteOperationObserver: OperationStateObserverPropType.isRequired, + refresher: RefresherPropType.isRequired, loginModel: GithubLoginModelPropType.isRequired, + token: TokenPropType, rootHolder: RefHolderPropType.isRequired, workingDirectory: PropTypes.string, + repository: PropTypes.object.isRequired, allRemotes: RemoteSetPropType.isRequired, + githubRemotes: RemoteSetPropType.isRequired, + currentRemote: RemotePropType.isRequired, branches: BranchSetPropType.isRequired, - selectedRemoteName: PropTypes.string, - aheadCount: PropTypes.number, + currentBranch: BranchPropType.isRequired, + aheadCount: PropTypes.number.isRequired, + manyRemotesAvailable: PropTypes.bool.isRequired, pushInProgress: PropTypes.bool.isRequired, isLoading: PropTypes.bool.isRequired, + currentWorkDir: PropTypes.string, + + changeWorkingDirectory: PropTypes.func.isRequired, + setContextLock: PropTypes.func.isRequired, + contextLocked: PropTypes.bool.isRequired, + onDidChangeWorkDirs: PropTypes.func.isRequired, + getCurrentWorkDirs: PropTypes.func.isRequired, + openCreateDialog: PropTypes.func.isRequired, + openPublishDialog: PropTypes.func.isRequired, + openCloneDialog: PropTypes.func.isRequired, + openGitTab: PropTypes.func.isRequired, } render() { - const gitHubRemotes = this.props.allRemotes.filter(remote => remote.isGithubRepo()); - const currentBranch = this.props.branches.getHeadBranch(); - - let currentRemote = gitHubRemotes.withName(this.props.selectedRemoteName); - let manyRemotesAvailable = false; - if (!currentRemote.isPresent() && gitHubRemotes.size() === 1) { - currentRemote = Array.from(gitHubRemotes)[0]; - } else if (!currentRemote.isPresent() && gitHubRemotes.size() > 1) { - manyRemotesAvailable = true; - } - return ( ); } @@ -69,4 +92,22 @@ export default class GitHubTabController extends React.Component { e.preventDefault(); return this.props.repository.setConfig('atomGithub.currentRemote', remote.getName()); } + + openBoundPublishDialog = () => this.props.openPublishDialog(this.props.repository); + + handleLogin = token => { + incrementCounter('github-login'); + this.props.loginModel.setToken(this.currentEndpoint().getLoginAccount(), token); + } + + handleLogout = () => { + incrementCounter('github-logout'); + this.props.loginModel.removeToken(this.currentEndpoint().getLoginAccount()); + } + + handleTokenRetry = () => this.props.loginModel.didUpdate(); + + currentEndpoint() { + return this.props.currentRemote.getEndpointOrDotcom(); + } } diff --git a/lib/controllers/github-tab-header-controller.js b/lib/controllers/github-tab-header-controller.js new file mode 100644 index 0000000000..566a54cf3b --- /dev/null +++ b/lib/controllers/github-tab-header-controller.js @@ -0,0 +1,113 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import {AuthorPropType} from '../prop-types'; +import GithubTabHeaderView from '../views/github-tab-header-view'; + +export default class GithubTabHeaderController extends React.Component { + static propTypes = { + user: AuthorPropType.isRequired, + + // Workspace + currentWorkDir: PropTypes.string, + contextLocked: PropTypes.bool.isRequired, + changeWorkingDirectory: PropTypes.func.isRequired, + setContextLock: PropTypes.func.isRequired, + getCurrentWorkDirs: PropTypes.func.isRequired, + + // Event Handlers + onDidChangeWorkDirs: PropTypes.func.isRequired, + } + + constructor(props) { + super(props); + + this.state = { + currentWorkDirs: [], + changingLock: null, + changingWorkDir: null, + }; + } + + static getDerivedStateFromProps(props) { + return { + currentWorkDirs: props.getCurrentWorkDirs(), + }; + } + + componentDidMount() { + this.disposable = this.props.onDidChangeWorkDirs(this.resetWorkDirs); + } + + componentDidUpdate(prevProps) { + if (prevProps.onDidChangeWorkDirs !== this.props.onDidChangeWorkDirs) { + if (this.disposable) { + this.disposable.dispose(); + } + this.disposable = this.props.onDidChangeWorkDirs(this.resetWorkDirs); + } + } + + render() { + return ( + + ); + } + + resetWorkDirs = () => { + this.setState(() => ({ + currentWorkDirs: [], + })); + } + + handleLockToggle = async () => { + if (this.state.changingLock !== null) { + return; + } + + const nextLock = !this.props.contextLocked; + try { + this.setState({changingLock: nextLock}); + await this.props.setContextLock(this.state.changingWorkDir || this.props.currentWorkDir, nextLock); + } finally { + await new Promise(resolve => this.setState({changingLock: null}, resolve)); + } + } + + handleWorkDirChange = async e => { + if (this.state.changingWorkDir !== null) { + return; + } + + const nextWorkDir = e.target.value; + try { + this.setState({changingWorkDir: nextWorkDir}); + await this.props.changeWorkingDirectory(nextWorkDir); + } finally { + await new Promise(resolve => this.setState({changingWorkDir: null}, resolve)); + } + } + + getWorkDir() { + return this.state.changingWorkDir !== null ? this.state.changingWorkDir : this.props.currentWorkDir; + } + + getContextLocked() { + return this.state.changingLock !== null ? this.state.changingLock : this.props.contextLocked; + } + + componentWillUnmount() { + this.disposable.dispose(); + } +} diff --git a/lib/controllers/issueish-list-controller.js b/lib/controllers/issueish-list-controller.js index 8c2f405c2c..93ebfa9b61 100644 --- a/lib/controllers/issueish-list-controller.js +++ b/lib/controllers/issueish-list-controller.js @@ -56,7 +56,6 @@ export class BareIssueishListController extends React.Component { onOpenMore: PropTypes.func, emptyComponent: PropTypes.func, - workspace: PropTypes.object, endpoint: EndpointPropType, needReviewsButton: PropTypes.bool, }; @@ -91,15 +90,9 @@ export class BareIssueishListController extends React.Component { return null; } - openOnGitHub = url => { - return new Promise((resolve, reject) => { - shell.openExternal(url, {}, err => { - if (err) { reject(err); } else { - resolve(); - addEvent('open-issueish-in-browser', {package: 'github', component: this.constructor.name}); - } - }); - }); + openOnGitHub = async url => { + await shell.openExternal(url); + addEvent('open-issueish-in-browser', {package: 'github', component: this.constructor.name}); } showActionsMenu = /* istanbul ignore next */ issueish => { diff --git a/lib/controllers/issueish-searches-controller.js b/lib/controllers/issueish-searches-controller.js index b991fb0a7e..4d1d79b069 100644 --- a/lib/controllers/issueish-searches-controller.js +++ b/lib/controllers/issueish-searches-controller.js @@ -2,9 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import {shell} from 'electron'; -import { - RemotePropType, RemoteSetPropType, BranchSetPropType, OperationStateObserverPropType, EndpointPropType, -} from '../prop-types'; +import {RemotePropType, RemoteSetPropType, BranchSetPropType, EndpointPropType} from '../prop-types'; import Search from '../models/search'; import IssueishSearchContainer from '../containers/issueish-search-container'; import CurrentPullRequestContainer from '../containers/current-pull-request-container'; @@ -31,7 +29,6 @@ export default class IssueishSearchesController extends React.Component { workspace: PropTypes.object.isRequired, // Repository model attributes - remoteOperationObserver: OperationStateObserverPropType.isRequired, workingDirectory: PropTypes.string, remote: RemotePropType.isRequired, remotes: RemoteSetPropType.isRequired, @@ -60,7 +57,6 @@ export default class IssueishSearchesController extends React.Component { repository={this.props.repository} token={this.props.token} endpoint={this.props.endpoint} - remoteOperationObserver={this.props.remoteOperationObserver} remote={this.props.remote} remotes={this.props.remotes} branches={this.props.branches} @@ -79,7 +75,6 @@ export default class IssueishSearchesController extends React.Component { token={this.props.token} endpoint={this.props.endpoint} search={search} - remoteOperationObserver={this.props.remoteOperationObserver} onOpenIssueish={this.onOpenIssueish} onOpenSearch={this.onOpenSearch} @@ -118,13 +113,8 @@ export default class IssueishSearchesController extends React.Component { }); } - onOpenSearch = search => { + onOpenSearch = async search => { const searchURL = search.getWebURL(this.props.remote); - - return new Promise((resolve, reject) => { - shell.openExternal(searchURL, {}, err => { - if (err) { reject(err); } else { resolve(); } - }); - }); + await shell.openExternal(searchURL); } } diff --git a/lib/controllers/recent-commits-controller.js b/lib/controllers/recent-commits-controller.js index fd64391098..b3daed1d4c 100644 --- a/lib/controllers/recent-commits-controller.js +++ b/lib/controllers/recent-commits-controller.js @@ -63,6 +63,7 @@ export default class RecentCommitsController extends React.Component { selectPreviousCommit={this.selectPreviousCommit} selectedCommitSha={this.state.selectedCommitSha} commands={this.props.commands} + clipboard={atom.clipboard} /> ); } diff --git a/lib/controllers/remote-controller.js b/lib/controllers/remote-controller.js index 75097cd3d2..f0a38cc497 100644 --- a/lib/controllers/remote-controller.js +++ b/lib/controllers/remote-controller.js @@ -2,11 +2,8 @@ import React from 'react'; import PropTypes from 'prop-types'; import {shell} from 'electron'; -import {autobind} from '../helpers'; import {incrementCounter} from '../reporter-proxy'; -import { - RemotePropType, RemoteSetPropType, BranchSetPropType, OperationStateObserverPropType, EndpointPropType, -} from '../prop-types'; +import {RemotePropType, RemoteSetPropType, BranchSetPropType, EndpointPropType, TokenPropType} from '../prop-types'; import IssueishSearchesController from './issueish-searches-controller'; export default class RemoteController extends React.Component { @@ -22,10 +19,9 @@ export default class RemoteController extends React.Component { // Connection endpoint: EndpointPropType.isRequired, - token: PropTypes.string.isRequired, + token: TokenPropType.isRequired, // Repository derived attributes - remoteOperationObserver: OperationStateObserverPropType.isRequired, workingDirectory: PropTypes.string, workspace: PropTypes.object.isRequired, remote: RemotePropType.isRequired, @@ -38,18 +34,12 @@ export default class RemoteController extends React.Component { onPushBranch: PropTypes.func.isRequired, } - constructor(props) { - super(props); - autobind(this, 'onCreatePr'); - } - render() { return ( { const currentBranch = this.props.branches.getHeadBranch(); const upstream = currentBranch.getUpstream(); if (!upstream.isPresent() || this.props.aheadCount > 0) { @@ -77,15 +67,7 @@ export default class RemoteController extends React.Component { createPrUrl += '/compare/' + encodeURIComponent(currentBranch.getName()); createPrUrl += '?expand=1'; - return new Promise((resolve, reject) => { - shell.openExternal(createPrUrl, {}, err => { - if (err) { - reject(err); - } else { - incrementCounter('create-pull-request'); - resolve(); - } - }); - }); + await shell.openExternal(createPrUrl); + incrementCounter('create-pull-request'); } } diff --git a/lib/controllers/reviews-controller.js b/lib/controllers/reviews-controller.js index 1438f5baae..a6692db2ca 100644 --- a/lib/controllers/reviews-controller.js +++ b/lib/controllers/reviews-controller.js @@ -1,4 +1,5 @@ import React from 'react'; +import path from 'path'; import PropTypes from 'prop-types'; import {createFragmentContainer, graphql} from 'react-relay'; @@ -159,7 +160,7 @@ export class BareReviewsController extends React.Component { openFile = async (filePath, lineNumber) => { await this.props.workspace.open( - filePath, { + path.join(this.props.workdir, filePath), { initialLine: lineNumber - 1, initialColumn: 0, pending: true, @@ -288,7 +289,7 @@ export class BareReviewsController extends React.Component { } } - addSingleComment = async (commentBody, threadID, replyToID, path, position, callbacks = {}) => { + addSingleComment = async (commentBody, threadID, replyToID, commentPath, position, callbacks = {}) => { let pendingReviewID = null; try { this.setState({postingToThreadID: threadID}); @@ -306,7 +307,7 @@ export class BareReviewsController extends React.Component { reviewID, threadID, viewerID: this.props.viewer.id, - path, + path: commentPath, position, }); if (callbacks.didSubmitComment) { diff --git a/lib/controllers/root-controller.js b/lib/controllers/root-controller.js index d7056b70aa..7ba6779ae3 100644 --- a/lib/controllers/root-controller.js +++ b/lib/controllers/root-controller.js @@ -5,11 +5,14 @@ import {remote} from 'electron'; import React, {Fragment} from 'react'; import PropTypes from 'prop-types'; import {CompositeDisposable} from 'event-kit'; +import yubikiri from 'yubikiri'; import StatusBar from '../atom/status-bar'; import PaneItem from '../atom/pane-item'; import {openIssueishItem} from '../views/open-issueish-dialog'; import {openCommitDetailItem} from '../views/open-commit-dialog'; +import {createRepository, publishRepository} from '../views/create-dialog'; +import ObserveModel from '../views/observe-model'; import Commands, {Command} from '../atom/commands'; import ChangedFileItem from '../items/changed-file-item'; import IssueishDetailItem from '../items/issueish-detail-item'; @@ -22,9 +25,11 @@ import CommentDecorationsContainer from '../containers/comment-decorations-conta import DialogsController, {dialogRequests} from './dialogs-controller'; import StatusBarTileController from './status-bar-tile-controller'; import RepositoryConflictController from './repository-conflict-controller'; +import RelayNetworkLayerManager from '../relay-network-layer-manager'; import GitCacheView from '../views/git-cache-view'; import GitTimingsView from '../views/git-timings-view'; import Conflict from '../models/conflicts/conflict'; +import {getEndpoint} from '../models/endpoint'; import Switchboard from '../switchboard'; import {WorkdirContextPoolPropType} from '../prop-types'; import {destroyFilePatchPaneItems, destroyEmptyFilePatchPaneItems, autobind} from '../helpers'; @@ -44,6 +49,7 @@ export default class RootController extends React.Component { config: PropTypes.object.isRequired, project: PropTypes.object.isRequired, confirm: PropTypes.func.isRequired, + currentWindow: PropTypes.object.isRequired, // Models loginModel: PropTypes.object.isRequired, @@ -54,11 +60,16 @@ export default class RootController extends React.Component { switchboard: PropTypes.instanceOf(Switchboard), pipelineManager: PropTypes.object, + currentWorkDir: PropTypes.string, + // Git actions initialize: PropTypes.func.isRequired, clone: PropTypes.func.isRequired, // Control + contextLocked: PropTypes.bool.isRequired, + changeWorkingDirectory: PropTypes.func.isRequired, + setContextLock: PropTypes.func.isRequired, startOpen: PropTypes.bool, startRevealed: PropTypes.bool, } @@ -131,37 +142,56 @@ export default class RootController extends React.Component { const devMode = global.atom && global.atom.inDevMode(); return ( - - {devMode && } - - - - - - - - - this.openInitializeDialog()} /> - this.openCloneDialog()} /> - this.openIssueishDialog()} /> - this.openCommitDialog()} /> - - - - - + + + {devMode && } + + + + + + + + + this.openInitializeDialog()} /> + this.openCloneDialog()} /> + this.openIssueishDialog()} /> + this.openCommitDialog()} /> + this.openCreateDialog()} /> + + + + + + + {data => { + if (!data || !data.isPublishable || !data.remotes.filter(r => r.isGithubRepo()).isEmpty()) { + return null; + } + + return ( + + this.openPublishDialog(this.props.repository)} + /> + + ); + }} + + ); } @@ -189,10 +219,13 @@ export default class RootController extends React.Component { renderDialogs() { return ( ); } @@ -230,6 +263,10 @@ export default class RootController extends React.Component { } renderPaneItems() { + const {workdirContextPool} = this.props; + const getCurrentWorkDirs = workdirContextPool.getCurrentWorkDirs.bind(workdirContextPool); + const onDidChangeWorkDirs = workdirContextPool.onDidChangePoolContexts.bind(workdirContextPool); + return ( )} @@ -269,6 +312,16 @@ export default class RootController extends React.Component { repository={this.props.repository} loginModel={this.props.loginModel} workspace={this.props.workspace} + currentWorkDir={this.props.currentWorkDir} + getCurrentWorkDirs={getCurrentWorkDirs} + onDidChangeWorkDirs={onDidChangeWorkDirs} + contextLocked={this.props.contextLocked} + changeWorkingDirectory={this.props.changeWorkingDirectory} + setContextLock={this.props.setContextLock} + openCreateDialog={this.openCreateDialog} + openPublishDialog={this.openPublishDialog} + openCloneDialog={this.openCloneDialog} + openGitTab={this.gitTabTracker.toggleFocus} /> )} @@ -396,6 +449,11 @@ export default class RootController extends React.Component { ); } + fetchData = repository => yubikiri({ + isPublishable: repository.isPublishable(), + remotes: repository.getRemotes(), + }); + async openTabs() { if (this.props.startOpen) { await Promise.all([ @@ -577,6 +635,34 @@ export default class RootController extends React.Component { return new Promise(resolve => this.setState({dialogRequest}, resolve)); } + openCreateDialog = () => { + const dialogRequest = dialogRequests.create(); + dialogRequest.onProgressingAccept(async result => { + const dotcom = getEndpoint('github.com'); + const relayEnvironment = RelayNetworkLayerManager.getEnvironmentForHost(dotcom); + + await createRepository(result, {clone: this.props.clone, relayEnvironment}); + await this.closeDialog(); + }); + dialogRequest.onCancel(this.closeDialog); + + return new Promise(resolve => this.setState({dialogRequest}, resolve)); + } + + openPublishDialog = repository => { + const dialogRequest = dialogRequests.publish({localDir: repository.getWorkingDirectoryPath()}); + dialogRequest.onProgressingAccept(async result => { + const dotcom = getEndpoint('github.com'); + const relayEnvironment = RelayNetworkLayerManager.getEnvironmentForHost(dotcom); + + await publishRepository(result, {repository, relayEnvironment}); + await this.closeDialog(); + }); + dialogRequest.onCancel(this.closeDialog); + + return new Promise(resolve => this.setState({dialogRequest}, resolve)); + } + toggleCommitPreviewItem = () => { const workdir = this.props.repository.getWorkingDirectoryPath(); return this.props.workspace.toggle(CommitPreviewItem.buildURI(workdir)); diff --git a/lib/error-boundary.js b/lib/error-boundary.js new file mode 100644 index 0000000000..ccad7691b1 --- /dev/null +++ b/lib/error-boundary.js @@ -0,0 +1,35 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + +export default class ErrorBoundary extends React.Component { + static propTypes = { + children: PropTypes.node.isRequired, + fallback: PropTypes.any, + }; + + constructor(props) { + super(props); + this.state = {hasError: false, error: null, errorInfo: null}; + } + + static getDerivedStateFromError(error) { + // Update state so the next render will show the fallback UI. + return {hasError: true}; + } + + componentDidCatch(error, errorInfo) { + this.setState({ + error, + errorInfo, + }); + } + + render() { + if (this.state.hasError) { + // You can render any custom fallback UI + return this.props.fallback ? this.props.fallback : null; + } + + return this.props.children; + } +} diff --git a/lib/git-prompt-server.js b/lib/git-prompt-server.js index 7139e2de10..6d8f26c298 100644 --- a/lib/git-prompt-server.js +++ b/lib/git-prompt-server.js @@ -1,52 +1,67 @@ import net from 'net'; import {Emitter} from 'event-kit'; +import {normalizeGitHelperPath} from './helpers'; export default class GitPromptServer { constructor(gitTempDir) { this.emitter = new Emitter(); this.gitTempDir = gitTempDir; + this.address = null; } async start(promptForInput) { this.promptForInput = promptForInput; await this.gitTempDir.ensure(); - this.server = await this.startListening(this.gitTempDir.getSocketPath()); + this.server = await this.startListening(this.gitTempDir.getSocketOptions()); } - startListening(socketPath) { + getAddress() { + /* istanbul ignore if */ + if (!this.address) { + throw new Error('Server is not listening'); + } else if (this.address.port) { + // TCP socket + return `tcp:${this.address.port}`; + } else { + // Unix domain socket + return `unix:${normalizeGitHelperPath(this.address)}`; + } + } + + startListening(socketOptions) { return new Promise(resolve => { - const server = net.createServer(connection => { + const server = net.createServer({allowHalfOpen: true}, connection => { connection.setEncoding('utf8'); - const parts = []; - + let payload = ''; connection.on('data', data => { - const nullIndex = data.indexOf('\u0000'); - if (nullIndex === -1) { - parts.push(data); - } else { - parts.push(data.substring(0, nullIndex)); - this.handleData(connection, parts.join('')); - } + payload += data; + }); + + connection.on('end', () => { + this.handleData(connection, payload); }); }); - server.listen(socketPath, () => resolve(server)); + server.listen(socketOptions, () => { + this.address = server.address(); + resolve(server); + }); }); } - handleData(connection, data) { + async handleData(connection, data) { let query; try { query = JSON.parse(data); + const answer = await this.promptForInput(query); + await new Promise(resolve => { + connection.end(JSON.stringify(answer), 'utf8', resolve); + }); } catch (e) { - this.emitter.emit('did-cancel'); + this.emitter.emit('did-cancel', query.pid ? {handlerPid: query.pid} : undefined); } - - Promise.resolve(this.promptForInput(query)) - .then(answer => connection.end(JSON.stringify(answer), 'utf-8')) - .catch(() => this.emitter.emit('did-cancel', {handlerPid: query.pid})); } onDidCancel(cb) { diff --git a/lib/git-shell-out-strategy.js b/lib/git-shell-out-strategy.js index efaa07261b..b56cdcd641 100644 --- a/lib/git-shell-out-strategy.js +++ b/lib/git-shell-out-strategy.js @@ -22,6 +22,7 @@ import { import GitTimingsView from './views/git-timings-view'; import File from './models/patch/file'; import WorkerManager from './worker-manager'; +import Author from './models/author'; const MAX_STATUS_OUTPUT_LENGTH = 1024 * 1024 * 10; @@ -117,8 +118,8 @@ export default class GitShellOutStrategy { if (execPathPromise === null) { // Attempt to collect the --exec-path from a native git installation. - execPathPromise = new Promise((resolve, reject) => { - childProcess.exec('git --exec-path', (error, stdout, stderr) => { + execPathPromise = new Promise(resolve => { + childProcess.exec('git --exec-path', (error, stdout) => { /* istanbul ignore if */ if (error) { // Oh well @@ -166,7 +167,7 @@ export default class GitShellOutStrategy { env.ATOM_GITHUB_ASKPASS_PATH = normalizeGitHelperPath(gitTempDir.getAskPassJs()); env.ATOM_GITHUB_CREDENTIAL_PATH = normalizeGitHelperPath(gitTempDir.getCredentialHelperJs()); env.ATOM_GITHUB_ELECTRON_PATH = normalizeGitHelperPath(getAtomHelperPath()); - env.ATOM_GITHUB_SOCK_PATH = normalizeGitHelperPath(gitTempDir.getSocketPath()); + env.ATOM_GITHUB_SOCK_ADDR = gitPromptServer.getAddress(); env.ATOM_GITHUB_WORKDIR_PATH = this.workingDir; env.ATOM_GITHUB_DUGITE_PATH = getDugitePath(); @@ -773,8 +774,7 @@ export default class GitShellOutStrategy { commits.push({ sha: fields[i] && fields[i].trim(), - authorEmail: fields[i + 1] && fields[i + 1].trim(), - authorName: fields[i + 2] && fields[i + 2].trim(), + author: new Author(fields[i + 1] && fields[i + 1].trim(), fields[i + 2] && fields[i + 2].trim()), authorDate: parseInt(fields[i + 3], 10), messageSubject: fields[i + 4], messageBody, @@ -888,6 +888,7 @@ export default class GitShellOutStrategy { if (options.noLocal) { args.push('--no-local'); } if (options.bare) { args.push('--bare'); } if (options.recursive) { args.push('--recursive'); } + if (options.sourceRemoteName) { args.push('--origin', options.remoteName); } args.push(remoteUrl, this.workingDir); return this.exec(args, {useGitPromptServer: true, writeOperation: true}); @@ -1006,12 +1007,12 @@ export default class GitShellOutStrategy { let output; try { let args = ['config']; - if (local || atom.inSpecMode()) { args.push('--local'); } + if (local) { args.push('--local'); } args = args.concat(option); output = await this.exec(args); } catch (err) { - if (err.code === 1) { - // No matching config found + if (err.code === 1 || err.code === 128) { + // No matching config found OR --local can only be used inside a git repository return null; } else { throw err; @@ -1021,9 +1022,10 @@ export default class GitShellOutStrategy { return output.trim(); } - setConfig(option, value, {replaceAll} = {}) { + setConfig(option, value, {replaceAll, global} = {}) { let args = ['config']; if (replaceAll) { args.push('--replace-all'); } + if (global) { args.push('--global'); } args = args.concat(option, value); return this.exec(args, {writeOperation: true}); } diff --git a/lib/git-temp-dir.js b/lib/git-temp-dir.js index 48d2e5ad35..431b728c39 100644 --- a/lib/git-temp-dir.js +++ b/lib/git-temp-dir.js @@ -56,18 +56,11 @@ export default class GitTempDir { return path.join(this.root, filename); } - getSocketPath() { + getSocketOptions() { if (process.platform === 'win32') { - if (!this.socketPath) { - this.socketPath = path.join( - '\\\\?\\pipe\\', - 'gh-' + require('crypto').randomBytes(8).toString('hex'), - 'helper.sock', - ); - } - return this.socketPath; + return {port: 0, host: 'localhost'}; } else { - return this.getScriptPath('helper.sock'); + return {path: this.getScriptPath('helper.sock')}; } } diff --git a/lib/github-package.js b/lib/github-package.js index e49389bdba..99aa8fb59c 100644 --- a/lib/github-package.js +++ b/lib/github-package.js @@ -26,13 +26,15 @@ import {reporterProxy} from './reporter-proxy'; const defaultState = { newProject: true, + activeRepositoryPath: null, + contextLocked: false, }; export default class GithubPackage { constructor({ workspace, project, commands, notificationManager, tooltips, styles, grammars, keymaps, config, deserializers, - confirm, getLoadSettings, + confirm, getLoadSettings, currentWindow, configDirPath, renderFn, loginModel, }) { @@ -54,6 +56,7 @@ export default class GithubPackage { this.grammars = grammars; this.keymaps = keymaps; this.configPath = path.join(configDirPath, 'github.cson'); + this.currentWindow = currentWindow; this.styleCalculator = new StyleCalculator(this.styles, this.config); this.confirm = confirm; @@ -70,6 +73,7 @@ export default class GithubPackage { this.activeContextQueue = new AsyncQueue(); this.guessedContext = WorkdirContext.guess(criteria, this.pipelineManager); this.activeContext = this.guessedContext; + this.lockedContext = null; this.workdirCache = new WorkdirCache(); this.contextPool = new WorkdirContextPool({ window, @@ -158,10 +162,10 @@ export default class GithubPackage { } async activate(state = {}) { - this.savedState = {...defaultState, ...state}; + const savedState = {...defaultState, ...state}; const firstRun = !await fileExists(this.configPath); - const newProject = this.savedState.firstRun !== undefined ? this.savedState.firstRun : this.savedState.newProject; + const newProject = savedState.firstRun !== undefined ? savedState.firstRun : savedState.newProject; this.startOpen = firstRun || newProject; this.startRevealed = firstRun && !this.config.get('welcome.showOnStartup'); @@ -175,8 +179,8 @@ export default class GithubPackage { }; this.subscriptions.add( - this.project.onDidChangePaths(this.scheduleActiveContextUpdate), - this.workspace.getCenter().onDidChangeActivePaneItem(this.scheduleActiveContextUpdate), + this.workspace.getCenter().onDidChangeActivePaneItem(this.handleActivePaneItemChange), + this.project.onDidChangePaths(this.handleProjectPathsChange), this.styleCalculator.startWatching( 'github-package-styles', ['editor.fontSize', 'editor.fontFamily', 'editor.lineHeight', 'editor.tabLength'], @@ -237,16 +241,33 @@ export default class GithubPackage { ); this.activated = true; - this.scheduleActiveContextUpdate(this.savedState); + this.scheduleActiveContextUpdate({ + usePath: savedState.activeRepositoryPath, + lock: savedState.contextLocked, + }); this.rerender(); } - serialize() { - const activeRepository = this.getActiveRepository(); - const activeRepositoryPath = activeRepository ? activeRepository.getWorkingDirectoryPath() : null; + handleActivePaneItemChange = () => { + if (this.lockedContext) { + return; + } + + const itemPath = pathForPaneItem(this.workspace.getCenter().getActivePaneItem()); + this.scheduleActiveContextUpdate({ + usePath: itemPath, + lock: false, + }); + } + handleProjectPathsChange = () => { + this.scheduleActiveContextUpdate(); + } + + serialize() { return { - activeRepositoryPath, + activeRepositoryPath: this.getActiveWorkdir(), + contextLocked: Boolean(this.lockedContext), newProject: false, }; } @@ -268,6 +289,14 @@ export default class GithubPackage { })); } + const changeWorkingDirectory = workingDirectory => { + return this.scheduleActiveContextUpdate({usePath: workingDirectory}); + }; + + const setContextLock = (workingDirectory, lock) => { + return this.scheduleActiveContextUpdate({usePath: workingDirectory, lock}); + }; + this.renderFn( { this.controller = c; }} @@ -281,6 +310,7 @@ export default class GithubPackage { config={this.config} project={this.project} confirm={this.confirm} + currentWindow={this.currentWindow} workdirContextPool={this.contextPool} loginModel={this.loginModel} repository={this.getActiveRepository()} @@ -292,6 +322,10 @@ export default class GithubPackage { startOpen={this.startOpen} startRevealed={this.startRevealed} removeFilePatchItem={this.removeFilePatchItem} + currentWorkDir={this.getActiveWorkdir()} + contextLocked={this.lockedContext !== null} + changeWorkingDirectory={changeWorkingDirectory} + setContextLock={setContextLock} />, this.element, callback, ); } @@ -440,23 +474,23 @@ export default class GithubPackage { await this.scheduleActiveContextUpdate(); } - clone = async (remoteUrl, projectPath) => { + clone = async (remoteUrl, projectPath, sourceRemoteName = 'origin') => { const context = this.contextPool.getContext(projectPath); let repository; if (context.isPresent()) { repository = context.getRepository(); - await repository.clone(remoteUrl); + await repository.clone(remoteUrl, sourceRemoteName); repository.destroy(); } else { repository = new Repository(projectPath, null, {pipelineManager: this.pipelineManager}); - await repository.clone(remoteUrl); + await repository.clone(remoteUrl, sourceRemoteName); } this.workdirCache.invalidate(); - this.project.addPath(projectPath); - await this.scheduleActiveContextUpdate(); + + reporterProxy.addEvent('clone-repository', {project: 'github'}); } getRepositoryForWorkdir(projectPath) { @@ -484,88 +518,181 @@ export default class GithubPackage { return this.switchboard; } - async scheduleActiveContextUpdate(savedState = {}) { + /** + * Enqueue a request to modify the active context. + * + * options: + * usePath - Path of the context to use as the next context, if it is present in the pool. + * lock - True or false to lock the ultimately chosen context. Omit to preserve the current lock state. + * + * This method returns a Promise that resolves when the requested context update has completed. Note that it's + * *possible* for the active context after resolution to differ from a requested `usePath`, if the workdir + * containing `usePath` is no longer a viable option, such as if it belongs to a project that is no longer present. + */ + async scheduleActiveContextUpdate(options = {}) { this.switchboard.didScheduleActiveContextUpdate(); - await this.activeContextQueue.push(this.updateActiveContext.bind(this, savedState), {parallel: false}); + await this.activeContextQueue.push(this.updateActiveContext.bind(this, options), {parallel: false}); } /** * Derive the git working directory context that should be used for the package's git operations based on the current * state of the Atom workspace. In priority, this prefers: * - * - A git working directory that contains the active pane item in the workspace's center. - * - A git working directory corresponding to a single Project. - * - When initially activating the package, the working directory that was active when the package was last - * serialized. + * - When activating: the working directory that was active when the package was last serialized, if it still a viable + * option. (usePath) + * - The working directory chosen by the user from the context tile on the git or GitHub tabs. (usePath) + * - The working directory containing the path of the active pane item. + * - A git working directory corresponding to "first" project, if any projects are open. * - The current context, unchanged, which may be a `NullWorkdirContext`. * * First updates the pool of resident contexts to match all git working directories that correspond to open * projects and pane items. */ - async getNextContext(savedState) { + async getNextContext(usePath = null) { + // Internal utility function to normalize paths not contained within a git + // working tree. + const workdirForNonGitPath = async sourcePath => { + const containingRoot = this.project.getDirectories().find(root => root.contains(sourcePath)); + if (containingRoot) { + return containingRoot.getPath(); + /* istanbul ignore else */ + } else if (!(await fs.stat(sourcePath)).isDirectory()) { + return path.dirname(sourcePath); + } else { + return sourcePath; + } + }; + + // Internal utility function to identify the working directory to use for + // an arbitrary (file or directory) path. + const workdirForPath = async sourcePath => { + return (await Promise.all([ + this.workdirCache.find(sourcePath), + workdirForNonGitPath(sourcePath), + ])).find(Boolean); + }; + + // Identify paths that *could* contribute a git working directory to the pool. This is drawn from + // the roots of open projects, the currently locked context if one is present, and the path of the + // open workspace item. + const candidatePaths = new Set(this.project.getPaths()); + if (this.lockedContext) { + const lockedRepo = this.lockedContext.getRepository(); + /* istanbul ignore else */ + if (lockedRepo) { + candidatePaths.add(lockedRepo.getWorkingDirectoryPath()); + } + } + const activeItemPath = pathForPaneItem(this.workspace.getCenter().getActivePaneItem()); + if (activeItemPath) { + candidatePaths.add(activeItemPath); + } + + let activeItemWorkdir = null; + let firstProjectWorkdir = null; + + // Convert the candidate paths into the set of viable git working directories, by means of a cached + // `git rev-parse` call. Candidate paths that are not contained within a git working directory will + // be preserved as-is within the pool, to allow users to initialize them. const workdirs = new Set( await Promise.all( - this.project.getPaths().map(async projectPath => { - const workdir = await this.workdirCache.find(projectPath); - return workdir || projectPath; + Array.from(candidatePaths, async candidatePath => { + const workdir = await workdirForPath(candidatePath); + + // Note the workdirs associated with the active pane item and the first open project so we can + // prefer them later. + if (candidatePath === activeItemPath) { + activeItemWorkdir = workdir; + } else if (candidatePath === this.project.getPaths()[0]) { + firstProjectWorkdir = workdir; + } + + return workdir; }), ), ); - const fromPaneItem = async maybeItem => { - const itemPath = pathForPaneItem(maybeItem); - - if (!itemPath) { - return {}; + // Update pool with the identified projects. + this.contextPool.set(workdirs); + + // 1 - Explicitly requested workdir. This is either selected by the user from a context tile or + // deserialized from package state. Choose this context only if it still exists in the pool. + if (usePath) { + // Normalize usePath in a similar fashion to the way we do activeItemPath. + let useWorkdir = usePath; + if (usePath === activeItemPath) { + useWorkdir = activeItemWorkdir; + } else if (usePath === this.project.getPaths()[0]) { + useWorkdir = firstProjectWorkdir; + } else { + useWorkdir = await workdirForPath(usePath); } - const itemWorkdir = await this.workdirCache.find(itemPath); - - if (itemWorkdir && !this.project.contains(itemPath)) { - workdirs.add(itemWorkdir); + const stateContext = this.contextPool.getContext(useWorkdir); + if (stateContext.isPresent()) { + return stateContext; } + } - return {itemPath, itemWorkdir}; - }; - - const active = await fromPaneItem(this.workspace.getCenter().getActivePaneItem()); - - this.contextPool.set(workdirs, savedState); + // 2 - Use the currently locked context, if one is present. + if (this.lockedContext) { + return this.lockedContext; + } - if (active.itemPath) { - // Prefer an active item - return this.contextPool.getContext(active.itemWorkdir || active.itemPath); + // 3 - Follow the active workspace pane item. + if (activeItemWorkdir) { + return this.contextPool.getContext(activeItemWorkdir); } - if (this.project.getPaths().length === 1) { - // Single project - const projectPath = this.project.getPaths()[0]; - const activeWorkingDir = await this.workdirCache.find(projectPath); - return this.contextPool.getContext(activeWorkingDir || projectPath); + // 4 - The first open project. + if (firstProjectWorkdir) { + return this.contextPool.getContext(firstProjectWorkdir); } + // No projects. Revert to the absent context unless we've guessed that more projects are on the way. if (this.project.getPaths().length === 0 && !this.activeContext.getRepository().isUndetermined()) { - // No projects. Revert to the absent context unless we've guessed that more projects are on the way. return WorkdirContext.absent({pipelineManager: this.pipelineManager}); } - // Restore models from saved state. Will return a NullWorkdirContext if this path is not presently - // resident in the pool. - const savedWorkingDir = savedState.activeRepositoryPath; - if (savedWorkingDir) { - return this.contextPool.getContext(savedWorkingDir); - } - + // It is only possible to reach here if there there was no preferred directory, there are no project paths, and the + // the active context's repository is not undetermined. Preserve the existing active context. return this.activeContext; } - setActiveContext(nextActiveContext) { + /** + * Modify the active context and re-render the React tree. This should only be done as part of the + * context update queue; use scheduleActiveContextUpdate() to do this. + * + * nextActiveContext - The WorkdirContext to make active next, as derived from the current workspace + * state by getNextContext(). This may be absent or undetermined. + * lock - If true, also set this context as the "locked" one and engage the context lock if it isn't + * already. If false, clear any existing context lock. If null or undefined, leave the lock in its + * existing state. + */ + setActiveContext(nextActiveContext, lock) { if (nextActiveContext !== this.activeContext) { if (this.activeContext === this.guessedContext) { this.guessedContext.destroy(); this.guessedContext = null; } this.activeContext = nextActiveContext; + if (lock === true) { + this.lockedContext = this.activeContext; + } else if (lock === false) { + this.lockedContext = null; + } + + this.rerender(() => { + this.switchboard.didFinishContextChangeRender(); + this.switchboard.didFinishActiveContextUpdate(); + }); + } else if ((lock === true || lock === false) && lock !== (this.lockedContext !== null)) { + if (lock) { + this.lockedContext = this.activeContext; + } else { + this.lockedContext = null; + } + this.rerender(() => { this.switchboard.didFinishContextChangeRender(); this.switchboard.didFinishActiveContextUpdate(); @@ -575,15 +702,22 @@ export default class GithubPackage { } } - async updateActiveContext(savedState = {}) { + /** + * Derive the next active context with getNextContext(), then enact the context change with setActiveContext(). + * + * options: + * usePath - Path of the context to use as the next context, if it is present in the pool. + * lock - True or false to lock the ultimately chosen context. Omit to preserve the current lock state. + */ + async updateActiveContext(options) { if (this.workspace.isDestroyed()) { return; } this.switchboard.didBeginActiveContextUpdate(); - const nextActiveContext = await this.getNextContext(savedState); - this.setActiveContext(nextActiveContext); + const nextActiveContext = await this.getNextContext(options.usePath); + this.setActiveContext(nextActiveContext, options.lock); } async refreshAtomGitRepository(workdir) { diff --git a/lib/helpers.js b/lib/helpers.js index 9b4c0738ea..30e694bc98 100644 --- a/lib/helpers.js +++ b/lib/helpers.js @@ -4,6 +4,7 @@ import os from 'os'; import temp from 'temp'; import RefHolder from './models/ref-holder'; +import Author from './models/author'; export const LINE_ENDING_REGEX = /\r?\n/; export const CO_AUTHOR_REGEX = /^co-authored-by. (.+?) <(.+?)>$/i; @@ -415,7 +416,7 @@ export function extractCoAuthorsAndRawCommitMessage(commitMessage) { if (match) { // eslint-disable-next-line no-unused-vars const [_, name, email] = match; - coAuthors.push({name, email}); + coAuthors.push(new Author(email, name)); } else { messageLines.push(line); } diff --git a/lib/index.js b/lib/index.js index 814bca9773..3127c286c7 100644 --- a/lib/index.js +++ b/lib/index.js @@ -17,6 +17,7 @@ const entry = { confirm: atom.confirm.bind(atom), getLoadSettings: atom.getLoadSettings.bind(atom), + currentWindow: atom.getCurrentWindow(), configDirPath: atom.getConfigDirPath(), }); diff --git a/lib/items/github-tab-item.js b/lib/items/github-tab-item.js index dc55141ef6..5a4452dc7c 100644 --- a/lib/items/github-tab-item.js +++ b/lib/items/github-tab-item.js @@ -12,6 +12,14 @@ export default class GitHubTabItem extends React.Component { loginModel: GithubLoginModelPropType.isRequired, documentActiveElement: PropTypes.func, + + changeWorkingDirectory: PropTypes.func.isRequired, + onDidChangeWorkDirs: PropTypes.func.isRequired, + getCurrentWorkDirs: PropTypes.func.isRequired, + openCreateDialog: PropTypes.func.isRequired, + openPublishDialog: PropTypes.func.isRequired, + openCloneDialog: PropTypes.func.isRequired, + openGitTab: PropTypes.func.isRequired, } static defaultProps = { diff --git a/lib/models/author.js b/lib/models/author.js index 4a699ecd82..2e1e7e9f10 100644 --- a/lib/models/author.js +++ b/lib/models/author.js @@ -3,11 +3,24 @@ const NEW = Symbol('new'); export const NO_REPLY_GITHUB_EMAIL = 'noreply@github.com'; export default class Author { - constructor(email, fullName, login = null, isNew = null) { + constructor(email, fullName, login = null, isNew = null, avatarUrl = null) { + if (avatarUrl == null) { + const match = (email || '').match(/^(\d+)\+[^@]+@users.noreply.github.com$/); + + if (match) { + avatarUrl = 'https://avatars.githubusercontent.com/u/' + match[1] + '?s=32'; + } else if (email && email !== '') { + avatarUrl = 'https://avatars.githubusercontent.com/u/e?email=' + encodeURIComponent(email) + '&s=32'; + } else { + avatarUrl = ''; + } + } + this.email = email; this.fullName = fullName; this.login = login; this.new = isNew === NEW; + this.avatarUrl = avatarUrl; } static createNew(email, fullName) { @@ -18,6 +31,10 @@ export default class Author { return this.email; } + getAvatarUrl() { + return this.avatarUrl; + } + getFullName() { return this.fullName; } @@ -66,6 +83,10 @@ export const nullAuthor = { return ''; }, + getAvatarUrl() { + return ''; + }, + getFullName() { return ''; }, diff --git a/lib/models/commit.js b/lib/models/commit.js index 81d681d14b..c264975bdc 100644 --- a/lib/models/commit.js +++ b/lib/models/commit.js @@ -16,10 +16,9 @@ export default class Commit { return new Commit({unbornRef: UNBORN}); } - constructor({sha, authorEmail, authorName, coAuthors, authorDate, messageSubject, messageBody, unbornRef, patch}) { + constructor({sha, author, coAuthors, authorDate, messageSubject, messageBody, unbornRef, patch}) { this.sha = sha; - this.authorEmail = authorEmail; - this.authorName = authorName; + this.author = author; this.coAuthors = coAuthors || []; this.authorDate = authorDate; this.messageSubject = messageSubject; @@ -33,12 +32,20 @@ export default class Commit { return this.sha; } + getAuthor() { + return this.author; + } + getAuthorEmail() { - return this.authorEmail; + return this.author.getEmail(); + } + + getAuthorAvatarUrl() { + return this.author.getAvatarUrl(); } getAuthorName() { - return this.authorName; + return this.author.getFullName(); } getAuthorDate() { @@ -149,13 +156,18 @@ export default class Commit { isEqual(other) { // Directly comparable properties - const properties = ['sha', 'authorEmail', 'authorDate', 'messageSubject', 'messageBody', 'unbornRef', 'authorName']; + const properties = ['sha', 'authorDate', 'messageSubject', 'messageBody', 'unbornRef']; for (const property of properties) { if (this[property] !== other[property]) { return false; } } + // Author + if (this.author.getEmail() !== other.getAuthorEmail() || this.author.getFullName() !== other.getAuthorName()) { + return false; + } + // Co-author array if (this.coAuthors.length !== other.coAuthors.length) { return false; @@ -164,7 +176,10 @@ export default class Commit { const thisCoAuthor = this.coAuthors[i]; const otherCoAuthor = other.coAuthors[i]; - if (thisCoAuthor.name !== otherCoAuthor.name || thisCoAuthor.email !== otherCoAuthor.email) { + if ( + thisCoAuthor.getFullName() !== otherCoAuthor.getFullName() + || thisCoAuthor.getEmail() !== otherCoAuthor.getEmail() + ) { return false; } } diff --git a/lib/models/discard-history.js b/lib/models/discard-history.js index 3521ae3b81..01a211212e 100644 --- a/lib/models/discard-history.js +++ b/lib/models/discard-history.js @@ -127,7 +127,7 @@ export default class DiscardHistory { await this.expandBlobToFile(path.join(tempFolderPath, `${filePath}-before-discard`), beforeSha); const commonBasePath = !afterSha ? null : await this.expandBlobToFile(path.join(tempFolderPath, `${filePath}-after-discard`), afterSha); - const resultPath = path.join(tempFolderPath, `~${path.basename(filePath)}-merge-result`); + const resultPath = path.join(dir, `~${path.basename(filePath)}-merge-result`); return {filePath, commonBasePath, theirsPath, resultPath, theirsSha: beforeSha, commonBaseSha: afterSha}; }); return await Promise.all(pathPromises); diff --git a/lib/models/endpoint.js b/lib/models/endpoint.js index 3fc5fd2fef..6dbe54b4bc 100644 --- a/lib/models/endpoint.js +++ b/lib/models/endpoint.js @@ -30,11 +30,11 @@ class Endpoint { } // API endpoint for GitHub.com -const dotcomEndpoint = new Endpoint('github.com', 'api.github.com', []); +export const DOTCOM = new Endpoint('github.com', 'api.github.com', []); export function getEndpoint(host) { if (host === 'github.com') { - return dotcomEndpoint; + return DOTCOM; } else { return new Endpoint(host, host, ['api', 'v3']); } diff --git a/lib/models/refresher.js b/lib/models/refresher.js new file mode 100644 index 0000000000..864cbd798a --- /dev/null +++ b/lib/models/refresher.js @@ -0,0 +1,26 @@ +/** + * Uniformly trigger a refetch of all GraphQL query containers within a scoped hierarchy. + */ +export default class Refresher { + constructor() { + this.dispose(); + } + + setRetryCallback(key, retryCallback) { + this.retryByKey.set(key, retryCallback); + } + + trigger() { + for (const [, retryCallback] of this.retryByKey) { + retryCallback(); + } + } + + deregister(key) { + this.retryByKey.delete(key); + } + + dispose() { + this.retryByKey = new Map(); + } +} diff --git a/lib/models/remote.js b/lib/models/remote.js index f9c5dd06ee..895d27f5b1 100644 --- a/lib/models/remote.js +++ b/lib/models/remote.js @@ -1,4 +1,4 @@ -import {getEndpoint} from './endpoint'; +import {getEndpoint, DOTCOM} from './endpoint'; export default class Remote { constructor(name, url) { @@ -57,6 +57,10 @@ export default class Remote { return this.domain === null ? null : getEndpoint(this.domain); } + getEndpointOrDotcom() { + return this.getEndpoint() || DOTCOM; + } + isPresent() { return true; } @@ -135,6 +139,10 @@ export const nullRemote = { return null; }, + getEndpointOrDotcom() { + return DOTCOM; + }, + isPresent() { return false; }, diff --git a/lib/models/repository-states/cache/keys.js b/lib/models/repository-states/cache/keys.js new file mode 100644 index 0000000000..1a58bfbdd0 --- /dev/null +++ b/lib/models/repository-states/cache/keys.js @@ -0,0 +1,164 @@ +class CacheKey { + constructor(primary, groups = []) { + this.primary = primary; + this.groups = groups; + } + + getPrimary() { + return this.primary; + } + + getGroups() { + return this.groups; + } + + removeFromCache(cache, withoutGroup = null) { + cache.removePrimary(this.getPrimary()); + + const groups = this.getGroups(); + for (let i = 0; i < groups.length; i++) { + const group = groups[i]; + if (group === withoutGroup) { + continue; + } + + cache.removeFromGroup(group, this); + } + } + + /* istanbul ignore next */ + toString() { + return `CacheKey(${this.primary})`; + } +} + +class GroupKey { + constructor(group) { + this.group = group; + } + + removeFromCache(cache) { + for (const matchingKey of cache.keysInGroup(this.group)) { + matchingKey.removeFromCache(cache, this.group); + } + } + + /* istanbul ignore next */ + toString() { + return `GroupKey(${this.group})`; + } +} + +export const Keys = { + statusBundle: new CacheKey('status-bundle'), + + stagedChanges: new CacheKey('staged-changes'), + + filePatch: { + _optKey: ({staged}) => (staged ? 's' : 'u'), + + oneWith: (fileName, options) => { // <-- Keys.filePatch + const optKey = Keys.filePatch._optKey(options); + const baseCommit = options.baseCommit || 'head'; + + const extraGroups = []; + if (options.baseCommit) { + extraGroups.push(`file-patch:base-nonhead:path-${fileName}`); + extraGroups.push('file-patch:base-nonhead'); + } else { + extraGroups.push('file-patch:base-head'); + } + + return new CacheKey(`file-patch:${optKey}:${baseCommit}:${fileName}`, [ + 'file-patch', + `file-patch:opt-${optKey}`, + `file-patch:opt-${optKey}:path-${fileName}`, + ...extraGroups, + ]); + }, + + eachWithFileOpts: (fileNames, opts) => { + const keys = []; + for (let i = 0; i < fileNames.length; i++) { + for (let j = 0; j < opts.length; j++) { + keys.push(new GroupKey(`file-patch:opt-${Keys.filePatch._optKey(opts[j])}:path-${fileNames[i]}`)); + } + } + return keys; + }, + + eachNonHeadWithFiles: fileNames => { + return fileNames.map(fileName => new GroupKey(`file-patch:base-nonhead:path-${fileName}`)); + }, + + allAgainstNonHead: new GroupKey('file-patch:base-nonhead'), + + eachWithOpts: (...opts) => opts.map(opt => new GroupKey(`file-patch:opt-${Keys.filePatch._optKey(opt)}`)), + + all: new GroupKey('file-patch'), + }, + + index: { + oneWith: fileName => new CacheKey(`index:${fileName}`, ['index']), + + all: new GroupKey('index'), + }, + + lastCommit: new CacheKey('last-commit'), + + recentCommits: new CacheKey('recent-commits'), + + authors: new CacheKey('authors'), + + branches: new CacheKey('branches'), + + headDescription: new CacheKey('head-description'), + + remotes: new CacheKey('remotes'), + + config: { + _optKey: options => (options.local ? 'l' : ''), + + oneWith: (setting, options) => { + const optKey = Keys.config._optKey(options); + return new CacheKey(`config:${optKey}:${setting}`, ['config', `config:${optKey}`]); + }, + + eachWithSetting: setting => [ + Keys.config.oneWith(setting, {local: true}), + Keys.config.oneWith(setting, {local: false}), + ], + + all: new GroupKey('config'), + }, + + blob: { + oneWith: sha => new CacheKey(`blob:${sha}`, ['blob']), + }, + + // Common collections of keys and patterns for use with invalidate(). + + workdirOperationKeys: fileNames => [ + Keys.statusBundle, + ...Keys.filePatch.eachWithFileOpts(fileNames, [{staged: false}]), + ], + + cacheOperationKeys: fileNames => [ + ...Keys.workdirOperationKeys(fileNames), + ...Keys.filePatch.eachWithFileOpts(fileNames, [{staged: true}]), + ...fileNames.map(Keys.index.oneWith), + Keys.stagedChanges, + ], + + headOperationKeys: () => [ + Keys.headDescription, + Keys.branches, + ...Keys.filePatch.eachWithOpts({staged: true}), + Keys.filePatch.allAgainstNonHead, + Keys.stagedChanges, + Keys.lastCommit, + Keys.recentCommits, + Keys.authors, + Keys.statusBundle, + ], +}; diff --git a/lib/models/repository-states/cloning.js b/lib/models/repository-states/cloning.js index 44afb487dd..52d1bc1cbe 100644 --- a/lib/models/repository-states/cloning.js +++ b/lib/models/repository-states/cloning.js @@ -6,14 +6,15 @@ import State from './state'; * Git is asynchronously cloning a repository into this working directory. */ export default class Cloning extends State { - constructor(repository, remoteUrl) { + constructor(repository, remoteUrl, sourceRemoteName) { super(repository); this.remoteUrl = remoteUrl; + this.sourceRemoteName = sourceRemoteName; } async start() { await fs.mkdirs(this.workdir()); - await this.doClone(this.remoteUrl, {recursive: true}); + await this.doClone(this.remoteUrl, {recursive: true, sourceRemoteName: this.sourceRemoteName}); await this.transitionTo('Loading'); } diff --git a/lib/models/repository-states/empty.js b/lib/models/repository-states/empty.js index 116ceae31c..fe8d9e3f24 100644 --- a/lib/models/repository-states/empty.js +++ b/lib/models/repository-states/empty.js @@ -12,8 +12,8 @@ export default class Empty extends State { return this.transitionTo('Initializing'); } - clone(remoteUrl) { - return this.transitionTo('Cloning', remoteUrl); + clone(remoteUrl, sourceRemoteName) { + return this.transitionTo('Cloning', remoteUrl, sourceRemoteName); } showGitTabInit() { diff --git a/lib/models/repository-states/present.js b/lib/models/repository-states/present.js index 3a18aa5a8f..0c0a9d7a09 100644 --- a/lib/models/repository-states/present.js +++ b/lib/models/repository-states/present.js @@ -3,6 +3,7 @@ import {Emitter} from 'event-kit'; import fs from 'fs-extra'; import State from './state'; +import {Keys} from './cache/keys'; import {LargeRepoError} from '../../git-shell-out-strategy'; import {FOCUS} from '../workspace-change-observer'; @@ -98,9 +99,16 @@ export default class Present extends State { return true; } - acceptInvalidation(spec) { + isPublishable() { + return true; + } + + acceptInvalidation(spec, {globally} = {}) { this.cache.invalidate(spec()); this.didUpdate(); + if (globally) { + this.didGloballyInvalidate(spec); + } } invalidateCacheAfterFilesystemChange(events) { @@ -515,10 +523,11 @@ export default class Present extends State { // Configuration - setConfig(setting, value, options) { + setConfig(setting, value, options = {}) { return this.invalidate( () => Keys.config.eachWithSetting(setting), () => this.git().setConfig(setting, value, options), + {globally: options.global}, ); } @@ -926,14 +935,14 @@ export default class Present extends State { return this.cache; } - invalidate(spec, body) { + invalidate(spec, body, options = {}) { return body().then( result => { - this.acceptInvalidation(spec); + this.acceptInvalidation(spec, options); return result; }, err => { - this.acceptInvalidation(spec); + this.acceptInvalidation(spec, options); return Promise.reject(err); }, ); @@ -1044,168 +1053,3 @@ class Cache { this.emitter.dispose(); } } - -class CacheKey { - constructor(primary, groups = []) { - this.primary = primary; - this.groups = groups; - } - - getPrimary() { - return this.primary; - } - - getGroups() { - return this.groups; - } - - removeFromCache(cache, withoutGroup = null) { - cache.removePrimary(this.getPrimary()); - - const groups = this.getGroups(); - for (let i = 0; i < groups.length; i++) { - const group = groups[i]; - if (group === withoutGroup) { - continue; - } - - cache.removeFromGroup(group, this); - } - } - - /* istanbul ignore next */ - toString() { - return `CacheKey(${this.primary})`; - } -} - -class GroupKey { - constructor(group) { - this.group = group; - } - - removeFromCache(cache) { - for (const matchingKey of cache.keysInGroup(this.group)) { - matchingKey.removeFromCache(cache, this.group); - } - } - - /* istanbul ignore next */ - toString() { - return `GroupKey(${this.group})`; - } -} - -const Keys = { - statusBundle: new CacheKey('status-bundle'), - - stagedChanges: new CacheKey('staged-changes'), - - filePatch: { - _optKey: ({staged}) => (staged ? 's' : 'u'), - - oneWith: (fileName, options) => { // <-- Keys.filePatch - const optKey = Keys.filePatch._optKey(options); - const baseCommit = options.baseCommit || 'head'; - - const extraGroups = []; - if (options.baseCommit) { - extraGroups.push(`file-patch:base-nonhead:path-${fileName}`); - extraGroups.push('file-patch:base-nonhead'); - } else { - extraGroups.push('file-patch:base-head'); - } - - return new CacheKey(`file-patch:${optKey}:${baseCommit}:${fileName}`, [ - 'file-patch', - `file-patch:opt-${optKey}`, - `file-patch:opt-${optKey}:path-${fileName}`, - ...extraGroups, - ]); - }, - - eachWithFileOpts: (fileNames, opts) => { - const keys = []; - for (let i = 0; i < fileNames.length; i++) { - for (let j = 0; j < opts.length; j++) { - keys.push(new GroupKey(`file-patch:opt-${Keys.filePatch._optKey(opts[j])}:path-${fileNames[i]}`)); - } - } - return keys; - }, - - eachNonHeadWithFiles: fileNames => { - return fileNames.map(fileName => new GroupKey(`file-patch:base-nonhead:path-${fileName}`)); - }, - - allAgainstNonHead: new GroupKey('file-patch:base-nonhead'), - - eachWithOpts: (...opts) => opts.map(opt => new GroupKey(`file-patch:opt-${Keys.filePatch._optKey(opt)}`)), - - all: new GroupKey('file-patch'), - }, - - index: { - oneWith: fileName => new CacheKey(`index:${fileName}`, ['index']), - - all: new GroupKey('index'), - }, - - lastCommit: new CacheKey('last-commit'), - - recentCommits: new CacheKey('recent-commits'), - - authors: new CacheKey('authors'), - - branches: new CacheKey('branches'), - - headDescription: new CacheKey('head-description'), - - remotes: new CacheKey('remotes'), - - config: { - _optKey: options => (options.local ? 'l' : ''), - - oneWith: (setting, options) => { - const optKey = Keys.config._optKey(options); - return new CacheKey(`config:${optKey}:${setting}`, ['config', `config:${optKey}`]); - }, - - eachWithSetting: setting => [ - Keys.config.oneWith(setting, {local: true}), - Keys.config.oneWith(setting, {local: false}), - ], - - all: new GroupKey('config'), - }, - - blob: { - oneWith: sha => new CacheKey(`blob:${sha}`, ['blob']), - }, - - // Common collections of keys and patterns for use with invalidate(). - - workdirOperationKeys: fileNames => [ - Keys.statusBundle, - ...Keys.filePatch.eachWithFileOpts(fileNames, [{staged: false}]), - ], - - cacheOperationKeys: fileNames => [ - ...Keys.workdirOperationKeys(fileNames), - ...Keys.filePatch.eachWithFileOpts(fileNames, [{staged: true}]), - ...fileNames.map(Keys.index.oneWith), - Keys.stagedChanges, - ], - - headOperationKeys: () => [ - Keys.headDescription, - Keys.branches, - ...Keys.filePatch.eachWithOpts({staged: true}), - Keys.filePatch.allAgainstNonHead, - Keys.stagedChanges, - Keys.lastCommit, - Keys.recentCommits, - Keys.authors, - Keys.statusBundle, - ], -}; diff --git a/lib/models/repository-states/state.js b/lib/models/repository-states/state.js index 9e36786062..38346acb42 100644 --- a/lib/models/repository-states/state.js +++ b/lib/models/repository-states/state.js @@ -1,8 +1,11 @@ +import path from 'path'; import {nullCommit} from '../commit'; import BranchSet from '../branch-set'; import RemoteSet from '../remote-set'; import {nullOperationStates} from '../operation-states'; import MultiFilePatch from '../patch/multi-file-patch'; +import CompositeGitStrategy from '../../composite-git-strategy'; +import {Keys} from './cache/keys'; /** * Map of registered subclasses to allow states to transition to one another without circular dependencies. @@ -89,6 +92,10 @@ export default class State { return true; } + isPublishable() { + return false; + } + // Lifecycle actions ///////////////////////////////////////////////////////////////////////////////////////////////// // These generally default to rejecting a Promise with an error. @@ -206,8 +213,12 @@ export default class State { // Configuration - setConfig(option, value, {replaceAll} = {}) { - return unsupportedOperationPromise(this, 'setConfig'); + async setConfig(optionName, value, options = {}) { + await this.workdirlessGit().setConfig(optionName, value, options); + this.didUpdate(); + if (options.global) { + this.didGloballyInvalidate(() => Keys.config.eachWithSetting(optionName)); + } } unsetConfig(option) { @@ -353,15 +364,15 @@ export default class State { } getAheadCount(branchName) { - return Promise.resolve(null); + return Promise.resolve(0); } getBehindCount(branchName) { - return Promise.resolve(null); + return Promise.resolve(0); } - getConfig(option, {local} = {}) { - return Promise.resolve(null); + getConfig(optionName, options) { + return this.workdirlessGit().getConfig(optionName, options); } // Direct blob access @@ -408,6 +419,10 @@ export default class State { return null; } + acceptInvalidation() { + return null; + } + // Internal ////////////////////////////////////////////////////////////////////////////////////////////////////////// // Non-delegated methods that provide subclasses with convenient access to Repository properties. @@ -463,9 +478,21 @@ export default class State { return this.repository.emitter.emit('did-update'); } + didGloballyInvalidate(spec) { + return this.repository.emitter.emit('did-globally-invalidate', spec); + } + // Direct git access // Non-delegated git operations for internal use within states. + workdirlessGit() { + // We want to report config values from the global or system level, but never local ones (unless we're in the + // present state, which overrides this). + // The filesystem root is the most likely and convenient place for this to be true. + const {root} = path.parse(process.cwd()); + return CompositeGitStrategy.create(root); + } + /* istanbul ignore next */ directResolveDotGitDir() { return Promise.resolve(null); diff --git a/lib/models/repository.js b/lib/models/repository.js index 65c07298b7..a34ab6a7c3 100644 --- a/lib/models/repository.js +++ b/lib/models/repository.js @@ -2,6 +2,7 @@ import path from 'path'; import {Emitter} from 'event-kit'; import fs from 'fs-extra'; +import yubikiri from 'yubikiri'; import {getNullActionPipelineManager} from '../action-pipeline'; import CompositeGitStrategy from '../composite-git-strategy'; @@ -107,6 +108,10 @@ export default class Repository { return this.emitter.on('did-update', callback); } + onDidGloballyInvalidate(callback) { + return this.emitter.on('did-globally-invalidate', callback); + } + onPullError(callback) { return this.emitter.on('pull-error', callback); } @@ -229,18 +234,10 @@ export default class Repository { } async getCommitter(options = {}) { - const output = await this.getConfig(['--get-regexp', '^user.*'], options); - const committer = {name: null, email: null}; - // todo (tt, 4/2018): do we need null byte terminated output here for Windows? - if (output) { - output.trim().split('\n').forEach(line => { - if (line.includes('user.email')) { - committer.email = line.slice(11); - } else if (line.includes('user.name')) { - committer.name = line.slice(10); - } - }); - } + const committer = await yubikiri({ + email: this.getConfig('user.email', options), + name: this.getConfig('user.name', options), + }); return committer.name !== null && committer.email !== null ? new Author(committer.email, committer.name) @@ -291,6 +288,7 @@ const delegates = [ 'showGitTabLoading', 'showStatusBarTiles', 'hasDirectory', + 'isPublishable', 'init', 'clone', @@ -378,6 +376,7 @@ const delegates = [ 'getCommitMessage', 'fetchCommitMessageTemplate', 'getCache', + 'acceptInvalidation', ]; for (let i = 0; i < delegates.length; i++) { diff --git a/lib/models/workdir-cache.js b/lib/models/workdir-cache.js index 8a1f229040..a6fbc41c3a 100644 --- a/lib/models/workdir-cache.js +++ b/lib/models/workdir-cache.js @@ -38,10 +38,15 @@ export default class WorkdirCache { const startDir = (await fs.stat(startPath)).isDirectory() ? startPath : path.dirname(startPath); // Within a git worktree, return a non-empty string containing the path to the worktree root. - // Within a gitdir or outside of a worktree, return an empty string. - // Throw if startDir does not exist. - const topLevel = await CompositeGitStrategy.create(startDir).exec(['rev-parse', '--show-toplevel']); - if (/\S/.test(topLevel)) { + // Throw if a gitdir, outside of a worktree, or startDir does not exist. + const topLevel = await CompositeGitStrategy.create(startDir).exec(['rev-parse', '--show-toplevel']) + .catch(e => { + if (/this operation must be run in a work tree/.test(e.stdErr)) { + return null; + } + throw e; + }); + if (topLevel !== null) { return toNativePathSep(topLevel.trim()); } diff --git a/lib/models/workdir-context-pool.js b/lib/models/workdir-context-pool.js index 0adad67557..0ee6e88e4e 100644 --- a/lib/models/workdir-context-pool.js +++ b/lib/models/workdir-context-pool.js @@ -1,6 +1,6 @@ import compareSets from 'compare-sets'; -import {Emitter, CompositeDisposable} from 'event-kit'; +import {Emitter} from 'event-kit'; import WorkdirContext from './workdir-context'; /** @@ -46,7 +46,7 @@ export default class WorkdirContextPool { return filtered.length === 1 ? filtered[0] : WorkdirContext.absent({...this.options}); } - add(directory, options = {}) { + add(directory, options = {}, silenceEmitter = false) { if (this.contexts.has(directory)) { return this.getContext(directory); } @@ -54,7 +54,7 @@ export default class WorkdirContextPool { const context = new WorkdirContext(directory, {...this.options, ...options}); this.contexts.set(directory, context); - const disposable = new CompositeDisposable(); + const disposable = context.subs; const forwardEvent = (subMethod, emitEventName) => { const emit = () => this.emitter.emit(emitEventName, context); @@ -67,27 +67,41 @@ export default class WorkdirContextPool { forwardEvent('onDidUpdateRepository', 'did-update-repository'); forwardEvent('onDidDestroyRepository', 'did-destroy-repository'); - disposable.add(this.onDidRemoveContext(removed => { - if (removed === context) { - disposable.dispose(); - } + // Propagate global cache invalidations across all resident contexts + disposable.add(context.getRepository().onDidGloballyInvalidate(spec => { + this.withResidentContexts((_workdir, eachContext) => { + if (eachContext !== context) { + eachContext.getRepository().acceptInvalidation(spec); + } + }); })); + if (!silenceEmitter) { + this.emitter.emit('did-change-contexts', {added: new Set([directory])}); + } + return context; } - replace(directory, options = {}) { - this.remove(directory); - this.add(directory, options); + replace(directory, options = {}, silenceEmitter = false) { + this.remove(directory, true); + this.add(directory, options, true); + + if (!silenceEmitter) { + this.emitter.emit('did-change-contexts', {altered: new Set([directory])}); + } } - remove(directory) { + remove(directory, silenceEmitter = false) { const existing = this.contexts.get(directory); this.contexts.delete(directory); if (existing) { - this.emitter.emit('did-remove-context', existing); existing.destroy(); + + if (!silenceEmitter) { + this.emitter.emit('did-change-contexts', {removed: new Set([directory])}); + } } } @@ -96,13 +110,21 @@ export default class WorkdirContextPool { const {added, removed} = compareSets(previous, directories); for (const directory of added) { - this.add(directory, options); + this.add(directory, options, true); } for (const directory of removed) { - this.remove(directory); + this.remove(directory, true); + } + + if (added.size !== 0 || removed.size !== 0) { + this.emitter.emit('did-change-contexts', {added, removed}); } } + getCurrentWorkDirs() { + return this.contexts.keys(); + } + withResidentContexts(callback) { const results = []; for (const [workdir, context] of this.contexts) { @@ -115,12 +137,12 @@ export default class WorkdirContextPool { return this.emitter.on('did-start-observer', callback); } - onDidChangeWorkdirOrHead(callback) { - return this.emitter.on('did-change-workdir-or-head', callback); + onDidChangePoolContexts(callback) { + return this.emitter.on('did-change-contexts', callback); } - onDidRemoveContext(callback) { - return this.emitter.on('did-remove-context', callback); + onDidChangeWorkdirOrHead(callback) { + return this.emitter.on('did-change-workdir-or-head', callback); } onDidChangeRepositoryState(callback) { @@ -136,7 +158,17 @@ export default class WorkdirContextPool { } clear() { - this.withResidentContexts(workdir => this.remove(workdir)); + const workdirs = new Set(); + + this.withResidentContexts(workdir => { + this.remove(workdir, true); + workdirs.add(workdir); + }); + WorkdirContext.destroyAbsent(); + + if (workdirs.size !== 0) { + this.emitter.emit('did-change-contexts', {removed: workdirs}); + } } } diff --git a/lib/mutations/__generated__/addPrReviewCommentMutation.graphql.js b/lib/mutations/__generated__/addPrReviewCommentMutation.graphql.js index 70b6fdd8e3..ff1010e51a 100644 --- a/lib/mutations/__generated__/addPrReviewCommentMutation.graphql.js +++ b/lib/mutations/__generated__/addPrReviewCommentMutation.graphql.js @@ -1,6 +1,6 @@ /** * @flow - * @relayHash 260cc8d4bf18b2689dae75db2532413a + * @relayHash 538bae86191b750e560b6ad8e2979c29 */ /* eslint-disable */ @@ -10,9 +10,10 @@ /*:: import type { ConcreteRequest } from 'relay-runtime'; type emojiReactionsController_reactable$ref = any; -export type CommentAuthorAssociation = "COLLABORATOR" | "CONTRIBUTOR" | "FIRST_TIMER" | "FIRST_TIME_CONTRIBUTOR" | "MEMBER" | "NONE" | "OWNER" | "%future added value"; +export type CommentAuthorAssociation = "COLLABORATOR" | "CONTRIBUTOR" | "FIRST_TIMER" | "FIRST_TIME_CONTRIBUTOR" | "MANNEQUIN" | "MEMBER" | "NONE" | "OWNER" | "%future added value"; export type AddPullRequestReviewCommentInput = {| - pullRequestReviewId: string, + pullRequestId?: ?string, + pullRequestReviewId?: ?string, commitOID?: ?any, body: string, path?: ?string, diff --git a/lib/mutations/__generated__/addPrReviewMutation.graphql.js b/lib/mutations/__generated__/addPrReviewMutation.graphql.js index 5561cafc4e..bd5c3382c3 100644 --- a/lib/mutations/__generated__/addPrReviewMutation.graphql.js +++ b/lib/mutations/__generated__/addPrReviewMutation.graphql.js @@ -1,6 +1,6 @@ /** * @flow - * @relayHash 51cb9813ae4e3db78b74eccbcb0c1bad + * @relayHash 3e6e96a7019beb78d44c78c7a23ad85d */ /* eslint-disable */ @@ -10,6 +10,7 @@ /*:: import type { ConcreteRequest } from 'relay-runtime'; type emojiReactionsController_reactable$ref = any; +export type DiffSide = "LEFT" | "RIGHT" | "%future added value"; export type PullRequestReviewEvent = "APPROVE" | "COMMENT" | "DISMISS" | "REQUEST_CHANGES" | "%future added value"; export type PullRequestReviewState = "APPROVED" | "CHANGES_REQUESTED" | "COMMENTED" | "DISMISSED" | "PENDING" | "%future added value"; export type AddPullRequestReviewInput = {| @@ -18,6 +19,7 @@ export type AddPullRequestReviewInput = {| body?: ?string, event?: ?PullRequestReviewEvent, comments?: ?$ReadOnlyArray, + threads?: ?$ReadOnlyArray, clientMutationId?: ?string, |}; export type DraftPullRequestReviewComment = {| @@ -25,6 +27,14 @@ export type DraftPullRequestReviewComment = {| position: number, body: string, |}; +export type DraftPullRequestReviewThread = {| + path: string, + line: number, + side?: ?DiffSide, + startLine?: ?number, + startSide?: ?DiffSide, + body: string, +|}; export type addPrReviewMutationVariables = {| input: AddPullRequestReviewInput |}; diff --git a/lib/mutations/__generated__/createRepositoryMutation.graphql.js b/lib/mutations/__generated__/createRepositoryMutation.graphql.js new file mode 100644 index 0000000000..c86ca20d7b --- /dev/null +++ b/lib/mutations/__generated__/createRepositoryMutation.graphql.js @@ -0,0 +1,171 @@ +/** + * @flow + * @relayHash f8963f231e08ebd4d2cffd1223e19770 + */ + +/* eslint-disable */ + +'use strict'; + +/*:: +import type { ConcreteRequest } from 'relay-runtime'; +export type RepositoryVisibility = "INTERNAL" | "PRIVATE" | "PUBLIC" | "%future added value"; +export type CreateRepositoryInput = {| + name: string, + ownerId?: ?string, + description?: ?string, + visibility: RepositoryVisibility, + template?: ?boolean, + homepageUrl?: ?any, + hasWikiEnabled?: ?boolean, + hasIssuesEnabled?: ?boolean, + teamId?: ?string, + clientMutationId?: ?string, +|}; +export type createRepositoryMutationVariables = {| + input: CreateRepositoryInput +|}; +export type createRepositoryMutationResponse = {| + +createRepository: ?{| + +repository: ?{| + +sshUrl: any, + +url: any, + |} + |} +|}; +export type createRepositoryMutation = {| + variables: createRepositoryMutationVariables, + response: createRepositoryMutationResponse, +|}; +*/ + + +/* +mutation createRepositoryMutation( + $input: CreateRepositoryInput! +) { + createRepository(input: $input) { + repository { + sshUrl + url + id + } + } +} +*/ + +const node/*: ConcreteRequest*/ = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "input", + "type": "CreateRepositoryInput!", + "defaultValue": null + } +], +v1 = [ + { + "kind": "Variable", + "name": "input", + "variableName": "input" + } +], +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "sshUrl", + "args": null, + "storageKey": null +}, +v3 = { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": null, + "storageKey": null +}; +return { + "kind": "Request", + "fragment": { + "kind": "Fragment", + "name": "createRepositoryMutation", + "type": "Mutation", + "metadata": null, + "argumentDefinitions": (v0/*: any*/), + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "createRepository", + "storageKey": null, + "args": (v1/*: any*/), + "concreteType": "CreateRepositoryPayload", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "repository", + "storageKey": null, + "args": null, + "concreteType": "Repository", + "plural": false, + "selections": [ + (v2/*: any*/), + (v3/*: any*/) + ] + } + ] + } + ] + }, + "operation": { + "kind": "Operation", + "name": "createRepositoryMutation", + "argumentDefinitions": (v0/*: any*/), + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "createRepository", + "storageKey": null, + "args": (v1/*: any*/), + "concreteType": "CreateRepositoryPayload", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "repository", + "storageKey": null, + "args": null, + "concreteType": "Repository", + "plural": false, + "selections": [ + (v2/*: any*/), + (v3/*: any*/), + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + } + ] + } + ] + } + ] + }, + "params": { + "operationKind": "mutation", + "name": "createRepositoryMutation", + "id": null, + "text": "mutation createRepositoryMutation(\n $input: CreateRepositoryInput!\n) {\n createRepository(input: $input) {\n repository {\n sshUrl\n url\n id\n }\n }\n}\n", + "metadata": {} + } +}; +})(); +// prettier-ignore +(node/*: any*/).hash = 'e8f154d9f35411a15f77583bb44f7ed5'; +module.exports = node; diff --git a/lib/mutations/__generated__/submitPrReviewMutation.graphql.js b/lib/mutations/__generated__/submitPrReviewMutation.graphql.js index df58712228..129d4091ba 100644 --- a/lib/mutations/__generated__/submitPrReviewMutation.graphql.js +++ b/lib/mutations/__generated__/submitPrReviewMutation.graphql.js @@ -1,6 +1,6 @@ /** * @flow - * @relayHash 1e5a909372f6ceeb9cfa8fa991399495 + * @relayHash 80f1ab174b7e397d863eaebebf19d297 */ /* eslint-disable */ @@ -11,7 +11,8 @@ import type { ConcreteRequest } from 'relay-runtime'; export type PullRequestReviewEvent = "APPROVE" | "COMMENT" | "DISMISS" | "REQUEST_CHANGES" | "%future added value"; export type SubmitPullRequestReviewInput = {| - pullRequestReviewId: string, + pullRequestId?: ?string, + pullRequestReviewId?: ?string, event: PullRequestReviewEvent, body?: ?string, clientMutationId?: ?string, diff --git a/lib/mutations/create-repository.js b/lib/mutations/create-repository.js new file mode 100644 index 0000000000..857a9b39cf --- /dev/null +++ b/lib/mutations/create-repository.js @@ -0,0 +1,36 @@ +/* istanbul ignore file */ + +import {commitMutation, graphql} from 'react-relay'; + +const mutation = graphql` + mutation createRepositoryMutation($input: CreateRepositoryInput!) { + createRepository(input: $input) { + repository { + sshUrl + url + } + } + } +`; + +export default (environment, {name, ownerID, visibility}) => { + const variables = { + input: { + name, + ownerId: ownerID, + visibility, + }, + }; + + return new Promise((resolve, reject) => { + commitMutation( + environment, + { + mutation, + variables, + onCompleted: resolve, + onError: reject, + }, + ); + }); +}; diff --git a/lib/prop-types.js b/lib/prop-types.js index 78fd797320..243d1ad22b 100644 --- a/lib/prop-types.js +++ b/lib/prop-types.js @@ -1,5 +1,7 @@ import PropTypes from 'prop-types'; +export const TokenPropType = PropTypes.oneOfType([PropTypes.string, PropTypes.symbol, PropTypes.instanceOf(Error)]); + export const DOMNodePropType = (props, propName, componentName) => { if (props[propName] instanceof HTMLElement) { return null; @@ -71,6 +73,7 @@ export const CommitPropType = PropTypes.shape({ export const AuthorPropType = PropTypes.shape({ getEmail: PropTypes.func.isRequired, getFullName: PropTypes.func.isRequired, + getAvatarUrl: PropTypes.func.isRequired, }); export const RelayConnectionPropType = nodePropType => PropTypes.shape({ @@ -120,6 +123,12 @@ export const OperationStateObserverPropType = PropTypes.shape({ dispose: PropTypes.func.isRequired, }); +export const RefresherPropType = PropTypes.shape({ + setRetryCallback: PropTypes.func.isRequired, + trigger: PropTypes.func.isRequired, + deregister: PropTypes.func.isRequired, +}); + export const IssueishPropType = PropTypes.shape({ getNumber: PropTypes.func.isRequired, getTitle: PropTypes.func.isRequired, diff --git a/lib/relay-network-layer-manager.js b/lib/relay-network-layer-manager.js index 846875c862..db77e0a56d 100644 --- a/lib/relay-network-layer-manager.js +++ b/lib/relay-network-layer-manager.js @@ -18,7 +18,7 @@ function logRatelimitApi(headers) { const resetsIn = moment.unix(parseInt(resets, 10)).from(); // eslint-disable-next-line no-console - console.debug(`GitHub API Rate Limit: ${remaining}/${total} — resets ${resetsIn}`); + console.debug(`GitHub API Rate Limiting Info: ${remaining}/${total} requests left — resets ${resetsIn}`); } export function expectRelayQuery(operationPattern, response) { @@ -46,6 +46,10 @@ export function expectRelayQuery(operationPattern, response) { export function clearRelayExpectations() { responsesByQuery.clear(); + relayEnvironmentPerURL.clear(); + tokenPerURL.clear(); + fetchPerURL.clear(); + responsesByQuery.clear(); } function createFetchQuery(url) { @@ -152,6 +156,10 @@ export default class RelayNetworkLayerManager { let {environment, network} = relayEnvironmentPerURL.get(url) || {}; tokenPerURL.set(url, token); if (!environment) { + if (!token) { + throw new Error(`You must authenticate to ${endpoint.getHost()} first.`); + } + const source = new RecordSource(); const store = new Store(source); network = Network.create(this.getFetchQuery(endpoint, token)); diff --git a/lib/tab-group.js b/lib/tab-group.js new file mode 100644 index 0000000000..7af48f0066 --- /dev/null +++ b/lib/tab-group.js @@ -0,0 +1,80 @@ +export default class TabGroup { + constructor() { + this.nodesByElement = new Map(); + this.lastElement = null; + this.autofocusTarget = null; + } + + appendElement(element, autofocus) { + const lastNode = this.nodesByElement.get(this.lastElement) || {next: element, previous: element}; + const next = lastNode.next; + const previous = this.lastElement || element; + + this.nodesByElement.set(element, {next, previous}); + this.nodesByElement.get(lastNode.next).previous = element; + lastNode.next = element; + + this.lastElement = element; + + if (autofocus && this.autofocusTarget === null) { + this.autofocusTarget = element; + } + } + + removeElement(element) { + const node = this.nodesByElement.get(element); + if (node) { + const beforeNode = this.nodesByElement.get(node.previous); + const afterNode = this.nodesByElement.get(node.next); + + beforeNode.next = node.next; + afterNode.previous = node.previous; + } + this.nodesByElement.delete(element); + } + + after(element) { + const node = this.nodesByElement.get(element) || {next: undefined}; + return node.next; + } + + focusAfter(element) { + const original = this.getCurrentFocus(); + let next = this.after(element); + while (next && next !== element) { + next.focus(); + if (this.getCurrentFocus() !== original) { + return; + } + + next = this.after(next); + } + } + + before(element) { + const node = this.nodesByElement.get(element) || {previous: undefined}; + return node.previous; + } + + focusBefore(element) { + const original = this.getCurrentFocus(); + let previous = this.before(element); + while (previous && previous !== element) { + previous.focus(); + if (this.getCurrentFocus() !== original) { + return; + } + + previous = this.before(previous); + } + } + + autofocus() { + this.autofocusTarget && this.autofocusTarget.focus(); + } + + /* istanbul ignore next */ + getCurrentFocus() { + return document.activeElement; + } +} diff --git a/lib/views/__generated__/checkRunView_checkRun.graphql.js b/lib/views/__generated__/checkRunView_checkRun.graphql.js index ea633ed461..0f2b649dfd 100644 --- a/lib/views/__generated__/checkRunView_checkRun.graphql.js +++ b/lib/views/__generated__/checkRunView_checkRun.graphql.js @@ -8,7 +8,7 @@ /*:: import type { ReaderFragment } from 'relay-runtime'; -export type CheckConclusionState = "ACTION_REQUIRED" | "CANCELLED" | "FAILURE" | "NEUTRAL" | "SUCCESS" | "TIMED_OUT" | "%future added value"; +export type CheckConclusionState = "ACTION_REQUIRED" | "CANCELLED" | "FAILURE" | "NEUTRAL" | "SKIPPED" | "STALE" | "STARTUP_FAILURE" | "SUCCESS" | "TIMED_OUT" | "%future added value"; export type CheckStatusState = "COMPLETED" | "IN_PROGRESS" | "QUEUED" | "REQUESTED" | "%future added value"; import type { FragmentReference } from "relay-runtime"; declare export opaque type checkRunView_checkRun$ref: FragmentReference; diff --git a/lib/views/__generated__/checkSuiteView_checkSuite.graphql.js b/lib/views/__generated__/checkSuiteView_checkSuite.graphql.js index 7599ab102a..b93e032a3b 100644 --- a/lib/views/__generated__/checkSuiteView_checkSuite.graphql.js +++ b/lib/views/__generated__/checkSuiteView_checkSuite.graphql.js @@ -8,7 +8,7 @@ /*:: import type { ReaderFragment } from 'relay-runtime'; -export type CheckConclusionState = "ACTION_REQUIRED" | "CANCELLED" | "FAILURE" | "NEUTRAL" | "SUCCESS" | "TIMED_OUT" | "%future added value"; +export type CheckConclusionState = "ACTION_REQUIRED" | "CANCELLED" | "FAILURE" | "NEUTRAL" | "SKIPPED" | "STALE" | "STARTUP_FAILURE" | "SUCCESS" | "TIMED_OUT" | "%future added value"; export type CheckStatusState = "COMPLETED" | "IN_PROGRESS" | "QUEUED" | "REQUESTED" | "%future added value"; import type { FragmentReference } from "relay-runtime"; declare export opaque type checkSuiteView_checkSuite$ref: FragmentReference; diff --git a/lib/views/__generated__/issueDetailViewRefetchQuery.graphql.js b/lib/views/__generated__/issueDetailViewRefetchQuery.graphql.js index c5e28fc6da..72786fa7e4 100644 --- a/lib/views/__generated__/issueDetailViewRefetchQuery.graphql.js +++ b/lib/views/__generated__/issueDetailViewRefetchQuery.graphql.js @@ -1,6 +1,6 @@ /** * @flow - * @relayHash bb32b7707f142861ca4a1c09cab001da + * @relayHash 30fb0866995510475e94c3079069bf0e */ /* eslint-disable */ @@ -51,56 +51,71 @@ query issueDetailViewRefetchQuery( } } -fragment issueDetailView_repository on Repository { +fragment crossReferencedEventView_item on CrossReferencedEvent { id - name - owner { + isCrossRepository + source { __typename - login - id + ... on Issue { + number + title + url + issueState: state + } + ... on PullRequest { + number + title + url + prState: state + } + ... on RepositoryNode { + repository { + name + isPrivate + owner { + __typename + login + id + } + id + } + } + ... on Node { + id + } } } -fragment issueDetailView_issue_3D8CP9 on Issue { +fragment crossReferencedEventsView_nodes on CrossReferencedEvent { id - __typename - url - state - number - title - bodyHTML - author { + referencedAt + isCrossRepository + actor { __typename login avatarUrl - url ... on Node { id } } - ...issueTimelineController_issue_3D8CP9 - ...emojiReactionsView_reactable -} - -fragment issueTimelineController_issue_3D8CP9 on Issue { - url - timelineItems(first: $timelineCount, after: $timelineCursor) { - pageInfo { - endCursor - hasNextPage - } - edges { - cursor - node { - __typename - ...issueCommentView_item - ...crossReferencedEventsView_nodes - ... on Node { + source { + __typename + ... on RepositoryNode { + repository { + name + owner { + __typename + login id } + id } } + ... on Node { + id + } } + ...crossReferencedEventView_item } fragment emojiReactionsView_reactable on Reactable { @@ -129,70 +144,55 @@ fragment issueCommentView_item on IssueComment { url } -fragment crossReferencedEventsView_nodes on CrossReferencedEvent { +fragment issueDetailView_issue_3D8CP9 on Issue { id - referencedAt - isCrossRepository - actor { + __typename + url + state + number + title + bodyHTML + author { __typename login avatarUrl + url ... on Node { id } } - source { - __typename - ... on RepositoryNode { - repository { - name - owner { - __typename - login - id - } - id - } - } - ... on Node { - id - } - } - ...crossReferencedEventView_item + ...issueTimelineController_issue_3D8CP9 + ...emojiReactionsView_reactable } -fragment crossReferencedEventView_item on CrossReferencedEvent { +fragment issueDetailView_repository on Repository { id - isCrossRepository - source { + name + owner { __typename - ... on Issue { - number - title - url - issueState: state - } - ... on PullRequest { - number - title - url - prState: state + login + id + } +} + +fragment issueTimelineController_issue_3D8CP9 on Issue { + url + timelineItems(first: $timelineCount, after: $timelineCursor) { + pageInfo { + endCursor + hasNextPage } - ... on RepositoryNode { - repository { - name - isPrivate - owner { - __typename - login + edges { + cursor + node { + __typename + ...issueCommentView_item + ...crossReferencedEventsView_nodes + ... on Node { id } - id } } - ... on Node { - id - } } } */ @@ -717,7 +717,7 @@ return { "operationKind": "query", "name": "issueDetailViewRefetchQuery", "id": null, - "text": "query issueDetailViewRefetchQuery(\n $repoId: ID!\n $issueishId: ID!\n $timelineCount: Int!\n $timelineCursor: String\n) {\n repository: node(id: $repoId) {\n __typename\n ...issueDetailView_repository\n id\n }\n issue: node(id: $issueishId) {\n __typename\n ...issueDetailView_issue_3D8CP9\n id\n }\n}\n\nfragment issueDetailView_repository on Repository {\n id\n name\n owner {\n __typename\n login\n id\n }\n}\n\nfragment issueDetailView_issue_3D8CP9 on Issue {\n id\n __typename\n url\n state\n number\n title\n bodyHTML\n author {\n __typename\n login\n avatarUrl\n url\n ... on Node {\n id\n }\n }\n ...issueTimelineController_issue_3D8CP9\n ...emojiReactionsView_reactable\n}\n\nfragment issueTimelineController_issue_3D8CP9 on Issue {\n url\n timelineItems(first: $timelineCount, after: $timelineCursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n cursor\n node {\n __typename\n ...issueCommentView_item\n ...crossReferencedEventsView_nodes\n ... on Node {\n id\n }\n }\n }\n }\n}\n\nfragment emojiReactionsView_reactable on Reactable {\n id\n reactionGroups {\n content\n viewerHasReacted\n users {\n totalCount\n }\n }\n viewerCanReact\n}\n\nfragment issueCommentView_item on IssueComment {\n author {\n __typename\n avatarUrl\n login\n ... on Node {\n id\n }\n }\n bodyHTML\n createdAt\n url\n}\n\nfragment crossReferencedEventsView_nodes on CrossReferencedEvent {\n id\n referencedAt\n isCrossRepository\n actor {\n __typename\n login\n avatarUrl\n ... on Node {\n id\n }\n }\n source {\n __typename\n ... on RepositoryNode {\n repository {\n name\n owner {\n __typename\n login\n id\n }\n id\n }\n }\n ... on Node {\n id\n }\n }\n ...crossReferencedEventView_item\n}\n\nfragment crossReferencedEventView_item on CrossReferencedEvent {\n id\n isCrossRepository\n source {\n __typename\n ... on Issue {\n number\n title\n url\n issueState: state\n }\n ... on PullRequest {\n number\n title\n url\n prState: state\n }\n ... on RepositoryNode {\n repository {\n name\n isPrivate\n owner {\n __typename\n login\n id\n }\n id\n }\n }\n ... on Node {\n id\n }\n }\n}\n", + "text": "query issueDetailViewRefetchQuery(\n $repoId: ID!\n $issueishId: ID!\n $timelineCount: Int!\n $timelineCursor: String\n) {\n repository: node(id: $repoId) {\n __typename\n ...issueDetailView_repository\n id\n }\n issue: node(id: $issueishId) {\n __typename\n ...issueDetailView_issue_3D8CP9\n id\n }\n}\n\nfragment crossReferencedEventView_item on CrossReferencedEvent {\n id\n isCrossRepository\n source {\n __typename\n ... on Issue {\n number\n title\n url\n issueState: state\n }\n ... on PullRequest {\n number\n title\n url\n prState: state\n }\n ... on RepositoryNode {\n repository {\n name\n isPrivate\n owner {\n __typename\n login\n id\n }\n id\n }\n }\n ... on Node {\n id\n }\n }\n}\n\nfragment crossReferencedEventsView_nodes on CrossReferencedEvent {\n id\n referencedAt\n isCrossRepository\n actor {\n __typename\n login\n avatarUrl\n ... on Node {\n id\n }\n }\n source {\n __typename\n ... on RepositoryNode {\n repository {\n name\n owner {\n __typename\n login\n id\n }\n id\n }\n }\n ... on Node {\n id\n }\n }\n ...crossReferencedEventView_item\n}\n\nfragment emojiReactionsView_reactable on Reactable {\n id\n reactionGroups {\n content\n viewerHasReacted\n users {\n totalCount\n }\n }\n viewerCanReact\n}\n\nfragment issueCommentView_item on IssueComment {\n author {\n __typename\n avatarUrl\n login\n ... on Node {\n id\n }\n }\n bodyHTML\n createdAt\n url\n}\n\nfragment issueDetailView_issue_3D8CP9 on Issue {\n id\n __typename\n url\n state\n number\n title\n bodyHTML\n author {\n __typename\n login\n avatarUrl\n url\n ... on Node {\n id\n }\n }\n ...issueTimelineController_issue_3D8CP9\n ...emojiReactionsView_reactable\n}\n\nfragment issueDetailView_repository on Repository {\n id\n name\n owner {\n __typename\n login\n id\n }\n}\n\nfragment issueTimelineController_issue_3D8CP9 on Issue {\n url\n timelineItems(first: $timelineCount, after: $timelineCursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n cursor\n node {\n __typename\n ...issueCommentView_item\n ...crossReferencedEventsView_nodes\n ... on Node {\n id\n }\n }\n }\n }\n}\n", "metadata": {} } }; diff --git a/lib/views/__generated__/prCommitsViewQuery.graphql.js b/lib/views/__generated__/prCommitsViewQuery.graphql.js index 2131410369..e44bd46400 100644 --- a/lib/views/__generated__/prCommitsViewQuery.graphql.js +++ b/lib/views/__generated__/prCommitsViewQuery.graphql.js @@ -1,6 +1,6 @@ /** * @flow - * @relayHash af5f2734f6b59faac9036d3e7419ff5f + * @relayHash 3aff007f0b1660376e5f387923e3ac72 */ /* eslint-disable */ @@ -44,6 +44,19 @@ query prCommitsViewQuery( } } +fragment prCommitView_item on Commit { + committer { + avatarUrl + name + date + } + messageHeadline + messageBody + shortSha: abbreviatedOid + sha: oid + url +} + fragment prCommitsView_pullRequest_38TpXw on PullRequest { url commits(first: $commitCount, after: $commitCursor) { @@ -64,19 +77,6 @@ fragment prCommitsView_pullRequest_38TpXw on PullRequest { } } } - -fragment prCommitView_item on Commit { - committer { - avatarUrl - name - date - } - messageHeadline - messageBody - shortSha: abbreviatedOid - sha: oid - url -} */ const node/*: ConcreteRequest*/ = (function(){ @@ -364,7 +364,7 @@ return { "operationKind": "query", "name": "prCommitsViewQuery", "id": null, - "text": "query prCommitsViewQuery(\n $commitCount: Int!\n $commitCursor: String\n $url: URI!\n) {\n resource(url: $url) {\n __typename\n ... on PullRequest {\n ...prCommitsView_pullRequest_38TpXw\n }\n ... on Node {\n id\n }\n }\n}\n\nfragment prCommitsView_pullRequest_38TpXw on PullRequest {\n url\n commits(first: $commitCount, after: $commitCursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n cursor\n node {\n commit {\n id\n ...prCommitView_item\n }\n id\n __typename\n }\n }\n }\n}\n\nfragment prCommitView_item on Commit {\n committer {\n avatarUrl\n name\n date\n }\n messageHeadline\n messageBody\n shortSha: abbreviatedOid\n sha: oid\n url\n}\n", + "text": "query prCommitsViewQuery(\n $commitCount: Int!\n $commitCursor: String\n $url: URI!\n) {\n resource(url: $url) {\n __typename\n ... on PullRequest {\n ...prCommitsView_pullRequest_38TpXw\n }\n ... on Node {\n id\n }\n }\n}\n\nfragment prCommitView_item on Commit {\n committer {\n avatarUrl\n name\n date\n }\n messageHeadline\n messageBody\n shortSha: abbreviatedOid\n sha: oid\n url\n}\n\nfragment prCommitsView_pullRequest_38TpXw on PullRequest {\n url\n commits(first: $commitCount, after: $commitCursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n cursor\n node {\n commit {\n id\n ...prCommitView_item\n }\n id\n __typename\n }\n }\n }\n}\n", "metadata": {} } }; diff --git a/lib/views/__generated__/prDetailViewRefetchQuery.graphql.js b/lib/views/__generated__/prDetailViewRefetchQuery.graphql.js index 61e45def83..2b64409acc 100644 --- a/lib/views/__generated__/prDetailViewRefetchQuery.graphql.js +++ b/lib/views/__generated__/prDetailViewRefetchQuery.graphql.js @@ -1,6 +1,6 @@ /** * @flow - * @relayHash 01b82ca495f438a77e18cc0fa4a762d8 + * @relayHash a78ba6dc675389ea6933d328c4cca744 */ /* eslint-disable */ @@ -63,184 +63,86 @@ query prDetailViewRefetchQuery( } } -fragment prDetailView_repository on Repository { - id +fragment checkRunView_checkRun on CheckRun { name - owner { - __typename - login - id - } -} - -fragment prDetailView_pullRequest_1UVrY8 on PullRequest { - id - __typename - url - isCrossRepository - changedFiles - state - number + status + conclusion title - bodyHTML - baseRefName - headRefName - countedCommits: commits { - totalCount - } - author { - __typename - login - avatarUrl - url - ... on Node { - id - } - } - ...prCommitsView_pullRequest_38TpXw - ...prStatusesView_pullRequest_1oGSNs - ...prTimelineController_pullRequest_3D8CP9 - ...emojiReactionsController_reactable + summary + permalink + detailsUrl } -fragment prCommitsView_pullRequest_38TpXw on PullRequest { - url - commits(first: $commitCount, after: $commitCursor) { +fragment checkRunsAccumulator_checkSuite_Rvfr1 on CheckSuite { + id + checkRuns(first: $checkRunCount, after: $checkRunCursor) { pageInfo { - endCursor hasNextPage + endCursor } edges { cursor node { - commit { - id - ...prCommitView_item - } id + status + conclusion + ...checkRunView_checkRun __typename } } } } -fragment prStatusesView_pullRequest_1oGSNs on PullRequest { - id - recentCommits: commits(last: 1) { - edges { - node { - commit { - status { - state - contexts { - id - state - ...prStatusContextView_context - } - id - } - ...checkSuitesAccumulator_commit_1oGSNs - id - } - id - } - } +fragment checkSuiteView_checkSuite on CheckSuite { + app { + name + id } + status + conclusion } -fragment prTimelineController_pullRequest_3D8CP9 on PullRequest { - url - ...headRefForcePushedEventView_issueish - timelineItems(first: $timelineCount, after: $timelineCursor) { +fragment checkSuitesAccumulator_commit_1oGSNs on Commit { + id + checkSuites(first: $checkSuiteCount, after: $checkSuiteCursor) { pageInfo { - endCursor hasNextPage + endCursor } edges { cursor node { + id + status + conclusion + ...checkSuiteView_checkSuite + ...checkRunsAccumulator_checkSuite_Rvfr1 __typename - ...commitsView_nodes - ...issueCommentView_item - ...mergedEventView_item - ...headRefForcePushedEventView_item - ...commitCommentThreadView_item - ...crossReferencedEventsView_nodes - ... on Node { - id - } } } } } -fragment emojiReactionsController_reactable on Reactable { - id - ...emojiReactionsView_reactable -} - -fragment emojiReactionsView_reactable on Reactable { - id - reactionGroups { - content - viewerHasReacted - users { - totalCount - } - } - viewerCanReact -} - -fragment headRefForcePushedEventView_issueish on PullRequest { - headRefName - headRepositoryOwner { - __typename - login - id - } - repository { - owner { - __typename - login - id - } - id - } -} - -fragment commitsView_nodes on PullRequestCommit { +fragment commitCommentThreadView_item on PullRequestCommitCommentThread { commit { + oid id - author { - name - user { - login + } + comments(first: 100) { + edges { + node { id + ...commitCommentView_item } } - ...commitView_commit } } -fragment issueCommentView_item on IssueComment { +fragment commitCommentView_item on CommitComment { author { __typename - avatarUrl login - ... on Node { - id - } - } - bodyHTML - createdAt - url -} - -fragment mergedEventView_item on MergedEvent { - actor { - __typename avatarUrl - login ... on Node { id } @@ -249,62 +151,71 @@ fragment mergedEventView_item on MergedEvent { oid id } - mergeRefName + bodyHTML createdAt + path + position } -fragment headRefForcePushedEventView_item on HeadRefForcePushedEvent { - actor { - __typename +fragment commitView_commit on Commit { + author { + name avatarUrl - login - ... on Node { + user { + login id } } - beforeCommit { - oid - id - } - afterCommit { - oid - id + committer { + name + avatarUrl + user { + login + id + } } - createdAt + authoredByCommitter + sha: oid + message + messageHeadlineHTML + commitUrl } -fragment commitCommentThreadView_item on PullRequestCommitCommentThread { +fragment commitsView_nodes on PullRequestCommit { commit { - oid id - } - comments(first: 100) { - edges { - node { + author { + name + user { + login id - ...commitCommentView_item } } + ...commitView_commit } } -fragment crossReferencedEventsView_nodes on CrossReferencedEvent { +fragment crossReferencedEventView_item on CrossReferencedEvent { id - referencedAt isCrossRepository - actor { - __typename - login - avatarUrl - ... on Node { - id - } - } source { __typename + ... on Issue { + number + title + url + issueState: state + } + ... on PullRequest { + number + title + url + prState: state + } ... on RepositoryNode { repository { name + isPrivate owner { __typename login @@ -317,30 +228,25 @@ fragment crossReferencedEventsView_nodes on CrossReferencedEvent { id } } - ...crossReferencedEventView_item } -fragment crossReferencedEventView_item on CrossReferencedEvent { +fragment crossReferencedEventsView_nodes on CrossReferencedEvent { id + referencedAt isCrossRepository - source { + actor { __typename - ... on Issue { - number - title - url - issueState: state - } - ... on PullRequest { - number - title - url - prState: state + login + avatarUrl + ... on Node { + id } + } + source { + __typename ... on RepositoryNode { repository { name - isPrivate owner { __typename login @@ -353,130 +259,224 @@ fragment crossReferencedEventView_item on CrossReferencedEvent { id } } + ...crossReferencedEventView_item } -fragment commitCommentView_item on CommitComment { - author { +fragment emojiReactionsController_reactable on Reactable { + id + ...emojiReactionsView_reactable +} + +fragment emojiReactionsView_reactable on Reactable { + id + reactionGroups { + content + viewerHasReacted + users { + totalCount + } + } + viewerCanReact +} + +fragment headRefForcePushedEventView_issueish on PullRequest { + headRefName + headRepositoryOwner { __typename login + id + } + repository { + owner { + __typename + login + id + } + id + } +} + +fragment headRefForcePushedEventView_item on HeadRefForcePushedEvent { + actor { + __typename avatarUrl + login ... on Node { id } } - commit { + beforeCommit { + oid + id + } + afterCommit { oid id } - bodyHTML createdAt - path - position } -fragment commitView_commit on Commit { +fragment issueCommentView_item on IssueComment { author { - name + __typename avatarUrl - user { - login + login + ... on Node { id } } - committer { - name + bodyHTML + createdAt + url +} + +fragment mergedEventView_item on MergedEvent { + actor { + __typename avatarUrl - user { - login + login + ... on Node { id } } - authoredByCommitter - sha: oid - message - messageHeadlineHTML - commitUrl + commit { + oid + id + } + mergeRefName + createdAt } -fragment prStatusContextView_context on StatusContext { - context - description - state - targetUrl +fragment prCommitView_item on Commit { + committer { + avatarUrl + name + date + } + messageHeadline + messageBody + shortSha: abbreviatedOid + sha: oid + url } -fragment checkSuitesAccumulator_commit_1oGSNs on Commit { - id - checkSuites(first: $checkSuiteCount, after: $checkSuiteCursor) { +fragment prCommitsView_pullRequest_38TpXw on PullRequest { + url + commits(first: $commitCount, after: $commitCursor) { pageInfo { - hasNextPage endCursor + hasNextPage } edges { cursor node { + commit { + id + ...prCommitView_item + } id - status - conclusion - ...checkSuiteView_checkSuite - ...checkRunsAccumulator_checkSuite_Rvfr1 __typename } } } } -fragment checkSuiteView_checkSuite on CheckSuite { - app { - name +fragment prDetailView_pullRequest_1UVrY8 on PullRequest { + id + __typename + url + isCrossRepository + changedFiles + state + number + title + bodyHTML + baseRefName + headRefName + countedCommits: commits { + totalCount + } + author { + __typename + login + avatarUrl + url + ... on Node { + id + } + } + ...prCommitsView_pullRequest_38TpXw + ...prStatusesView_pullRequest_1oGSNs + ...prTimelineController_pullRequest_3D8CP9 + ...emojiReactionsController_reactable +} + +fragment prDetailView_repository on Repository { + id + name + owner { + __typename + login id } - status - conclusion } -fragment checkRunsAccumulator_checkSuite_Rvfr1 on CheckSuite { +fragment prStatusContextView_context on StatusContext { + context + description + state + targetUrl +} + +fragment prStatusesView_pullRequest_1oGSNs on PullRequest { id - checkRuns(first: $checkRunCount, after: $checkRunCursor) { + recentCommits: commits(last: 1) { + edges { + node { + commit { + status { + state + contexts { + id + state + ...prStatusContextView_context + } + id + } + ...checkSuitesAccumulator_commit_1oGSNs + id + } + id + } + } + } +} + +fragment prTimelineController_pullRequest_3D8CP9 on PullRequest { + url + ...headRefForcePushedEventView_issueish + timelineItems(first: $timelineCount, after: $timelineCursor) { pageInfo { - hasNextPage endCursor + hasNextPage } edges { cursor node { - id - status - conclusion - ...checkRunView_checkRun __typename + ...commitsView_nodes + ...issueCommentView_item + ...mergedEventView_item + ...headRefForcePushedEventView_item + ...commitCommentThreadView_item + ...crossReferencedEventsView_nodes + ... on Node { + id + } } } } } - -fragment checkRunView_checkRun on CheckRun { - name - status - conclusion - title - summary - permalink - detailsUrl -} - -fragment prCommitView_item on Commit { - committer { - avatarUrl - name - date - } - messageHeadline - messageBody - shortSha: abbreviatedOid - sha: oid - url -} */ const node/*: ConcreteRequest*/ = (function(){ @@ -1769,7 +1769,7 @@ return { "operationKind": "query", "name": "prDetailViewRefetchQuery", "id": null, - "text": "query prDetailViewRefetchQuery(\n $repoId: ID!\n $issueishId: ID!\n $timelineCount: Int!\n $timelineCursor: String\n $commitCount: Int!\n $commitCursor: String\n $checkSuiteCount: Int!\n $checkSuiteCursor: String\n $checkRunCount: Int!\n $checkRunCursor: String\n) {\n repository: node(id: $repoId) {\n __typename\n ...prDetailView_repository\n id\n }\n pullRequest: node(id: $issueishId) {\n __typename\n ...prDetailView_pullRequest_1UVrY8\n id\n }\n}\n\nfragment prDetailView_repository on Repository {\n id\n name\n owner {\n __typename\n login\n id\n }\n}\n\nfragment prDetailView_pullRequest_1UVrY8 on PullRequest {\n id\n __typename\n url\n isCrossRepository\n changedFiles\n state\n number\n title\n bodyHTML\n baseRefName\n headRefName\n countedCommits: commits {\n totalCount\n }\n author {\n __typename\n login\n avatarUrl\n url\n ... on Node {\n id\n }\n }\n ...prCommitsView_pullRequest_38TpXw\n ...prStatusesView_pullRequest_1oGSNs\n ...prTimelineController_pullRequest_3D8CP9\n ...emojiReactionsController_reactable\n}\n\nfragment prCommitsView_pullRequest_38TpXw on PullRequest {\n url\n commits(first: $commitCount, after: $commitCursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n cursor\n node {\n commit {\n id\n ...prCommitView_item\n }\n id\n __typename\n }\n }\n }\n}\n\nfragment prStatusesView_pullRequest_1oGSNs on PullRequest {\n id\n recentCommits: commits(last: 1) {\n edges {\n node {\n commit {\n status {\n state\n contexts {\n id\n state\n ...prStatusContextView_context\n }\n id\n }\n ...checkSuitesAccumulator_commit_1oGSNs\n id\n }\n id\n }\n }\n }\n}\n\nfragment prTimelineController_pullRequest_3D8CP9 on PullRequest {\n url\n ...headRefForcePushedEventView_issueish\n timelineItems(first: $timelineCount, after: $timelineCursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n cursor\n node {\n __typename\n ...commitsView_nodes\n ...issueCommentView_item\n ...mergedEventView_item\n ...headRefForcePushedEventView_item\n ...commitCommentThreadView_item\n ...crossReferencedEventsView_nodes\n ... on Node {\n id\n }\n }\n }\n }\n}\n\nfragment emojiReactionsController_reactable on Reactable {\n id\n ...emojiReactionsView_reactable\n}\n\nfragment emojiReactionsView_reactable on Reactable {\n id\n reactionGroups {\n content\n viewerHasReacted\n users {\n totalCount\n }\n }\n viewerCanReact\n}\n\nfragment headRefForcePushedEventView_issueish on PullRequest {\n headRefName\n headRepositoryOwner {\n __typename\n login\n id\n }\n repository {\n owner {\n __typename\n login\n id\n }\n id\n }\n}\n\nfragment commitsView_nodes on PullRequestCommit {\n commit {\n id\n author {\n name\n user {\n login\n id\n }\n }\n ...commitView_commit\n }\n}\n\nfragment issueCommentView_item on IssueComment {\n author {\n __typename\n avatarUrl\n login\n ... on Node {\n id\n }\n }\n bodyHTML\n createdAt\n url\n}\n\nfragment mergedEventView_item on MergedEvent {\n actor {\n __typename\n avatarUrl\n login\n ... on Node {\n id\n }\n }\n commit {\n oid\n id\n }\n mergeRefName\n createdAt\n}\n\nfragment headRefForcePushedEventView_item on HeadRefForcePushedEvent {\n actor {\n __typename\n avatarUrl\n login\n ... on Node {\n id\n }\n }\n beforeCommit {\n oid\n id\n }\n afterCommit {\n oid\n id\n }\n createdAt\n}\n\nfragment commitCommentThreadView_item on PullRequestCommitCommentThread {\n commit {\n oid\n id\n }\n comments(first: 100) {\n edges {\n node {\n id\n ...commitCommentView_item\n }\n }\n }\n}\n\nfragment crossReferencedEventsView_nodes on CrossReferencedEvent {\n id\n referencedAt\n isCrossRepository\n actor {\n __typename\n login\n avatarUrl\n ... on Node {\n id\n }\n }\n source {\n __typename\n ... on RepositoryNode {\n repository {\n name\n owner {\n __typename\n login\n id\n }\n id\n }\n }\n ... on Node {\n id\n }\n }\n ...crossReferencedEventView_item\n}\n\nfragment crossReferencedEventView_item on CrossReferencedEvent {\n id\n isCrossRepository\n source {\n __typename\n ... on Issue {\n number\n title\n url\n issueState: state\n }\n ... on PullRequest {\n number\n title\n url\n prState: state\n }\n ... on RepositoryNode {\n repository {\n name\n isPrivate\n owner {\n __typename\n login\n id\n }\n id\n }\n }\n ... on Node {\n id\n }\n }\n}\n\nfragment commitCommentView_item on CommitComment {\n author {\n __typename\n login\n avatarUrl\n ... on Node {\n id\n }\n }\n commit {\n oid\n id\n }\n bodyHTML\n createdAt\n path\n position\n}\n\nfragment commitView_commit on Commit {\n author {\n name\n avatarUrl\n user {\n login\n id\n }\n }\n committer {\n name\n avatarUrl\n user {\n login\n id\n }\n }\n authoredByCommitter\n sha: oid\n message\n messageHeadlineHTML\n commitUrl\n}\n\nfragment prStatusContextView_context on StatusContext {\n context\n description\n state\n targetUrl\n}\n\nfragment checkSuitesAccumulator_commit_1oGSNs on Commit {\n id\n checkSuites(first: $checkSuiteCount, after: $checkSuiteCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n status\n conclusion\n ...checkSuiteView_checkSuite\n ...checkRunsAccumulator_checkSuite_Rvfr1\n __typename\n }\n }\n }\n}\n\nfragment checkSuiteView_checkSuite on CheckSuite {\n app {\n name\n id\n }\n status\n conclusion\n}\n\nfragment checkRunsAccumulator_checkSuite_Rvfr1 on CheckSuite {\n id\n checkRuns(first: $checkRunCount, after: $checkRunCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n status\n conclusion\n ...checkRunView_checkRun\n __typename\n }\n }\n }\n}\n\nfragment checkRunView_checkRun on CheckRun {\n name\n status\n conclusion\n title\n summary\n permalink\n detailsUrl\n}\n\nfragment prCommitView_item on Commit {\n committer {\n avatarUrl\n name\n date\n }\n messageHeadline\n messageBody\n shortSha: abbreviatedOid\n sha: oid\n url\n}\n", + "text": "query prDetailViewRefetchQuery(\n $repoId: ID!\n $issueishId: ID!\n $timelineCount: Int!\n $timelineCursor: String\n $commitCount: Int!\n $commitCursor: String\n $checkSuiteCount: Int!\n $checkSuiteCursor: String\n $checkRunCount: Int!\n $checkRunCursor: String\n) {\n repository: node(id: $repoId) {\n __typename\n ...prDetailView_repository\n id\n }\n pullRequest: node(id: $issueishId) {\n __typename\n ...prDetailView_pullRequest_1UVrY8\n id\n }\n}\n\nfragment checkRunView_checkRun on CheckRun {\n name\n status\n conclusion\n title\n summary\n permalink\n detailsUrl\n}\n\nfragment checkRunsAccumulator_checkSuite_Rvfr1 on CheckSuite {\n id\n checkRuns(first: $checkRunCount, after: $checkRunCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n status\n conclusion\n ...checkRunView_checkRun\n __typename\n }\n }\n }\n}\n\nfragment checkSuiteView_checkSuite on CheckSuite {\n app {\n name\n id\n }\n status\n conclusion\n}\n\nfragment checkSuitesAccumulator_commit_1oGSNs on Commit {\n id\n checkSuites(first: $checkSuiteCount, after: $checkSuiteCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n status\n conclusion\n ...checkSuiteView_checkSuite\n ...checkRunsAccumulator_checkSuite_Rvfr1\n __typename\n }\n }\n }\n}\n\nfragment commitCommentThreadView_item on PullRequestCommitCommentThread {\n commit {\n oid\n id\n }\n comments(first: 100) {\n edges {\n node {\n id\n ...commitCommentView_item\n }\n }\n }\n}\n\nfragment commitCommentView_item on CommitComment {\n author {\n __typename\n login\n avatarUrl\n ... on Node {\n id\n }\n }\n commit {\n oid\n id\n }\n bodyHTML\n createdAt\n path\n position\n}\n\nfragment commitView_commit on Commit {\n author {\n name\n avatarUrl\n user {\n login\n id\n }\n }\n committer {\n name\n avatarUrl\n user {\n login\n id\n }\n }\n authoredByCommitter\n sha: oid\n message\n messageHeadlineHTML\n commitUrl\n}\n\nfragment commitsView_nodes on PullRequestCommit {\n commit {\n id\n author {\n name\n user {\n login\n id\n }\n }\n ...commitView_commit\n }\n}\n\nfragment crossReferencedEventView_item on CrossReferencedEvent {\n id\n isCrossRepository\n source {\n __typename\n ... on Issue {\n number\n title\n url\n issueState: state\n }\n ... on PullRequest {\n number\n title\n url\n prState: state\n }\n ... on RepositoryNode {\n repository {\n name\n isPrivate\n owner {\n __typename\n login\n id\n }\n id\n }\n }\n ... on Node {\n id\n }\n }\n}\n\nfragment crossReferencedEventsView_nodes on CrossReferencedEvent {\n id\n referencedAt\n isCrossRepository\n actor {\n __typename\n login\n avatarUrl\n ... on Node {\n id\n }\n }\n source {\n __typename\n ... on RepositoryNode {\n repository {\n name\n owner {\n __typename\n login\n id\n }\n id\n }\n }\n ... on Node {\n id\n }\n }\n ...crossReferencedEventView_item\n}\n\nfragment emojiReactionsController_reactable on Reactable {\n id\n ...emojiReactionsView_reactable\n}\n\nfragment emojiReactionsView_reactable on Reactable {\n id\n reactionGroups {\n content\n viewerHasReacted\n users {\n totalCount\n }\n }\n viewerCanReact\n}\n\nfragment headRefForcePushedEventView_issueish on PullRequest {\n headRefName\n headRepositoryOwner {\n __typename\n login\n id\n }\n repository {\n owner {\n __typename\n login\n id\n }\n id\n }\n}\n\nfragment headRefForcePushedEventView_item on HeadRefForcePushedEvent {\n actor {\n __typename\n avatarUrl\n login\n ... on Node {\n id\n }\n }\n beforeCommit {\n oid\n id\n }\n afterCommit {\n oid\n id\n }\n createdAt\n}\n\nfragment issueCommentView_item on IssueComment {\n author {\n __typename\n avatarUrl\n login\n ... on Node {\n id\n }\n }\n bodyHTML\n createdAt\n url\n}\n\nfragment mergedEventView_item on MergedEvent {\n actor {\n __typename\n avatarUrl\n login\n ... on Node {\n id\n }\n }\n commit {\n oid\n id\n }\n mergeRefName\n createdAt\n}\n\nfragment prCommitView_item on Commit {\n committer {\n avatarUrl\n name\n date\n }\n messageHeadline\n messageBody\n shortSha: abbreviatedOid\n sha: oid\n url\n}\n\nfragment prCommitsView_pullRequest_38TpXw on PullRequest {\n url\n commits(first: $commitCount, after: $commitCursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n cursor\n node {\n commit {\n id\n ...prCommitView_item\n }\n id\n __typename\n }\n }\n }\n}\n\nfragment prDetailView_pullRequest_1UVrY8 on PullRequest {\n id\n __typename\n url\n isCrossRepository\n changedFiles\n state\n number\n title\n bodyHTML\n baseRefName\n headRefName\n countedCommits: commits {\n totalCount\n }\n author {\n __typename\n login\n avatarUrl\n url\n ... on Node {\n id\n }\n }\n ...prCommitsView_pullRequest_38TpXw\n ...prStatusesView_pullRequest_1oGSNs\n ...prTimelineController_pullRequest_3D8CP9\n ...emojiReactionsController_reactable\n}\n\nfragment prDetailView_repository on Repository {\n id\n name\n owner {\n __typename\n login\n id\n }\n}\n\nfragment prStatusContextView_context on StatusContext {\n context\n description\n state\n targetUrl\n}\n\nfragment prStatusesView_pullRequest_1oGSNs on PullRequest {\n id\n recentCommits: commits(last: 1) {\n edges {\n node {\n commit {\n status {\n state\n contexts {\n id\n state\n ...prStatusContextView_context\n }\n id\n }\n ...checkSuitesAccumulator_commit_1oGSNs\n id\n }\n id\n }\n }\n }\n}\n\nfragment prTimelineController_pullRequest_3D8CP9 on PullRequest {\n url\n ...headRefForcePushedEventView_issueish\n timelineItems(first: $timelineCount, after: $timelineCursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n cursor\n node {\n __typename\n ...commitsView_nodes\n ...issueCommentView_item\n ...mergedEventView_item\n ...headRefForcePushedEventView_item\n ...commitCommentThreadView_item\n ...crossReferencedEventsView_nodes\n ... on Node {\n id\n }\n }\n }\n }\n}\n", "metadata": {} } }; diff --git a/lib/views/__generated__/prStatusesViewRefetchQuery.graphql.js b/lib/views/__generated__/prStatusesViewRefetchQuery.graphql.js index 57288b33d3..5202a569f5 100644 --- a/lib/views/__generated__/prStatusesViewRefetchQuery.graphql.js +++ b/lib/views/__generated__/prStatusesViewRefetchQuery.graphql.js @@ -1,6 +1,6 @@ /** * @flow - * @relayHash 2d55b338b2e14576585d7adfdc6bcfd3 + * @relayHash 0464a2c670f74f89527619b5422aff65 */ /* eslint-disable */ @@ -46,40 +46,19 @@ query prStatusesViewRefetchQuery( } } -fragment prStatusesView_pullRequest_1oGSNs on PullRequest { - id - recentCommits: commits(last: 1) { - edges { - node { - commit { - status { - state - contexts { - id - state - ...prStatusContextView_context - } - id - } - ...checkSuitesAccumulator_commit_1oGSNs - id - } - id - } - } - } -} - -fragment prStatusContextView_context on StatusContext { - context - description - state - targetUrl +fragment checkRunView_checkRun on CheckRun { + name + status + conclusion + title + summary + permalink + detailsUrl } -fragment checkSuitesAccumulator_commit_1oGSNs on Commit { +fragment checkRunsAccumulator_checkSuite_Rvfr1 on CheckSuite { id - checkSuites(first: $checkSuiteCount, after: $checkSuiteCursor) { + checkRuns(first: $checkRunCount, after: $checkRunCursor) { pageInfo { hasNextPage endCursor @@ -90,8 +69,7 @@ fragment checkSuitesAccumulator_commit_1oGSNs on Commit { id status conclusion - ...checkSuiteView_checkSuite - ...checkRunsAccumulator_checkSuite_Rvfr1 + ...checkRunView_checkRun __typename } } @@ -107,9 +85,9 @@ fragment checkSuiteView_checkSuite on CheckSuite { conclusion } -fragment checkRunsAccumulator_checkSuite_Rvfr1 on CheckSuite { +fragment checkSuitesAccumulator_commit_1oGSNs on Commit { id - checkRuns(first: $checkRunCount, after: $checkRunCursor) { + checkSuites(first: $checkSuiteCount, after: $checkSuiteCursor) { pageInfo { hasNextPage endCursor @@ -120,21 +98,43 @@ fragment checkRunsAccumulator_checkSuite_Rvfr1 on CheckSuite { id status conclusion - ...checkRunView_checkRun + ...checkSuiteView_checkSuite + ...checkRunsAccumulator_checkSuite_Rvfr1 __typename } } } } -fragment checkRunView_checkRun on CheckRun { - name - status - conclusion - title - summary - permalink - detailsUrl +fragment prStatusContextView_context on StatusContext { + context + description + state + targetUrl +} + +fragment prStatusesView_pullRequest_1oGSNs on PullRequest { + id + recentCommits: commits(last: 1) { + edges { + node { + commit { + status { + state + contexts { + id + state + ...prStatusContextView_context + } + id + } + ...checkSuitesAccumulator_commit_1oGSNs + id + } + id + } + } + } } */ @@ -597,7 +597,7 @@ return { "operationKind": "query", "name": "prStatusesViewRefetchQuery", "id": null, - "text": "query prStatusesViewRefetchQuery(\n $id: ID!\n $checkSuiteCount: Int!\n $checkSuiteCursor: String\n $checkRunCount: Int!\n $checkRunCursor: String\n) {\n node(id: $id) {\n __typename\n ... on PullRequest {\n ...prStatusesView_pullRequest_1oGSNs\n }\n id\n }\n}\n\nfragment prStatusesView_pullRequest_1oGSNs on PullRequest {\n id\n recentCommits: commits(last: 1) {\n edges {\n node {\n commit {\n status {\n state\n contexts {\n id\n state\n ...prStatusContextView_context\n }\n id\n }\n ...checkSuitesAccumulator_commit_1oGSNs\n id\n }\n id\n }\n }\n }\n}\n\nfragment prStatusContextView_context on StatusContext {\n context\n description\n state\n targetUrl\n}\n\nfragment checkSuitesAccumulator_commit_1oGSNs on Commit {\n id\n checkSuites(first: $checkSuiteCount, after: $checkSuiteCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n status\n conclusion\n ...checkSuiteView_checkSuite\n ...checkRunsAccumulator_checkSuite_Rvfr1\n __typename\n }\n }\n }\n}\n\nfragment checkSuiteView_checkSuite on CheckSuite {\n app {\n name\n id\n }\n status\n conclusion\n}\n\nfragment checkRunsAccumulator_checkSuite_Rvfr1 on CheckSuite {\n id\n checkRuns(first: $checkRunCount, after: $checkRunCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n status\n conclusion\n ...checkRunView_checkRun\n __typename\n }\n }\n }\n}\n\nfragment checkRunView_checkRun on CheckRun {\n name\n status\n conclusion\n title\n summary\n permalink\n detailsUrl\n}\n", + "text": "query prStatusesViewRefetchQuery(\n $id: ID!\n $checkSuiteCount: Int!\n $checkSuiteCursor: String\n $checkRunCount: Int!\n $checkRunCursor: String\n) {\n node(id: $id) {\n __typename\n ... on PullRequest {\n ...prStatusesView_pullRequest_1oGSNs\n }\n id\n }\n}\n\nfragment checkRunView_checkRun on CheckRun {\n name\n status\n conclusion\n title\n summary\n permalink\n detailsUrl\n}\n\nfragment checkRunsAccumulator_checkSuite_Rvfr1 on CheckSuite {\n id\n checkRuns(first: $checkRunCount, after: $checkRunCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n status\n conclusion\n ...checkRunView_checkRun\n __typename\n }\n }\n }\n}\n\nfragment checkSuiteView_checkSuite on CheckSuite {\n app {\n name\n id\n }\n status\n conclusion\n}\n\nfragment checkSuitesAccumulator_commit_1oGSNs on Commit {\n id\n checkSuites(first: $checkSuiteCount, after: $checkSuiteCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n status\n conclusion\n ...checkSuiteView_checkSuite\n ...checkRunsAccumulator_checkSuite_Rvfr1\n __typename\n }\n }\n }\n}\n\nfragment prStatusContextView_context on StatusContext {\n context\n description\n state\n targetUrl\n}\n\nfragment prStatusesView_pullRequest_1oGSNs on PullRequest {\n id\n recentCommits: commits(last: 1) {\n edges {\n node {\n commit {\n status {\n state\n contexts {\n id\n state\n ...prStatusContextView_context\n }\n id\n }\n ...checkSuitesAccumulator_commit_1oGSNs\n id\n }\n id\n }\n }\n }\n}\n", "metadata": {} } }; diff --git a/lib/views/__generated__/repositoryHomeSelectionViewQuery.graphql.js b/lib/views/__generated__/repositoryHomeSelectionViewQuery.graphql.js new file mode 100644 index 0000000000..a946febcdf --- /dev/null +++ b/lib/views/__generated__/repositoryHomeSelectionViewQuery.graphql.js @@ -0,0 +1,310 @@ +/** + * @flow + * @relayHash 7b497054797ead3f15d4ce610e26e24c + */ + +/* eslint-disable */ + +'use strict'; + +/*:: +import type { ConcreteRequest } from 'relay-runtime'; +type repositoryHomeSelectionView_user$ref = any; +export type repositoryHomeSelectionViewQueryVariables = {| + id: string, + organizationCount: number, + organizationCursor?: ?string, +|}; +export type repositoryHomeSelectionViewQueryResponse = {| + +node: ?{| + +$fragmentRefs: repositoryHomeSelectionView_user$ref + |} +|}; +export type repositoryHomeSelectionViewQuery = {| + variables: repositoryHomeSelectionViewQueryVariables, + response: repositoryHomeSelectionViewQueryResponse, +|}; +*/ + + +/* +query repositoryHomeSelectionViewQuery( + $id: ID! + $organizationCount: Int! + $organizationCursor: String +) { + node(id: $id) { + __typename + ... on User { + ...repositoryHomeSelectionView_user_12CDS5 + } + id + } +} + +fragment repositoryHomeSelectionView_user_12CDS5 on User { + id + login + avatarUrl(size: 24) + organizations(first: $organizationCount, after: $organizationCursor) { + pageInfo { + hasNextPage + endCursor + } + edges { + cursor + node { + id + login + avatarUrl(size: 24) + viewerCanCreateRepositories + __typename + } + } + } +} +*/ + +const node/*: ConcreteRequest*/ = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "id", + "type": "ID!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "organizationCount", + "type": "Int!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "organizationCursor", + "type": "String", + "defaultValue": null + } +], +v1 = [ + { + "kind": "Variable", + "name": "id", + "variableName": "id" + } +], +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null +}, +v3 = { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null +}, +v4 = { + "kind": "ScalarField", + "alias": null, + "name": "login", + "args": null, + "storageKey": null +}, +v5 = { + "kind": "ScalarField", + "alias": null, + "name": "avatarUrl", + "args": [ + { + "kind": "Literal", + "name": "size", + "value": 24 + } + ], + "storageKey": "avatarUrl(size:24)" +}, +v6 = [ + { + "kind": "Variable", + "name": "after", + "variableName": "organizationCursor" + }, + { + "kind": "Variable", + "name": "first", + "variableName": "organizationCount" + } +]; +return { + "kind": "Request", + "fragment": { + "kind": "Fragment", + "name": "repositoryHomeSelectionViewQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": (v0/*: any*/), + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": (v1/*: any*/), + "concreteType": null, + "plural": false, + "selections": [ + { + "kind": "InlineFragment", + "type": "User", + "selections": [ + { + "kind": "FragmentSpread", + "name": "repositoryHomeSelectionView_user", + "args": [ + { + "kind": "Variable", + "name": "organizationCount", + "variableName": "organizationCount" + }, + { + "kind": "Variable", + "name": "organizationCursor", + "variableName": "organizationCursor" + } + ] + } + ] + } + ] + } + ] + }, + "operation": { + "kind": "Operation", + "name": "repositoryHomeSelectionViewQuery", + "argumentDefinitions": (v0/*: any*/), + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": (v1/*: any*/), + "concreteType": null, + "plural": false, + "selections": [ + (v2/*: any*/), + (v3/*: any*/), + { + "kind": "InlineFragment", + "type": "User", + "selections": [ + (v4/*: any*/), + (v5/*: any*/), + { + "kind": "LinkedField", + "alias": null, + "name": "organizations", + "storageKey": null, + "args": (v6/*: any*/), + "concreteType": "OrganizationConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "OrganizationEdge", + "plural": true, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Organization", + "plural": false, + "selections": [ + (v3/*: any*/), + (v4/*: any*/), + (v5/*: any*/), + { + "kind": "ScalarField", + "alias": null, + "name": "viewerCanCreateRepositories", + "args": null, + "storageKey": null + }, + (v2/*: any*/) + ] + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": null, + "name": "organizations", + "args": (v6/*: any*/), + "handle": "connection", + "key": "RepositoryHomeSelectionView_organizations", + "filters": null + } + ] + } + ] + } + ] + }, + "params": { + "operationKind": "query", + "name": "repositoryHomeSelectionViewQuery", + "id": null, + "text": "query repositoryHomeSelectionViewQuery(\n $id: ID!\n $organizationCount: Int!\n $organizationCursor: String\n) {\n node(id: $id) {\n __typename\n ... on User {\n ...repositoryHomeSelectionView_user_12CDS5\n }\n id\n }\n}\n\nfragment repositoryHomeSelectionView_user_12CDS5 on User {\n id\n login\n avatarUrl(size: 24)\n organizations(first: $organizationCount, after: $organizationCursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n id\n login\n avatarUrl(size: 24)\n viewerCanCreateRepositories\n __typename\n }\n }\n }\n}\n", + "metadata": {} + } +}; +})(); +// prettier-ignore +(node/*: any*/).hash = '67e7843e3ff792e86e979cc948929ea3'; +module.exports = node; diff --git a/lib/views/__generated__/repositoryHomeSelectionView_user.graphql.js b/lib/views/__generated__/repositoryHomeSelectionView_user.graphql.js new file mode 100644 index 0000000000..d94e522482 --- /dev/null +++ b/lib/views/__generated__/repositoryHomeSelectionView_user.graphql.js @@ -0,0 +1,192 @@ +/** + * @flow + */ + +/* eslint-disable */ + +'use strict'; + +/*:: +import type { ReaderFragment } from 'relay-runtime'; +import type { FragmentReference } from "relay-runtime"; +declare export opaque type repositoryHomeSelectionView_user$ref: FragmentReference; +declare export opaque type repositoryHomeSelectionView_user$fragmentType: repositoryHomeSelectionView_user$ref; +export type repositoryHomeSelectionView_user = {| + +id: string, + +login: string, + +avatarUrl: any, + +organizations: {| + +pageInfo: {| + +hasNextPage: boolean, + +endCursor: ?string, + |}, + +edges: ?$ReadOnlyArray, + |}, + +$refType: repositoryHomeSelectionView_user$ref, +|}; +export type repositoryHomeSelectionView_user$data = repositoryHomeSelectionView_user; +export type repositoryHomeSelectionView_user$key = { + +$data?: repositoryHomeSelectionView_user$data, + +$fragmentRefs: repositoryHomeSelectionView_user$ref, +}; +*/ + + +const node/*: ReaderFragment*/ = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null +}, +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "login", + "args": null, + "storageKey": null +}, +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "avatarUrl", + "args": [ + { + "kind": "Literal", + "name": "size", + "value": 24 + } + ], + "storageKey": "avatarUrl(size:24)" +}; +return { + "kind": "Fragment", + "name": "repositoryHomeSelectionView_user", + "type": "User", + "metadata": { + "connection": [ + { + "count": "organizationCount", + "cursor": "organizationCursor", + "direction": "forward", + "path": [ + "organizations" + ] + } + ] + }, + "argumentDefinitions": [ + { + "kind": "LocalArgument", + "name": "organizationCount", + "type": "Int!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "organizationCursor", + "type": "String", + "defaultValue": null + } + ], + "selections": [ + (v0/*: any*/), + (v1/*: any*/), + (v2/*: any*/), + { + "kind": "LinkedField", + "alias": "organizations", + "name": "__RepositoryHomeSelectionView_organizations_connection", + "storageKey": null, + "args": null, + "concreteType": "OrganizationConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "OrganizationEdge", + "plural": true, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Organization", + "plural": false, + "selections": [ + (v0/*: any*/), + (v1/*: any*/), + (v2/*: any*/), + { + "kind": "ScalarField", + "alias": null, + "name": "viewerCanCreateRepositories", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ] + } + ] + } + ] + } + ] +}; +})(); +// prettier-ignore +(node/*: any*/).hash = '11a1f1d0eac32bff0a3371217c0eede3'; +module.exports = node; diff --git a/lib/views/actionable-review-view.js b/lib/views/actionable-review-view.js index aa92696ed1..888837db67 100644 --- a/lib/views/actionable-review-view.js +++ b/lib/views/actionable-review-view.js @@ -124,28 +124,17 @@ export default class ActionableReviewView extends React.Component { } } - reportAbuse = (commentUrl, author) => { - return new Promise((resolve, reject) => { - const url = 'https://github.com/contact/report-content?report=' + - `${encodeURIComponent(author)}&content_url=${encodeURIComponent(commentUrl)}`; - shell.openExternal(url, {}, err => { - if (err) { reject(err); } else { - resolve(); - addEvent('report-abuse', {package: 'github', component: this.constructor.name}); - } - }); - }); + reportAbuse = async (commentUrl, author) => { + const url = 'https://github.com/contact/report-content?report=' + + `${encodeURIComponent(author)}&content_url=${encodeURIComponent(commentUrl)}`; + + await shell.openExternal(url); + addEvent('report-abuse', {package: 'github', component: this.constructor.name}); } - openOnGitHub = url => { - return new Promise((resolve, reject) => { - shell.openExternal(url, {}, err => { - if (err) { reject(err); } else { - resolve(); - addEvent('open-comment-in-browser', {package: 'github', component: this.constructor.name}); - } - }); - }); + openOnGitHub = async url => { + await shell.openExternal(url); + addEvent('open-comment-in-browser', {package: 'github', component: this.constructor.name}); } showActionsMenu = (event, content, author) => { diff --git a/lib/views/clone-dialog.js b/lib/views/clone-dialog.js index 32bb97d8d1..3ffe0d3238 100644 --- a/lib/views/clone-dialog.js +++ b/lib/views/clone-dialog.js @@ -5,9 +5,9 @@ import {TextBuffer} from 'atom'; import url from 'url'; import path from 'path'; -import AtomTextEditor from '../atom/atom-text-editor'; -import AutoFocus from '../autofocus'; +import TabGroup from '../tab-group'; import DialogView from './dialog-view'; +import {TabbableTextEditor} from './tabbable'; export default class CloneDialog extends React.Component { static propTypes = { @@ -45,7 +45,7 @@ export default class CloneDialog extends React.Component { this.destinationPath.onDidChange(this.didChangeDestinationPath), ); - this.autofocus = new AutoFocus(); + this.tabGroup = new TabGroup(); } render() { @@ -57,7 +57,7 @@ export default class CloneDialog extends React.Component { acceptText="Clone" accept={this.accept} cancel={this.props.request.cancel} - autofocus={this.autofocus} + tabGroup={this.tabGroup} inProgress={this.props.inProgress} error={this.props.error} workspace={this.props.workspace} @@ -65,19 +65,23 @@ export default class CloneDialog extends React.Component { {params.includeRemember && (