diff options
85 files changed, 4212 insertions, 480 deletions
diff --git a/.gitlab/ci/package-and-test/main.gitlab-ci.yml b/.gitlab/ci/package-and-test/main.gitlab-ci.yml index 6dd0a92d9c4..14ea310fdf0 100644 --- a/.gitlab/ci/package-and-test/main.gitlab-ci.yml +++ b/.gitlab/ci/package-and-test/main.gitlab-ci.yml @@ -603,7 +603,7 @@ ee:importers: extends: .qa variables: QA_SCENARIO: Test::Integration::Import - QA_MOCK_GITHUB: "false" + QA_MOCK_GITHUB: "true" GITLAB_QA_OPTS: --set-feature-flags bulk_import_projects=enabled rules: - !reference [.rules:test:qa, rules] diff --git a/.rubocop_todo/database/multiple_databases.yml b/.rubocop_todo/database/multiple_databases.yml index be91da8aad4..1e53f102683 100644 --- a/.rubocop_todo/database/multiple_databases.yml +++ b/.rubocop_todo/database/multiple_databases.yml @@ -4,4 +4,3 @@ Database/MultipleDatabases: - 'db/post_migrate/20210317104032_set_iteration_cadence_automatic_to_false.rb' - 'db/post_migrate/20210811122206_update_external_project_bots.rb' - 'db/post_migrate/20210812013042_remove_duplicate_project_authorizations.rb' - - 'ee/spec/services/ee/merge_requests/update_service_spec.rb' diff --git a/app/assets/javascripts/boards/components/board_card_inner.vue b/app/assets/javascripts/boards/components/board_card_inner.vue index 4f919019813..77df111afc1 100644 --- a/app/assets/javascripts/boards/components/board_card_inner.vue +++ b/app/assets/javascripts/boards/components/board_card_inner.vue @@ -8,7 +8,7 @@ import { GlSprintf, } from '@gitlab/ui'; import { sortBy } from 'lodash'; -import { mapActions, mapGetters, mapState } from 'vuex'; +import { mapActions, mapState } from 'vuex'; import boardCardInner from 'ee_else_ce/boards/mixins/board_card_inner'; import { isScopedLabel } from '~/lib/utils/common_utils'; import { updateHistory } from '~/lib/utils/url_utility'; @@ -43,7 +43,7 @@ export default { GlTooltip: GlTooltipDirective, }, mixins: [boardCardInner], - inject: ['rootPath', 'scopedLabelsAvailable', 'isEpicBoard', 'issuableType'], + inject: ['rootPath', 'scopedLabelsAvailable', 'isEpicBoard', 'issuableType', 'isGroupBoard'], props: { item: { type: Object, @@ -78,7 +78,6 @@ export default { }, computed: { ...mapState(['isShowingLabels', 'allowSubEpics']), - ...mapGetters(['isProjectBoard']), cappedAssignees() { // e.g. maxRender is 4, // Render up to all 4 assignees if there are only 4 assigness @@ -158,7 +157,7 @@ export default { return Math.round((this.item.descendantWeightSum.closedIssues / this.totalWeight) * 100); }, showReferencePath() { - return !this.isProjectBoard && this.itemReferencePath; + return this.isGroupBoard && this.itemReferencePath; }, avatarSize() { return { default: 16, lg: 24 }; diff --git a/app/assets/javascripts/boards/components/board_content.vue b/app/assets/javascripts/boards/components/board_content.vue index ca86894ca40..1d585e3407b 100644 --- a/app/assets/javascripts/boards/components/board_content.vue +++ b/app/assets/javascripts/boards/components/board_content.vue @@ -9,7 +9,7 @@ import { s__ } from '~/locale'; import { formatBoardLists } from 'ee_else_ce/boards/boards_util'; import BoardAddNewColumn from 'ee_else_ce/boards/components/board_add_new_column.vue'; import { defaultSortableOptions } from '~/sortable/constants'; -import { DraggableItemTypes, BoardType, listsQuery } from 'ee_else_ce/boards/constants'; +import { DraggableItemTypes, listsQuery } from 'ee_else_ce/boards/constants'; import BoardColumn from './board_column.vue'; export default { @@ -35,6 +35,7 @@ export default { 'issuableType', 'isIssueBoard', 'isEpicBoard', + 'isGroupBoard', 'isApolloBoard', ], props: { @@ -89,8 +90,8 @@ export default { queryVariables() { return { ...(this.isIssueBoard && { - isGroup: this.boardType === BoardType.group, - isProject: this.boardType === BoardType.project, + isGroup: this.isGroupBoard, + isProject: !this.isGroupBoard, }), fullPath: this.fullPath, boardId: this.boardId, diff --git a/app/assets/javascripts/boards/components/board_content_sidebar.vue b/app/assets/javascripts/boards/components/board_content_sidebar.vue index 97b017fea58..e6d1e558c37 100644 --- a/app/assets/javascripts/boards/components/board_content_sidebar.vue +++ b/app/assets/javascripts/boards/components/board_content_sidebar.vue @@ -6,7 +6,7 @@ import SidebarDropdownWidget from 'ee_else_ce/sidebar/components/sidebar_dropdow import { __, sprintf } from '~/locale'; import BoardSidebarTimeTracker from '~/boards/components/sidebar/board_sidebar_time_tracker.vue'; import BoardSidebarTitle from '~/boards/components/sidebar/board_sidebar_title.vue'; -import { ISSUABLE, INCIDENT, issuableTypes } from '~/boards/constants'; +import { BoardType, ISSUABLE, INCIDENT, issuableTypes } from '~/boards/constants'; import { getIdFromGraphQLId } from '~/graphql_shared/utils'; import SidebarAssigneesWidget from '~/sidebar/components/assignees/sidebar_assignees_widget.vue'; import SidebarConfidentialityWidget from '~/sidebar/components/confidential/sidebar_confidentiality_widget.vue'; @@ -68,11 +68,13 @@ export default { issuableType: { default: issuableTypes.issue, }, + isGroupBoard: { + default: false, + }, }, inheritAttrs: false, computed: { ...mapGetters([ - 'isGroupBoard', 'isSidebarOpen', 'activeBoardItem', 'groupPathForActiveIssue', @@ -94,14 +96,17 @@ export default { fullPath() { return this.activeBoardItem?.referencePath?.split('#')[0] || ''; }, + parentType() { + return this.isGroupBoard ? BoardType.group : BoardType.project; + }, createLabelTitle() { return sprintf(__('Create %{workspace} label'), { - workspace: this.isGroupBoard ? 'group' : 'project', + workspace: this.parentType, }); }, manageLabelTitle() { return sprintf(__('Manage %{workspace} labels'), { - workspace: this.isGroupBoard ? 'group' : 'project', + workspace: this.parentType, }); }, attrWorkspacePath() { diff --git a/app/assets/javascripts/boards/components/board_form.vue b/app/assets/javascripts/boards/components/board_form.vue index fcf026bbe00..a71bde54a8f 100644 --- a/app/assets/javascripts/boards/components/board_form.vue +++ b/app/assets/javascripts/boards/components/board_form.vue @@ -1,6 +1,6 @@ <script> import { GlModal, GlAlert } from '@gitlab/ui'; -import { mapGetters, mapActions, mapState } from 'vuex'; +import { mapActions, mapState } from 'vuex'; import { getIdFromGraphQLId } from '~/graphql_shared/utils'; import { visitUrl, updateHistory, getParameterByName } from '~/lib/utils/url_utility'; import { __, s__ } from '~/locale'; @@ -51,6 +51,12 @@ export default { boardBaseUrl: { default: '', }, + isGroupBoard: { + default: false, + }, + isProjectBoard: { + default: false, + }, }, props: { canAdminBoard: { @@ -84,7 +90,6 @@ export default { }, computed: { ...mapState(['error']), - ...mapGetters(['isGroupBoard', 'isProjectBoard']), isNewForm() { return this.currentPage === formType.new; }, diff --git a/app/assets/javascripts/boards/components/board_new_issue.vue b/app/assets/javascripts/boards/components/board_new_issue.vue index e756db9f5b9..8b9fafca306 100644 --- a/app/assets/javascripts/boards/components/board_new_issue.vue +++ b/app/assets/javascripts/boards/components/board_new_issue.vue @@ -16,7 +16,7 @@ export default { ProjectSelect, }, mixins: [BoardNewIssueMixin], - inject: ['groupId', 'fullPath'], + inject: ['groupId', 'fullPath', 'isGroupBoard'], props: { list: { type: Object, @@ -25,7 +25,7 @@ export default { }, computed: { ...mapState(['selectedProject']), - ...mapGetters(['isGroupBoard', 'getBoardItemsByList']), + ...mapGetters(['getBoardItemsByList']), formEventPrefix() { return toggleFormEventPrefix.issue; }, diff --git a/app/assets/javascripts/boards/components/boards_selector.vue b/app/assets/javascripts/boards/components/boards_selector.vue index 5f8b13d5a57..d26aeb69dd5 100644 --- a/app/assets/javascripts/boards/components/boards_selector.vue +++ b/app/assets/javascripts/boards/components/boards_selector.vue @@ -9,7 +9,7 @@ import { GlModalDirective, } from '@gitlab/ui'; import { throttle } from 'lodash'; -import { mapActions, mapGetters, mapState } from 'vuex'; +import { mapActions, mapState } from 'vuex'; import BoardForm from 'ee_else_ce/boards/components/board_form.vue'; @@ -50,6 +50,7 @@ export default { 'scopedIssueBoardFeatureEnabled', 'weights', 'boardType', + 'isGroupBoard', ], props: { throttleDuration: { @@ -76,7 +77,6 @@ export default { computed: { ...mapState(['board', 'isBoardLoading']), - ...mapGetters(['isGroupBoard', 'isProjectBoard']), parentType() { return this.boardType; }, diff --git a/app/assets/javascripts/boards/components/issue_board_filtered_search.vue b/app/assets/javascripts/boards/components/issue_board_filtered_search.vue index bc68c2e0e99..38a171e8889 100644 --- a/app/assets/javascripts/boards/components/issue_board_filtered_search.vue +++ b/app/assets/javascripts/boards/components/issue_board_filtered_search.vue @@ -4,7 +4,6 @@ import fuzzaldrinPlus from 'fuzzaldrin-plus'; import { mapActions } from 'vuex'; import { orderBy } from 'lodash'; import BoardFilteredSearch from 'ee_else_ce/boards/components/board_filtered_search.vue'; -import { BoardType } from '~/boards/constants'; import axios from '~/lib/utils/axios_utils'; import { joinPaths } from '~/lib/utils/url_utility'; import issueBoardFilters from '~/boards/issue_board_filters'; @@ -47,23 +46,15 @@ export default { issue: __('Issue'), }, components: { BoardFilteredSearch }, - inject: ['isSignedIn', 'releasesFetchPath', 'fullPath', 'boardType'], + inject: ['isSignedIn', 'releasesFetchPath', 'fullPath', 'isGroupBoard'], computed: { - isGroupBoard() { - return this.boardType === BoardType.group; - }, - epicsGroupPath() { - return this.isGroupBoard - ? this.fullPath - : this.fullPath.slice(0, this.fullPath.lastIndexOf('/')); - }, tokensCE() { const { issue, incident } = this.$options.i18n; const { types } = this.$options; const { fetchUsers, fetchLabels } = issueBoardFilters( this.$apollo, this.fullPath, - this.boardType, + this.isGroupBoard, ); const tokens = [ diff --git a/app/assets/javascripts/boards/index.js b/app/assets/javascripts/boards/index.js index f8bd81e6b98..968832a092d 100644 --- a/app/assets/javascripts/boards/index.js +++ b/app/assets/javascripts/boards/index.js @@ -3,7 +3,7 @@ import Vue from 'vue'; import VueApollo from 'vue-apollo'; import BoardApp from '~/boards/components/board_app.vue'; import '~/boards/filters/due_date_filters'; -import { issuableTypes } from '~/boards/constants'; +import { BoardType, issuableTypes } from '~/boards/constants'; import store from '~/boards/stores'; import { NavigationType, @@ -31,17 +31,19 @@ function mountBoardApp(el) { ...convertObjectPropsToCamelCase(rawFilterParams), }; + const boardType = el.dataset.parent; + store.dispatch('fetchBoard', { fullPath, fullBoardId: fullBoardId(boardId), - boardType: el.dataset.parent, + boardType, }); store.dispatch('setInitialBoardData', { boardId, fullBoardId: fullBoardId(boardId), fullPath, - boardType: el.dataset.parent, + boardType, disabled: parseBoolean(el.dataset.disabled) || true, issuableType: issuableTypes.issue, }); @@ -61,7 +63,9 @@ function mountBoardApp(el) { fullPath, initialFilterParams, boardBaseUrl: el.dataset.boardBaseUrl, - boardType: el.dataset.parent, + boardType, + isGroupBoard: boardType === BoardType.group, + isProjectBoard: boardType === BoardType.project, currentUserId: gon.current_user_id || null, boardWeight: el.dataset.boardWeight ? parseInt(el.dataset.boardWeight, 10) : null, labelsManagePath: el.dataset.labelsManagePath, diff --git a/app/assets/javascripts/boards/issue_board_filters.js b/app/assets/javascripts/boards/issue_board_filters.js index 4bfd92fb748..7e9b68778d5 100644 --- a/app/assets/javascripts/boards/issue_board_filters.js +++ b/app/assets/javascripts/boards/issue_board_filters.js @@ -1,11 +1,8 @@ import groupBoardMembers from '~/boards/graphql/group_board_members.query.graphql'; import projectBoardMembers from '~/boards/graphql/project_board_members.query.graphql'; -import { BoardType } from './constants'; import boardLabels from './graphql/board_labels.query.graphql'; -export default function issueBoardFilters(apollo, fullPath, boardType) { - const isGroupBoard = boardType === BoardType.group; - const isProjectBoard = boardType === BoardType.project; +export default function issueBoardFilters(apollo, fullPath, isGroupBoard) { const transformLabels = ({ data }) => { return isGroupBoard ? data.group?.labels.nodes || [] : data.project?.labels.nodes || []; }; @@ -34,7 +31,7 @@ export default function issueBoardFilters(apollo, fullPath, boardType) { fullPath, searchTerm: labelSearchTerm, isGroup: isGroupBoard, - isProject: isProjectBoard, + isProject: !isGroupBoard, }, }) .then(transformLabels); diff --git a/app/assets/javascripts/boards/stores/getters.js b/app/assets/javascripts/boards/stores/getters.js index e1891a4d954..9e746f1a1b8 100644 --- a/app/assets/javascripts/boards/stores/getters.js +++ b/app/assets/javascripts/boards/stores/getters.js @@ -1,9 +1,7 @@ import { find } from 'lodash'; -import { BoardType, inactiveId, issuableTypes } from '../constants'; +import { inactiveId, issuableTypes } from '../constants'; export default { - isGroupBoard: (state) => state.boardType === BoardType.group, - isProjectBoard: (state) => state.boardType === BoardType.project, isSidebarOpen: (state) => state.activeId !== inactiveId, isSwimlanesOn: () => false, getBoardItemById: (state) => (id) => { diff --git a/app/assets/javascripts/work_items/components/work_item_detail_modal.vue b/app/assets/javascripts/work_items/components/work_item_detail_modal.vue index 64c2dcc5304..faea80a9de8 100644 --- a/app/assets/javascripts/work_items/components/work_item_detail_modal.vue +++ b/app/assets/javascripts/work_items/components/work_item_detail_modal.vue @@ -161,7 +161,7 @@ export default { :work-item-parent-id="issueGid" :work-item-id="displayedWorkItemId" :work-item-iid="workItemIid" - class="gl-p-5 gl-mt-n3" + class="gl-p-5 gl-mt-n3 gl-reset-bg gl-isolate" @close="hide" @deleteWorkItem="deleteWorkItem" @update-modal="updateModal" diff --git a/app/assets/stylesheets/utilities.scss b/app/assets/stylesheets/utilities.scss index e5f0fe14d1c..7d98a780e55 100644 --- a/app/assets/stylesheets/utilities.scss +++ b/app/assets/stylesheets/utilities.scss @@ -294,3 +294,7 @@ to @gitlab/ui by https://gitlab.com/gitlab-org/gitlab-ui/-/issues/1709 .gl-max-w-0 { max-width: 0; } + +.gl-isolate { + isolation: isolate; +} diff --git a/app/controllers/projects/google_cloud/deployments_controller.rb b/app/controllers/projects/google_cloud/deployments_controller.rb index 041486eb2fb..fae8dbd59c7 100644 --- a/app/controllers/projects/google_cloud/deployments_controller.rb +++ b/app/controllers/projects/google_cloud/deployments_controller.rb @@ -75,6 +75,13 @@ The `deploy-to-cloud-run` job: * `GCP_PROJECT_ID` * `GCP_SERVICE_ACCOUNT_KEY` * Job definition can be found at: https://gitlab.com/gitlab-org/incubation-engineering/five-minute-production/library +* Uses CI/CD variables to configure the deployment. You can override the default values by adding these variables: + * `GCP_CLOUD_RUN_MAX_INSTANCES` + * `GCP_CLOUD_RUN_MIN_INSTANCES` + * `GCP_CLOUD_RUN_CONCURRENCY` + * `GCP_CLOUD_RUN_CPU` + * `GCP_CLOUD_RUN_MEMORY` + * `GCP_CLOUD_RUN_TIMEOUT` This pipeline definition has been committed to the branch `#{branch_name}`. You may modify the pipeline definition further or accept the changes as-is if suitable. diff --git a/app/validators/json_schemas/cyclonedx_report.json b/app/validators/json_schemas/cyclonedx_report.json index 65c3c3c0cb9..7b24c05a039 100644 --- a/app/validators/json_schemas/cyclonedx_report.json +++ b/app/validators/json_schemas/cyclonedx_report.json @@ -3,7 +3,7 @@ "$id": "http://cyclonedx.org/schema/bom-1.4.schema.json", "type": "object", "title": "CycloneDX Software Bill of Materials Standard", - "$comment" : "CycloneDX JSON schema is published under the terms of the Apache License 2.0.", + "$comment": "CycloneDX JSON schema is published under the terms of the Apache License 2.0.", "required": [ "bomFormat", "specVersion", @@ -29,13 +29,17 @@ "type": "string", "title": "CycloneDX Specification Version", "description": "The version of the CycloneDX specification a BOM conforms to (starting at version 1.2).", - "examples": ["1.4"] + "examples": [ + "1.4" + ] }, "serialNumber": { "type": "string", "title": "BOM Serial Number", "description": "Every BOM generated SHOULD have a unique serial number, even if the contents of the BOM have not changed over time. If specified, the serial number MUST conform to RFC-4122. Use of serial numbers are RECOMMENDED.", - "examples": ["urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79"], + "examples": [ + "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" + ], "pattern": "^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" }, "version": { @@ -43,7 +47,9 @@ "title": "BOM Version", "description": "Whenever an existing BOM is modified, either manually or through automated processes, the version of the BOM SHOULD be incremented by 1. When a system is presented with multiple BOMs with identical serial numbers, the system SHOULD use the most recent version of the BOM. The default version is '1'.", "default": 1, - "examples": [1] + "examples": [ + 1 + ] }, "metadata": { "$ref": "#/definitions/metadata", @@ -53,7 +59,9 @@ "components": { "type": "array", "additionalItems": false, - "items": {"$ref": "#/definitions/component"}, + "items": { + "$ref": "#/definitions/component" + }, "uniqueItems": true, "title": "Components", "description": "A list of software and hardware components." @@ -61,7 +69,9 @@ "services": { "type": "array", "additionalItems": false, - "items": {"$ref": "#/definitions/service"}, + "items": { + "$ref": "#/definitions/service" + }, "uniqueItems": true, "title": "Services", "description": "A list of services. This may include microservices, function-as-a-service, and other types of network or intra-process services." @@ -69,14 +79,18 @@ "externalReferences": { "type": "array", "additionalItems": false, - "items": {"$ref": "#/definitions/externalReference"}, + "items": { + "$ref": "#/definitions/externalReference" + }, "title": "External References", "description": "External references provide a way to document systems, sites, and information that may be relevant but which are not included with the BOM." }, "dependencies": { "type": "array", "additionalItems": false, - "items": {"$ref": "#/definitions/dependency"}, + "items": { + "$ref": "#/definitions/dependency" + }, "uniqueItems": true, "title": "Dependencies", "description": "Provides the ability to document dependency relationships." @@ -84,7 +98,9 @@ "compositions": { "type": "array", "additionalItems": false, - "items": {"$ref": "#/definitions/compositions"}, + "items": { + "$ref": "#/definitions/compositions" + }, "uniqueItems": true, "title": "Compositions", "description": "Compositions describe constituent parts (including components, services, and dependency relationships) and their completeness." @@ -92,7 +108,9 @@ "vulnerabilities": { "type": "array", "additionalItems": false, - "items": {"$ref": "#/definitions/vulnerability"}, + "items": { + "$ref": "#/definitions/vulnerability" + }, "uniqueItems": true, "title": "Vulnerabilities", "description": "Vulnerabilities identified in components or services." @@ -124,14 +142,18 @@ "title": "Creation Tools", "description": "The tool(s) used in the creation of the BOM.", "additionalItems": false, - "items": {"$ref": "#/definitions/tool"} + "items": { + "$ref": "#/definitions/tool" + } }, - "authors" :{ + "authors": { "type": "array", "title": "Authors", "description": "The person(s) who created the BOM. Authors are common in BOMs created through manual processes. BOMs created through automated means may not have authors.", "additionalItems": false, - "items": {"$ref": "#/definitions/organizationalContact"} + "items": { + "$ref": "#/definitions/organizationalContact" + } }, "component": { "title": "Component", @@ -152,14 +174,18 @@ "type": "array", "title": "BOM License(s)", "additionalItems": false, - "items": {"$ref": "#/definitions/licenseChoice"} + "items": { + "$ref": "#/definitions/licenseChoice" + } }, "properties": { "type": "array", "title": "Properties", "description": "Provides the ability to document properties in a name-value store. This provides flexibility to include data not officially supported in the standard without having to use additional namespaces or create extensions. Unlike key-value stores, properties support duplicate names, each potentially having different values. Property names of interest to the general public are encouraged to be registered in the [CycloneDX Property Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy). Formal registration is OPTIONAL.", "additionalItems": false, - "items": {"$ref": "#/definitions/property"} + "items": { + "$ref": "#/definitions/property" + } } } }, @@ -187,14 +213,18 @@ "hashes": { "type": "array", "additionalItems": false, - "items": {"$ref": "#/definitions/hash"}, + "items": { + "$ref": "#/definitions/hash" + }, "title": "Hashes", "description": "The hashes of the tool (if applicable)." }, "externalReferences": { "type": "array", "additionalItems": false, - "items": {"$ref": "#/definitions/externalReference"}, + "items": { + "$ref": "#/definitions/externalReference" + }, "title": "External References", "description": "External references provide a way to document systems, sites, and information that may be relevant but which are not included with the BOM." } @@ -222,14 +252,18 @@ }, "title": "URL", "description": "The URL of the organization. Multiple URLs are allowed.", - "examples": ["https://example.com"] + "examples": [ + "https://example.com" + ] }, "contact": { "type": "array", "title": "Contact", "description": "A contact at the organization. Multiple contacts are allowed.", "additionalItems": false, - "items": {"$ref": "#/definitions/organizationalContact"} + "items": { + "$ref": "#/definitions/organizationalContact" + } } } }, @@ -243,20 +277,26 @@ "type": "string", "title": "Name", "description": "The name of a contact", - "examples": ["Contact name"] + "examples": [ + "Contact name" + ] }, "email": { "type": "string", "format": "idn-email", "title": "Email Address", "description": "The email address of the contact.", - "examples": ["firstname.lastname@example.com"] + "examples": [ + "firstname.lastname@example.com" + ] }, "phone": { "type": "string", "title": "Phone", "description": "The phone number of the contact.", - "examples": ["800-555-1212"] + "examples": [ + "800-555-1212" + ] } } }, @@ -283,13 +323,17 @@ ], "title": "Component Type", "description": "Specifies the type of component. For software components, classify as application if no more specific appropriate classification is available or cannot be determined for the component. Types include:\n\n* __application__ = A software application. Refer to [https://en.wikipedia.org/wiki/Application_software](https://en.wikipedia.org/wiki/Application_software) for information about applications.\n* __framework__ = A software framework. Refer to [https://en.wikipedia.org/wiki/Software_framework](https://en.wikipedia.org/wiki/Software_framework) for information on how frameworks vary slightly from libraries.\n* __library__ = A software library. Refer to [https://en.wikipedia.org/wiki/Library_(computing)](https://en.wikipedia.org/wiki/Library_(computing))\n for information about libraries. All third-party and open source reusable components will likely be a library. If the library also has key features of a framework, then it should be classified as a framework. If not, or is unknown, then specifying library is RECOMMENDED.\n* __container__ = A packaging and/or runtime format, not specific to any particular technology, which isolates software inside the container from software outside of a container through virtualization technology. Refer to [https://en.wikipedia.org/wiki/OS-level_virtualization](https://en.wikipedia.org/wiki/OS-level_virtualization)\n* __operating-system__ = A software operating system without regard to deployment model (i.e. installed on physical hardware, virtual machine, image, etc) Refer to [https://en.wikipedia.org/wiki/Operating_system](https://en.wikipedia.org/wiki/Operating_system)\n* __device__ = A hardware device such as a processor, or chip-set. A hardware device containing firmware SHOULD include a component for the physical hardware itself, and another component of type 'firmware' or 'operating-system' (whichever is relevant), describing information about the software running on the device.\n* __firmware__ = A special type of software that provides low-level control over a devices hardware. Refer to [https://en.wikipedia.org/wiki/Firmware](https://en.wikipedia.org/wiki/Firmware)\n* __file__ = A computer file. Refer to [https://en.wikipedia.org/wiki/Computer_file](https://en.wikipedia.org/wiki/Computer_file) for information about files.", - "examples": ["library"] + "examples": [ + "library" + ] }, "mime-type": { "type": "string", "title": "Mime-Type", "description": "The optional mime-type of the component. When used on file components, the mime-type can provide additional context about the kind of file being represented such as an image, font, or executable. Some library or framework components may also have an associated mime-type.", - "examples": ["image/jpeg"], + "examples": [ + "image/jpeg" + ], "pattern": "^[-+a-z0-9.]+/[-+a-z0-9.]+$" }, "bom-ref": { @@ -306,31 +350,41 @@ "type": "string", "title": "Component Author", "description": "The person(s) or organization(s) that authored the component", - "examples": ["Acme Inc"] + "examples": [ + "Acme Inc" + ] }, "publisher": { "type": "string", "title": "Component Publisher", "description": "The person(s) or organization(s) that published the component", - "examples": ["Acme Inc"] + "examples": [ + "Acme Inc" + ] }, "group": { "type": "string", "title": "Component Group", "description": "The grouping name or identifier. This will often be a shortened, single name of the company or project that produced the component, or the source package or domain name. Whitespace and special characters should be avoided. Examples include: apache, org.apache.commons, and apache.org.", - "examples": ["com.acme"] + "examples": [ + "com.acme" + ] }, "name": { "type": "string", "title": "Component Name", "description": "The name of the component. This will often be a shortened, single name of the component. Examples: commons-lang3 and jquery", - "examples": ["tomcat-catalina"] + "examples": [ + "tomcat-catalina" + ] }, "version": { "type": "string", "title": "Component Version", "description": "The component version. The version should ideally comply with semantic versioning but is not enforced.", - "examples": ["9.0.14"] + "examples": [ + "9.0.14" + ] }, "description": { "type": "string", @@ -352,31 +406,41 @@ "type": "array", "title": "Component Hashes", "additionalItems": false, - "items": {"$ref": "#/definitions/hash"} + "items": { + "$ref": "#/definitions/hash" + } }, "licenses": { "type": "array", "additionalItems": false, - "items": {"$ref": "#/definitions/licenseChoice"}, + "items": { + "$ref": "#/definitions/licenseChoice" + }, "title": "Component License(s)" }, "copyright": { "type": "string", "title": "Component Copyright", "description": "A copyright notice informing users of the underlying claims to copyright ownership in a published work.", - "examples": ["Acme Inc"] + "examples": [ + "Acme Inc" + ] }, "cpe": { "type": "string", "title": "Component Common Platform Enumeration (CPE)", "description": "Specifies a well-formed CPE name that conforms to the CPE 2.2 or 2.3 specification. See [https://nvd.nist.gov/products/cpe](https://nvd.nist.gov/products/cpe)", - "examples": ["cpe:2.3:a:acme:component_framework:-:*:*:*:*:*:*:*"] + "examples": [ + "cpe:2.3:a:acme:component_framework:-:*:*:*:*:*:*:*" + ] }, "purl": { "type": "string", "title": "Component Package URL (purl)", "description": "Specifies the package-url (purl). The purl, if specified, MUST be valid and conform to the specification defined at: [https://github.com/package-url/purl-spec](https://github.com/package-url/purl-spec)", - "examples": ["pkg:maven/com.acme/tomcat-catalina@9.0.14?packaging=jar"] + "examples": [ + "pkg:maven/com.acme/tomcat-catalina@9.0.14?packaging=jar" + ] }, "swid": { "$ref": "#/definitions/swid", @@ -399,35 +463,45 @@ "title": "Ancestors", "description": "Describes zero or more components in which a component is derived from. This is commonly used to describe forks from existing projects where the forked version contains a ancestor node containing the original component it was forked from. For example, Component A is the original component. Component B is the component being used and documented in the BOM. However, Component B contains a pedigree node with a single ancestor documenting Component A - the original component from which Component B is derived from.", "additionalItems": false, - "items": {"$ref": "#/definitions/component"} + "items": { + "$ref": "#/definitions/component" + } }, "descendants": { "type": "array", "title": "Descendants", "description": "Descendants are the exact opposite of ancestors. This provides a way to document all forks (and their forks) of an original or root component.", "additionalItems": false, - "items": {"$ref": "#/definitions/component"} + "items": { + "$ref": "#/definitions/component" + } }, "variants": { "type": "array", "title": "Variants", "description": "Variants describe relations where the relationship between the components are not known. For example, if Component A contains nearly identical code to Component B. They are both related, but it is unclear if one is derived from the other, or if they share a common ancestor.", "additionalItems": false, - "items": {"$ref": "#/definitions/component"} + "items": { + "$ref": "#/definitions/component" + } }, "commits": { "type": "array", "title": "Commits", "description": "A list of zero or more commits which provide a trail describing how the component deviates from an ancestor, descendant, or variant.", "additionalItems": false, - "items": {"$ref": "#/definitions/commit"} + "items": { + "$ref": "#/definitions/commit" + } }, "patches": { "type": "array", "title": "Patches", "description": ">A list of zero or more patches describing how the component deviates from an ancestor, descendant, or variant. Patches may be complimentary to commits or may be used in place of commits.", "additionalItems": false, - "items": {"$ref": "#/definitions/patch"} + "items": { + "$ref": "#/definitions/patch" + } }, "notes": { "type": "string", @@ -439,14 +513,18 @@ "externalReferences": { "type": "array", "additionalItems": false, - "items": {"$ref": "#/definitions/externalReference"}, + "items": { + "$ref": "#/definitions/externalReference" + }, "title": "External References", "description": "External references provide a way to document systems, sites, and information that may be relevant but which are not included with the BOM." }, "components": { "type": "array", "additionalItems": false, - "items": {"$ref": "#/definitions/component"}, + "items": { + "$ref": "#/definitions/component" + }, "uniqueItems": true, "title": "Components", "description": "A list of software and hardware components included in the parent component. This is not a dependency tree. It provides a way to specify a hierarchical representation of component assemblies, similar to system → subsystem → parts assembly in physical supply chains." @@ -466,7 +544,9 @@ "title": "Properties", "description": "Provides the ability to document properties in a name-value store. This provides flexibility to include data not officially supported in the standard without having to use additional namespaces or create extensions. Unlike key-value stores, properties support duplicate names, each potentially having different values. Property names of interest to the general public are encouraged to be registered in the [CycloneDX Property Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy). Formal registration is OPTIONAL.", "additionalItems": false, - "items": {"$ref": "#/definitions/property"} + "items": { + "$ref": "#/definitions/property" + } }, "signature": { "$ref": "#/definitions/signature", @@ -594,7 +674,9 @@ "hash-content": { "type": "string", "title": "Hash Content (value)", - "examples": ["3942447fac867ae5cdb3229b658f4d48"], + "examples": [ + "3942447fac867ae5cdb3229b658f4d48" + ], "pattern": "^([a-fA-F0-9]{32}|[a-fA-F0-9]{40}|[a-fA-F0-9]{64}|[a-fA-F0-9]{96}|[a-fA-F0-9]{128})$" }, "license": { @@ -602,25 +684,565 @@ "title": "License Object", "oneOf": [ { - "required": ["id"] + "required": [ + "id" + ] }, { - "required": ["name"] + "required": [ + "name" + ] } ], "additionalProperties": false, "properties": { "id": { - "$ref": "spdx.schema.json", "title": "License ID (SPDX)", "description": "A valid SPDX license ID", - "examples": ["Apache-2.0"] + "examples": [ + "Apache-2.0" + ], + "type": "string", + "enum": [ + "CC-BY-NC-ND-2.0", + "SGI-B-2.0", + "LPPL-1.3c", + "NIST-PD-fallback", + "libtiff", + "XSkat", + "PDDL-1.0", + "KiCad-libraries-exception", + "CC-BY-NC-SA-1.0", + "GFDL-1.1-no-invariants-only", + "Xerox", + "LPPL-1.1", + "VOSTROM", + "UCL-1.0", + "ADSL", + "OSL-2.0", + "AAL", + "FDK-AAC", + "W3C-20150513", + "AFL-1.1", + "W3C", + "Sleepycat", + "CECILL-1.1", + "mpich2", + "SISSL", + "NLOD-1.0", + "ANTLR-PD", + "GPL-3.0-only", + "gnuplot", + "NLOD-2.0", + "BSD-3-Clause-Open-MPI", + "LiLiQ-P-1.1", + "BSD-3-Clause-Clear", + "FSFUL", + "CC-BY-NC-SA-2.0-UK", + "CERN-OHL-S-2.0", + "Spencer-94", + "CERN-OHL-1.2", + "GFDL-1.1-or-later", + "AGPL-1.0-or-later", + "Wsuipa", + "AML", + "BSD-2-Clause", + "DSDP", + "CC-BY-2.5", + "MIT-CMU", + "Beerware", + "Sendmail", + "TU-Berlin-1.0", + "CNRI-Jython", + "mplus", + "CPOL-1.02", + "BSD-3-Clause-No-Nuclear-License-2014", + "ISC", + "CC-BY-SA-4.0", + "Eurosym", + "LGPL-3.0-only", + "OLDAP-1.3", + "GFDL-1.1-invariants-or-later", + "Glulxe", + "SimPL-2.0", + "CDLA-Permissive-2.0", + "GPL-2.0-with-font-exception", + "OGL-UK-2.0", + "CC-BY-SA-3.0-DE", + "CC-BY-ND-1.0", + "GFDL-1.1", + "CC-BY-4.0", + "OpenSSL", + "TU-Berlin-2.0", + "DOC", + "GFDL-1.2-no-invariants-or-later", + "QPL-1.0", + "OLDAP-2.8", + "OML", + "OLDAP-2.7", + "NIST-PD", + "Bitstream-Vera", + "GFDL-1.2-or-later", + "OFL-1.1-RFN", + "Bahyph", + "Barr", + "COIL-1.0", + "GFDL-1.3", + "CECILL-B", + "JPNIC", + "Zed", + "ICU", + "CC-BY-NC-SA-2.5", + "CC-BY-ND-3.0-DE", + "bzip2-1.0.5", + "SPL-1.0", + "YPL-1.0", + "OSET-PL-2.1", + "Noweb", + "RPSL-1.0", + "BSD-3-Clause-LBNL", + "CDLA-Sharing-1.0", + "CECILL-1.0", + "AMPAS", + "APAFML", + "CC-BY-ND-3.0", + "D-FSL-1.0", + "CC-BY-NC-3.0", + "libpng-2.0", + "PolyForm-Noncommercial-1.0.0", + "dvipdfm", + "GFDL-1.3-or-later", + "OGTSL", + "NPL-1.1", + "GPL-3.0", + "CERN-OHL-P-2.0", + "BlueOak-1.0.0", + "AGPL-3.0-or-later", + "blessing", + "ImageMagick", + "APSL-2.0", + "MIT-advertising", + "curl", + "CC0-1.0", + "Zimbra-1.4", + "SSPL-1.0", + "psutils", + "CC-BY-SA-2.0-UK", + "PSF-2.0", + "Net-SNMP", + "NAIST-2003", + "GFDL-1.2-invariants-or-later", + "SGI-B-1.0", + "NBPL-1.0", + "GFDL-1.2-invariants-only", + "W3C-19980720", + "OFL-1.0-no-RFN", + "NetCDF", + "TMate", + "NOSL", + "CNRI-Python-GPL-Compatible", + "BSD-1-Clause", + "CC-BY-NC-SA-3.0-DE", + "BSD-3-Clause-Modification", + "GLWTPL", + "GFDL-1.3-only", + "OLDAP-2.2", + "CC-BY-ND-4.0", + "CC-BY-NC-ND-3.0-DE", + "EUPL-1.0", + "Linux-OpenIB", + "LGPL-2.0-or-later", + "OSL-1.1", + "Spencer-86", + "LGPL-2.0", + "CC-PDDC", + "CC-BY-NC-ND-3.0", + "CDL-1.0", + "Elastic-2.0", + "CC-BY-2.0", + "BSD-3-Clause-No-Military-License", + "IJG", + "LPPL-1.3a", + "SAX-PD", + "BitTorrent-1.0", + "OLDAP-2.0", + "Giftware", + "C-UDA-1.0", + "LGPL-2.0+", + "Rdisc", + "GPL-2.0-with-classpath-exception", + "CC-BY-3.0-US", + "CDDL-1.0", + "Xnet", + "CPL-1.0", + "LGPL-3.0-or-later", + "NASA-1.3", + "BUSL-1.1", + "etalab-2.0", + "MIT-open-group", + "OLDAP-1.4", + "GFDL-1.1-invariants-only", + "RPL-1.1", + "CC-BY-NC-ND-2.5", + "FSFULLR", + "Saxpath", + "NTP-0", + "SISSL-1.2", + "GPL-3.0-or-later", + "Apache-1.1", + "CC-BY-SA-2.1-JP", + "AGPL-3.0-only", + "GPL-2.0-with-autoconf-exception", + "Artistic-2.0", + "App-s2p", + "Unicode-DFS-2015", + "diffmark", + "SNIA", + "CC-BY-SA-2.5", + "Linux-man-pages-copyleft", + "HPND-sell-variant", + "ZPL-2.1", + "BSD-4-Clause-UC", + "LAL-1.2", + "AGPL-1.0-only", + "MIT-enna", + "Condor-1.1", + "Naumen", + "GFDL-1.3-no-invariants-or-later", + "RPL-1.5", + "PolyForm-Small-Business-1.0.0", + "EFL-1.0", + "MirOS", + "CC-BY-2.5-AU", + "Afmparse", + "MPL-2.0-no-copyleft-exception", + "LiLiQ-Rplus-1.1", + "AFL-1.2", + "OSL-1.0", + "GPL-1.0-only", + "APSL-1.0", + "OGL-Canada-2.0", + "CPAL-1.0", + "Latex2e", + "Zend-2.0", + "Unlicense", + "xpp", + "CC-BY-NC-1.0", + "GPL-3.0-with-autoconf-exception", + "CC-BY-NC-SA-3.0", + "TCP-wrappers", + "SCEA", + "SSH-short", + "CC-BY-3.0-NL", + "SchemeReport", + "CC-BY-3.0", + "MPL-2.0", + "Unicode-TOU", + "CC-BY-NC-ND-1.0", + "Entessa", + "BSD-3-Clause-No-Nuclear-License", + "SWL", + "GFDL-1.2-no-invariants-only", + "Parity-7.0.0", + "OLDAP-2.2.1", + "SGI-B-1.1", + "FTL", + "OLDAP-2.4", + "CC-BY-NC-4.0", + "bzip2-1.0.6", + "copyleft-next-0.3.0", + "MakeIndex", + "NRL", + "GFDL-1.3-invariants-or-later", + "CC-BY-NC-2.0", + "SugarCRM-1.1.3", + "AFL-2.1", + "GPL-2.0-only", + "GFDL-1.3-invariants-only", + "TORQUE-1.1", + "Ruby", + "X11", + "Borceux", + "Libpng", + "X11-distribute-modifications-variant", + "Frameworx-1.0", + "NCGL-UK-2.0", + "CECILL-2.1", + "CC-BY-3.0-AT", + "CNRI-Python", + "NCSA", + "gSOAP-1.3b", + "EUPL-1.1", + "AMDPLPA", + "Imlib2", + "CDDL-1.1", + "WTFPL", + "LPL-1.0", + "EPL-1.0", + "BSD-3-Clause-Attribution", + "OSL-3.0", + "RHeCos-1.1", + "PHP-3.0", + "BSD-Protection", + "CC-BY-NC-3.0-DE", + "APL-1.0", + "EUDatagrid", + "GPL-1.0", + "SHL-0.5", + "CC-BY-SA-2.0", + "CC-BY-SA-3.0-AT", + "CC-BY-NC-SA-3.0-IGO", + "Adobe-2006", + "Newsletr", + "Nunit", + "Multics", + "OGL-UK-1.0", + "Vim", + "eCos-2.0", + "Zimbra-1.3", + "eGenix", + "IBM-pibs", + "BitTorrent-1.1", + "OFL-1.1-no-RFN", + "psfrag", + "CC-BY-ND-2.0", + "SHL-0.51", + "FreeBSD-DOC", + "Python-2.0", + "Mup", + "BSD-4-Clause-Shortened", + "CC-BY-NC-SA-4.0", + "HPND", + "OLDAP-2.6", + "MPL-1.1", + "GPL-2.0-with-GCC-exception", + "HaskellReport", + "ECL-1.0", + "LGPL-2.1-or-later", + "OFL-1.0", + "APSL-1.1", + "MITNFA", + "CECILL-2.0", + "Crossword", + "Aladdin", + "Baekmuk", + "XFree86-1.1", + "GPL-1.0-or-later", + "CERN-OHL-W-2.0", + "CC-BY-SA-1.0", + "NTP", + "PHP-3.01", + "OCLC-2.0", + "CC-BY-3.0-DE", + "CC-BY-NC-2.5", + "Zlib", + "CATOSL-1.1", + "LGPL-3.0+", + "CAL-1.0", + "NPL-1.0", + "SMLNJ", + "GPL-2.0+", + "OLDAP-2.5", + "JasPer-2.0", + "GPL-2.0-or-later", + "BSD-2-Clause-Patent", + "MS-RL", + "CUA-OPL-1.0", + "IPA", + "NLPL", + "O-UDA-1.0", + "MIT-Modern-Variant", + "OLDAP-1.2", + "BSD-2-Clause-FreeBSD", + "Info-ZIP", + "CC-BY-NC-SA-2.0-FR", + "0BSD", + "Unicode-DFS-2016", + "OFL-1.0-RFN", + "Intel", + "AFL-2.0", + "GL2PS", + "TAPR-OHL-1.0", + "Apache-1.0", + "MTLL", + "Motosoto", + "RSA-MD", + "Community-Spec-1.0", + "ODC-By-1.0", + "zlib-acknowledgement", + "DL-DE-BY-2.0", + "VSL-1.0", + "LiLiQ-R-1.1", + "OPL-1.0", + "GPL-3.0+", + "MulanPSL-2.0", + "APSL-1.2", + "OGDL-Taiwan-1.0", + "RSCPL", + "OGC-1.0", + "EFL-2.0", + "CAL-1.0-Combined-Work-Exception", + "MS-PL", + "Plexus", + "Sendmail-8.23", + "Cube", + "JSON", + "EUPL-1.2", + "Adobe-Glyph", + "FreeImage", + "Watcom-1.0", + "Jam", + "Hippocratic-2.1", + "OLDAP-2.0.1", + "CC-BY-NC-SA-2.0", + "Nokia", + "OCCT-PL", + "ErlPL-1.1", + "TOSL", + "OSL-2.1", + "ClArtistic", + "xinetd", + "GPL-3.0-with-GCC-exception", + "ODbL-1.0", + "MIT", + "LGPL-2.1+", + "LGPL-2.1-only", + "CrystalStacker", + "ECL-2.0", + "LPPL-1.0", + "iMatix", + "CC-BY-NC-ND-3.0-IGO", + "BSD-Source-Code", + "Parity-6.0.0", + "TCL", + "Arphic-1999", + "CC-BY-SA-3.0", + "Caldera", + "AGPL-1.0", + "IPL-1.0", + "LAL-1.3", + "EPICS", + "NGPL", + "DRL-1.0", + "BSD-2-Clause-NetBSD", + "ZPL-1.1", + "GD", + "LPPL-1.2", + "Dotseqn", + "Spencer-99", + "OLDAP-2.3", + "YPL-1.1", + "Fair", + "Qhull", + "GFDL-1.1-no-invariants-or-later", + "CECILL-C", + "MulanPSL-1.0", + "OLDAP-1.1", + "OLDAP-2.1", + "LPL-1.02", + "UPL-1.0", + "Abstyles", + "ZPL-2.0", + "MIT-0", + "LGPL-2.0-only", + "GFDL-1.3-no-invariants-only", + "AGPL-3.0", + "EPL-2.0", + "AFL-3.0", + "CDLA-Permissive-1.0", + "Artistic-1.0", + "CC-BY-NC-ND-4.0", + "HTMLTIDY", + "Glide", + "FSFAP", + "LGPLLR", + "OGL-UK-3.0", + "GFDL-1.2", + "SSH-OpenSSH", + "GFDL-1.1-only", + "MIT-feh", + "MPL-1.0", + "PostgreSQL", + "OLDAP-2.2.2", + "SMPPL", + "OFL-1.1", + "Leptonica", + "CERN-OHL-1.1", + "BSD-3-Clause-No-Nuclear-Warranty", + "CC-BY-ND-2.5", + "CC-BY-1.0", + "GFDL-1.2-only", + "OPUBL-1.0", + "libselinux-1.0", + "BSD-3-Clause", + "ANTLR-PD-fallback", + "copyleft-next-0.3.1", + "GPL-1.0+", + "wxWindows", + "LGPL-3.0", + "LGPL-2.1", + "StandardML-NJ", + "BSD-4-Clause", + "GPL-2.0-with-bison-exception", + "Apache-2.0", + "Artistic-1.0-cl8", + "GPL-2.0", + "Intel-ACPI", + "BSL-1.0", + "Artistic-1.0-Perl", + "BSD-2-Clause-Views", + "Interbase-1.0", + "NPOSL-3.0", + "FLTK-exception", + "Bootloader-exception", + "WxWindows-exception-3.1", + "Linux-syscall-note", + "Qt-LGPL-exception-1.1", + "LLVM-exception", + "PS-or-PDF-font-exception-20170817", + "GCC-exception-3.1", + "Autoconf-exception-3.0", + "LGPL-3.0-linking-exception", + "GCC-exception-2.0", + "Bison-exception-2.2", + "openvpn-openssl-exception", + "Libtool-exception", + "Autoconf-exception-2.0", + "GPL-3.0-linking-source-exception", + "GPL-CC-1.0", + "OCaml-LGPL-linking-exception", + "Universal-FOSS-exception-1.0", + "i2p-gpl-java-exception", + "CLISP-exception-2.0", + "OCCT-exception-1.0", + "Qwt-exception-1.0", + "gnu-javamail-exception", + "u-boot-exception-2.0", + "freertos-exception-2.0", + "Qt-GPL-exception-1.0", + "OpenJDK-assembly-exception-1.0", + "SHL-2.1", + "mif-exception", + "Fawkes-Runtime-exception", + "Swift-exception", + "GPL-3.0-linking-exception", + "SHL-2.0", + "Classpath-exception-2.0", + "LZMA-exception", + "Font-exception-2.0", + "Nokia-Qt-exception-1.1", + "DigiRule-FOSS-exception", + "eCos-exception-2.0", + "389-exception" + ] }, "name": { "type": "string", "title": "License Name", "description": "If SPDX does not define the license used, this field may be used to provide the license name", - "examples": ["Acme Software License"] + "examples": [ + "Acme Software License" + ] }, "text": { "title": "License text", @@ -631,7 +1253,9 @@ "type": "string", "title": "License URL", "description": "The URL to the license file. If specified, a 'license' externalReference should also be specified for completeness", - "examples": ["https://www.apache.org/licenses/LICENSE-2.0.txt"], + "examples": [ + "https://www.apache.org/licenses/LICENSE-2.0.txt" + ], "format": "iri-reference" } } @@ -653,12 +1277,16 @@ ] } }, - "oneOf":[ + "oneOf": [ { - "required": ["license"] + "required": [ + "license" + ] }, { - "required": ["expression"] + "required": [ + "expression" + ] } ] }, @@ -724,7 +1352,9 @@ "resolves": { "type": "array", "additionalItems": false, - "items": {"$ref": "#/definitions/issue"}, + "items": { + "$ref": "#/definitions/issue" + }, "title": "Resolves", "description": "A collection of issues the patch resolves" } @@ -810,7 +1440,9 @@ }, "title": "References", "description": "A collection of URL's for reference. Multiple URLs are allowed.", - "examples": ["https://example.com"] + "examples": [ + "https://example.com" + ] } } }, @@ -886,7 +1518,9 @@ "hashes": { "type": "array", "additionalItems": false, - "items": {"$ref": "#/definitions/hash"}, + "items": { + "$ref": "#/definitions/hash" + }, "title": "Hashes", "description": "The hashes of the external reference (if applicable)." } @@ -940,19 +1574,25 @@ "type": "string", "title": "Service Group", "description": "The grouping name, namespace, or identifier. This will often be a shortened, single name of the company or project that produced the service or domain name. Whitespace and special characters should be avoided.", - "examples": ["com.acme"] + "examples": [ + "com.acme" + ] }, "name": { "type": "string", "title": "Service Name", "description": "The name of the service. This will often be a shortened, single name of the service.", - "examples": ["ticker-service"] + "examples": [ + "ticker-service" + ] }, "version": { "type": "string", "title": "Service Version", "description": "The service version.", - "examples": ["1.0.0"] + "examples": [ + "1.0.0" + ] }, "description": { "type": "string", @@ -967,7 +1607,9 @@ }, "title": "Endpoints", "description": "The endpoint URIs of the service. Multiple endpoints are allowed.", - "examples": ["https://example.com/api/v1/ticker"] + "examples": [ + "https://example.com/api/v1/ticker" + ] }, "authenticated": { "type": "boolean", @@ -982,27 +1624,35 @@ "data": { "type": "array", "additionalItems": false, - "items": {"$ref": "#/definitions/dataClassification"}, + "items": { + "$ref": "#/definitions/dataClassification" + }, "title": "Data Classification", "description": "Specifies the data classification." }, "licenses": { "type": "array", "additionalItems": false, - "items": {"$ref": "#/definitions/licenseChoice"}, + "items": { + "$ref": "#/definitions/licenseChoice" + }, "title": "Component License(s)" }, "externalReferences": { "type": "array", "additionalItems": false, - "items": {"$ref": "#/definitions/externalReference"}, + "items": { + "$ref": "#/definitions/externalReference" + }, "title": "External References", "description": "External references provide a way to document systems, sites, and information that may be relevant but which are not included with the BOM." }, "services": { "type": "array", "additionalItems": false, - "items": {"$ref": "#/definitions/service"}, + "items": { + "$ref": "#/definitions/service" + }, "uniqueItems": true, "title": "Services", "description": "A list of services included or deployed behind the parent service. This is not a dependency tree. It provides a way to specify a hierarchical representation of service assemblies." @@ -1017,7 +1667,9 @@ "title": "Properties", "description": "Provides the ability to document properties in a name-value store. This provides flexibility to include data not officially supported in the standard without having to use additional namespaces or create extensions. Unlike key-value stores, properties support duplicate names, each potentially having different values. Property names of interest to the general public are encouraged to be registered in the [CycloneDX Property Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy). Formal registration is OPTIONAL.", "additionalItems": false, - "items": {"$ref": "#/definitions/property"} + "items": { + "$ref": "#/definitions/property" + } }, "signature": { "$ref": "#/definitions/signature", @@ -1058,7 +1710,6 @@ "title": "Data flow direction", "description": "Specifies the flow direction of the data. Direction is relative to the service. Inbound flow states that data enters the service. Outbound flow states that data leaves the service. Bi-directional states that data flows both ways, and unknown states that the direction is not known." }, - "copyright": { "type": "object", "title": "Copyright", @@ -1073,7 +1724,6 @@ } } }, - "componentEvidence": { "type": "object", "title": "Evidence", @@ -1083,13 +1733,17 @@ "licenses": { "type": "array", "additionalItems": false, - "items": {"$ref": "#/definitions/licenseChoice"}, + "items": { + "$ref": "#/definitions/licenseChoice" + }, "title": "Component License(s)" }, "copyright": { "type": "array", "additionalItems": false, - "items": {"$ref": "#/definitions/copyright"}, + "items": { + "$ref": "#/definitions/copyright" + }, "title": "Copyright" } } @@ -1258,14 +1912,18 @@ "resolves": { "type": "array", "additionalItems": false, - "items": {"$ref": "#/definitions/issue"}, + "items": { + "$ref": "#/definitions/issue" + }, "title": "Resolves", "description": "A collection of issues that have been resolved." }, "notes": { "type": "array", "additionalItems": false, - "items": {"$ref": "#/definitions/note"}, + "items": { + "$ref": "#/definitions/note" + }, "title": "Notes", "description": "Zero or more release notes containing the locale and content. Multiple note objects may be specified to support release notes in a wide variety of languages." }, @@ -1274,7 +1932,9 @@ "title": "Properties", "description": "Provides the ability to document properties in a name-value store. This provides flexibility to include data not officially supported in the standard without having to use additional namespaces or create extensions. Unlike key-value stores, properties support duplicate names, each potentially having different values. Property names of interest to the general public are encouraged to be registered in the [CycloneDX Property Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy). Formal registration is OPTIONAL.", "additionalItems": false, - "items": {"$ref": "#/definitions/property"} + "items": { + "$ref": "#/definitions/property" + } } } }, @@ -1282,7 +1942,9 @@ "type": "object", "title": "Advisory", "description": "Title and location where advisory information can be obtained. An advisory is a notification of a threat to a component, service, or system.", - "required": ["url"], + "required": [ + "url" + ], "additionalProperties": false, "properties": { "title": { @@ -1488,7 +2150,9 @@ "type": "array", "title": "CWEs", "description": "List of Common Weaknesses Enumerations (CWEs) codes that describes this vulnerability. For example 399 (of https://cwe.mitre.org/data/definitions/399.html)", - "examples": [399], + "examples": [ + 399 + ], "additionalItems": false, "items": { "$ref": "#/definitions/cwe" @@ -1567,7 +2231,9 @@ "title": "Creation Tools", "description": "The tool(s) used to identify, confirm, or score the vulnerability.", "additionalItems": false, - "items": {"$ref": "#/definitions/tool"} + "items": { + "$ref": "#/definitions/tool" + } }, "analysis": { "type": "object", @@ -1627,10 +2293,14 @@ "items": { "oneOf": [ { - "required": ["version"] + "required": [ + "version" + ] }, { - "required": ["range"] + "required": [ + "range" + ] } ], "additionalProperties": false, @@ -1689,9 +2359,256 @@ "maxLength": 1024 }, "signature": { - "$ref": "jsf-0.82.schema.json#/definitions/signature", "title": "Signature", - "description": "Enveloped signature in [JSON Signature Format (JSF)](https://cyberphone.github.io/doc/security/jsf.html)." + "description": "Enveloped signature in [JSON Signature Format (JSF)](https://cyberphone.github.io/doc/security/jsf.html).", + "type": "object", + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "signers": { + "type": "array", + "title": "Signature", + "description": "Unique top level property for Multiple Signatures. (multisignature)", + "additionalItems": false, + "items": { + "$ref": "#/definitions/signer" + } + } + } + }, + { + "additionalProperties": false, + "properties": { + "chain": { + "type": "array", + "title": "Signature", + "description": "Unique top level property for Signature Chains. (signaturechain)", + "additionalItems": false, + "items": { + "$ref": "#/definitions/signer" + } + } + } + }, + { + "title": "Signature", + "description": "Unique top level property for simple signatures. (signaturecore)", + "$ref": "#/definitions/signer" + } + ] + }, + "signer": { + "type": "object", + "title": "Signature", + "required": [ + "algorithm", + "value" + ], + "additionalProperties": false, + "properties": { + "algorithm": { + "oneOf": [ + { + "type": "string", + "title": "Algorithm", + "description": "Signature algorithm. The currently recognized JWA [RFC7518] and RFC8037 [RFC8037] asymmetric key algorithms. Note: Unlike RFC8037 [RFC8037] JSF requires explicit Ed* algorithm names instead of \"EdDSA\".", + "enum": [ + "RS256", + "RS384", + "RS512", + "PS256", + "PS384", + "PS512", + "ES256", + "ES384", + "ES512", + "Ed25519", + "Ed448", + "HS256", + "HS384", + "HS512" + ] + }, + { + "type": "string", + "title": "Algorithm", + "description": "Signature algorithm. Note: If proprietary signature algorithms are added, they must be expressed as URIs.", + "format": "uri" + } + ] + }, + "keyId": { + "type": "string", + "title": "Key ID", + "description": "Optional. Application specific string identifying the signature key." + }, + "publicKey": { + "title": "Public key", + "description": "Optional. Public key object.", + "$ref": "#/definitions/publicKey" + }, + "certificatePath": { + "type": "array", + "title": "Certificate path", + "description": "Optional. Sorted array of X.509 [RFC5280] certificates, where the first element must contain the signature certificate. The certificate path must be contiguous but is not required to be complete.", + "additionalItems": false, + "items": { + "type": "string" + } + }, + "excludes": { + "type": "array", + "title": "Excludes", + "description": "Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the \"excludes\" property itself, must also be excluded from the signature process. Since both the \"excludes\" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.", + "additionalItems": false, + "items": { + "type": "string" + } + }, + "value": { + "type": "string", + "title": "Signature", + "description": "The signature data. Note that the binary representation must follow the JWA [RFC7518] specifications." + } + } + }, + "keyType": { + "type": "string", + "title": "Key type", + "description": "Key type indicator.", + "enum": [ + "EC", + "OKP", + "RSA" + ] + }, + "publicKey": { + "title": "Public key", + "description": "Optional. Public key object.", + "type": "object", + "required": [ + "kty" + ], + "additionalProperties": true, + "properties": { + "kty": { + "$ref": "#/definitions/keyType" + } + }, + "allOf": [ + { + "if": { + "properties": { + "kty": { + "const": "EC" + } + } + }, + "then": { + "required": [ + "kty", + "crv", + "x", + "y" + ], + "additionalProperties": false, + "properties": { + "kty": { + "$ref": "#/definitions/keyType" + }, + "crv": { + "type": "string", + "title": "Curve name", + "description": "EC curve name.", + "enum": [ + "P-256", + "P-384", + "P-521" + ] + }, + "x": { + "type": "string", + "title": "Coordinate", + "description": "EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the \"crv\" parameter. For example, if the value of \"crv\" is \"P-521\", the decoded argument must be 66 bytes." + }, + "y": { + "type": "string", + "title": "Coordinate", + "description": "EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the \"crv\" parameter. For example, if the value of \"crv\" is \"P-256\", the decoded argument must be 32 bytes." + } + } + } + }, + { + "if": { + "properties": { + "kty": { + "const": "OKP" + } + } + }, + "then": { + "required": [ + "kty", + "crv", + "x" + ], + "additionalProperties": false, + "properties": { + "kty": { + "$ref": "#/definitions/keyType" + }, + "crv": { + "type": "string", + "title": "Curve name", + "description": "EdDSA curve name.", + "enum": [ + "Ed25519", + "Ed448" + ] + }, + "x": { + "type": "string", + "title": "Coordinate", + "description": "EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the \"crv\" parameter. For example, if the value of \"crv\" is \"Ed25519\", the decoded argument must be 32 bytes." + } + } + } + }, + { + "if": { + "properties": { + "kty": { + "const": "RSA" + } + } + }, + "then": { + "required": [ + "kty", + "n", + "e" + ], + "additionalProperties": false, + "properties": { + "kty": { + "$ref": "#/definitions/keyType" + }, + "n": { + "type": "string", + "title": "Modulus", + "description": "RSA modulus." + }, + "e": { + "type": "string", + "title": "Exponent", + "description": "RSA exponent." + } + } + } + } + ] } } -} +}
\ No newline at end of file diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md index a3e9b17cad7..19697a1f03b 100644 --- a/doc/api/graphql/reference/index.md +++ b/doc/api/graphql/reference/index.md @@ -5727,11 +5727,12 @@ Input type: `UpdateRequirementInput` | ---- | ---- | ----------- | | <a id="mutationupdaterequirementclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. | | <a id="mutationupdaterequirementdescription"></a>`description` | [`String`](#string) | Description of the requirement. | -| <a id="mutationupdaterequirementiid"></a>`iid` | [`String!`](#string) | IID of the requirement to update. | +| <a id="mutationupdaterequirementiid"></a>`iid` | [`String`](#string) | IID of the requirement to update. | | <a id="mutationupdaterequirementlasttestreportstate"></a>`lastTestReportState` | [`TestReportState`](#testreportstate) | Creates a test report for the requirement with the given state. | | <a id="mutationupdaterequirementprojectpath"></a>`projectPath` | [`ID!`](#id) | Full project path the requirement is associated with. | | <a id="mutationupdaterequirementstate"></a>`state` | [`RequirementState`](#requirementstate) | State of the requirement. | | <a id="mutationupdaterequirementtitle"></a>`title` | [`String`](#string) | Title of the requirement. | +| <a id="mutationupdaterequirementworkitemiid"></a>`workItemIid` | [`String`](#string) | IID of the requirement work item to update. | #### Fields diff --git a/qa/qa/fixtures/mocks/import/github.yml b/qa/qa/fixtures/mocks/import/github.yml new file mode 100644 index 00000000000..9cabdee1025 --- /dev/null +++ b/qa/qa/fixtures/mocks/import/github.yml @@ -0,0 +1,2743 @@ +# Proxy mock definition, useful for recording all interaction with github +# +# - request: +# method: "GET" +# headers: +# Host: "api.github.com" +# proxy: +# host: "https://api.github.com" +# follow_redirect: true +# keep_host: true + +- request: + path: /rate_limit + method: GET + headers: + Host: api.github.com + response: + status: 200 + headers: + Content-Type: application/json; charset=utf-8 + X-Ratelimit-Limit: '5000' + X-Ratelimit-Remaining: '5000' + body: | + { + "rate": { + "limit": 5000, + "remaining": 5000, + "reset": 1988388445, + "used": 0 + }, + "resources": { + "actions_runner_registration": { + "limit": 10000, + "remaining": 10000, + "reset": 1988388445, + "used": 0 + }, + "code_scanning_upload": { + "limit": 1000, + "remaining": 1000, + "reset": 1988388445, + "used": 0 + }, + "core": { + "limit": 5000, + "remaining": 5000, + "reset": 1988388445, + "used": 0 + }, + "dependency_snapshots": { + "limit": 100, + "remaining": 100, + "reset": 1988388445, + "used": 0 + }, + "graphql": { + "limit": 5000, + "remaining": 5000, + "reset": 1988388445, + "used": 0 + }, + "integration_manifest": { + "limit": 5000, + "remaining": 5000, + "reset": 1988388445, + "used": 0 + }, + "scim": { + "limit": 15000, + "remaining": 15000, + "reset": 1988388445, + "used": 0 + }, + "search": { + "limit": 30, + "remaining": 30, + "reset": 1988388445, + "used": 0 + }, + "source_import": { + "limit": 100, + "remaining": 100, + "reset": 1988388445, + "used": 0 + } + } + } + +- request: + path: /user/repos + method: GET + headers: + Host: api.github.com + response: + status: 200 + headers: + Content-Type: application/json; charset=utf-8 + X-Ratelimit-Limit: '5000' + X-Ratelimit-Remaining: '5000' + body: | + [ + { + "allow_forking": true, + "archive_url": "https://api.github.com/repos/gitlab-qa-github/import-test/{archive_format}{/ref}", + "archived": false, + "assignees_url": "https://api.github.com/repos/gitlab-qa-github/import-test/assignees{/user}", + "blobs_url": "https://api.github.com/repos/gitlab-qa-github/import-test/git/blobs{/sha}", + "branches_url": "https://api.github.com/repos/gitlab-qa-github/import-test/branches{/branch}", + "clone_url": "https://github.com/gitlab-qa-github/import-test.git", + "collaborators_url": "https://api.github.com/repos/gitlab-qa-github/import-test/collaborators{/collaborator}", + "comments_url": "https://api.github.com/repos/gitlab-qa-github/import-test/comments{/number}", + "commits_url": "https://api.github.com/repos/gitlab-qa-github/import-test/commits{/sha}", + "compare_url": "https://api.github.com/repos/gitlab-qa-github/import-test/compare/{base}...{head}", + "contents_url": "https://api.github.com/repos/gitlab-qa-github/import-test/contents/{+path}", + "contributors_url": "https://api.github.com/repos/gitlab-qa-github/import-test/contributors", + "created_at": "2022-03-07T07:53:43Z", + "default_branch": "main", + "deployments_url": "https://api.github.com/repos/gitlab-qa-github/import-test/deployments", + "description": "Project for github import test", + "disabled": false, + "downloads_url": "https://api.github.com/repos/gitlab-qa-github/import-test/downloads", + "events_url": "https://api.github.com/repos/gitlab-qa-github/import-test/events", + "fork": false, + "forks": 0, + "forks_count": 0, + "forks_url": "https://api.github.com/repos/gitlab-qa-github/import-test/forks", + "full_name": "gitlab-qa-github/import-test", + "git_commits_url": "https://api.github.com/repos/gitlab-qa-github/import-test/git/commits{/sha}", + "git_refs_url": "https://api.github.com/repos/gitlab-qa-github/import-test/git/refs{/sha}", + "git_tags_url": "https://api.github.com/repos/gitlab-qa-github/import-test/git/tags{/sha}", + "git_url": "git://github.com/gitlab-qa-github/import-test.git", + "has_discussions": false, + "has_downloads": true, + "has_issues": true, + "has_pages": false, + "has_projects": true, + "has_wiki": true, + "homepage": null, + "hooks_url": "https://api.github.com/repos/gitlab-qa-github/import-test/hooks", + "html_url": "https://github.com/gitlab-qa-github/import-test", + "id": 466994992, + "is_template": false, + "issue_comment_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/comments{/number}", + "issue_events_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/events{/number}", + "issues_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues{/number}", + "keys_url": "https://api.github.com/repos/gitlab-qa-github/import-test/keys{/key_id}", + "labels_url": "https://api.github.com/repos/gitlab-qa-github/import-test/labels{/name}", + "language": null, + "languages_url": "https://api.github.com/repos/gitlab-qa-github/import-test/languages", + "license": { + "key": "mit", + "name": "MIT License", + "node_id": "MDc6TGljZW5zZTEz", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit" + }, + "merges_url": "https://api.github.com/repos/gitlab-qa-github/import-test/merges", + "milestones_url": "https://api.github.com/repos/gitlab-qa-github/import-test/milestones{/number}", + "mirror_url": null, + "name": "import-test", + "node_id": "R_kgDOG9XHMA", + "notifications_url": "https://api.github.com/repos/gitlab-qa-github/import-test/notifications{?since,all,participating}", + "open_issues": 2, + "open_issues_count": 2, + "owner": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "permissions": { + "admin": true, + "maintain": true, + "pull": true, + "push": true, + "triage": true + }, + "private": false, + "pulls_url": "https://api.github.com/repos/gitlab-qa-github/import-test/pulls{/number}", + "pushed_at": "2022-10-24T08:06:37Z", + "releases_url": "https://api.github.com/repos/gitlab-qa-github/import-test/releases{/id}", + "size": 4, + "ssh_url": "git@github.com:gitlab-qa-github/import-test.git", + "stargazers_count": 0, + "stargazers_url": "https://api.github.com/repos/gitlab-qa-github/import-test/stargazers", + "statuses_url": "https://api.github.com/repos/gitlab-qa-github/import-test/statuses/{sha}", + "subscribers_url": "https://api.github.com/repos/gitlab-qa-github/import-test/subscribers", + "subscription_url": "https://api.github.com/repos/gitlab-qa-github/import-test/subscription", + "svn_url": "https://github.com/gitlab-qa-github/import-test", + "tags_url": "https://api.github.com/repos/gitlab-qa-github/import-test/tags", + "teams_url": "https://api.github.com/repos/gitlab-qa-github/import-test/teams", + "topics": [], + "trees_url": "https://api.github.com/repos/gitlab-qa-github/import-test/git/trees{/sha}", + "updated_at": "2022-07-07T10:11:28Z", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test", + "visibility": "public", + "watchers": 0, + "watchers_count": 0, + "web_commit_signoff_required": false + } + ] + +- request: + path: + matcher: ShouldMatch + value: (\/repositories\/466994992$|\/repos\/gitlab-qa-github\/import-test$) + method: GET + headers: + Host: api.github.com + response: + status: 200 + headers: + Content-Type: application/json; charset=utf-8 + X-Ratelimit-Limit: '5000' + X-Ratelimit-Remaining: '5000' + body: | + { + "allow_forking": true, + "archive_url": "https://api.github.com/repos/gitlab-qa-github/import-test/{archive_format}{/ref}", + "archived": false, + "assignees_url": "https://api.github.com/repos/gitlab-qa-github/import-test/assignees{/user}", + "blobs_url": "https://api.github.com/repos/gitlab-qa-github/import-test/git/blobs{/sha}", + "branches_url": "https://api.github.com/repos/gitlab-qa-github/import-test/branches{/branch}", + "clone_url": "https://github.com/gitlab-qa-github/import-test.git", + "collaborators_url": "https://api.github.com/repos/gitlab-qa-github/import-test/collaborators{/collaborator}", + "comments_url": "https://api.github.com/repos/gitlab-qa-github/import-test/comments{/number}", + "commits_url": "https://api.github.com/repos/gitlab-qa-github/import-test/commits{/sha}", + "compare_url": "https://api.github.com/repos/gitlab-qa-github/import-test/compare/{base}...{head}", + "contents_url": "https://api.github.com/repos/gitlab-qa-github/import-test/contents/{+path}", + "contributors_url": "https://api.github.com/repos/gitlab-qa-github/import-test/contributors", + "created_at": "2022-03-07T07:53:43Z", + "default_branch": "main", + "deployments_url": "https://api.github.com/repos/gitlab-qa-github/import-test/deployments", + "description": "Project for github import test", + "disabled": false, + "downloads_url": "https://api.github.com/repos/gitlab-qa-github/import-test/downloads", + "events_url": "https://api.github.com/repos/gitlab-qa-github/import-test/events", + "fork": false, + "forks": 0, + "forks_count": 0, + "forks_url": "https://api.github.com/repos/gitlab-qa-github/import-test/forks", + "full_name": "gitlab-qa-github/import-test", + "git_commits_url": "https://api.github.com/repos/gitlab-qa-github/import-test/git/commits{/sha}", + "git_refs_url": "https://api.github.com/repos/gitlab-qa-github/import-test/git/refs{/sha}", + "git_tags_url": "https://api.github.com/repos/gitlab-qa-github/import-test/git/tags{/sha}", + "git_url": "git://github.com/gitlab-qa-github/import-test.git", + "has_discussions": false, + "has_downloads": true, + "has_issues": true, + "has_pages": false, + "has_projects": true, + "has_wiki": true, + "homepage": null, + "hooks_url": "https://api.github.com/repos/gitlab-qa-github/import-test/hooks", + "html_url": "https://github.com/gitlab-qa-github/import-test", + "id": 466994992, + "is_template": false, + "issue_comment_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/comments{/number}", + "issue_events_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/events{/number}", + "issues_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues{/number}", + "keys_url": "https://api.github.com/repos/gitlab-qa-github/import-test/keys{/key_id}", + "labels_url": "https://api.github.com/repos/gitlab-qa-github/import-test/labels{/name}", + "language": null, + "languages_url": "https://api.github.com/repos/gitlab-qa-github/import-test/languages", + "license": { + "key": "mit", + "name": "MIT License", + "node_id": "MDc6TGljZW5zZTEz", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit" + }, + "merges_url": "https://api.github.com/repos/gitlab-qa-github/import-test/merges", + "milestones_url": "https://api.github.com/repos/gitlab-qa-github/import-test/milestones{/number}", + "mirror_url": null, + "name": "import-test", + "network_count": 0, + "node_id": "R_kgDOG9XHMA", + "notifications_url": "https://api.github.com/repos/gitlab-qa-github/import-test/notifications{?since,all,participating}", + "open_issues": 2, + "open_issues_count": 2, + "owner": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "permissions": { + "admin": false, + "maintain": false, + "pull": true, + "push": false, + "triage": false + }, + "private": false, + "pulls_url": "https://api.github.com/repos/gitlab-qa-github/import-test/pulls{/number}", + "pushed_at": "2022-10-24T08:06:37Z", + "releases_url": "https://api.github.com/repos/gitlab-qa-github/import-test/releases{/id}", + "size": 4, + "ssh_url": "git@github.com:gitlab-qa-github/import-test.git", + "stargazers_count": 0, + "stargazers_url": "https://api.github.com/repos/gitlab-qa-github/import-test/stargazers", + "statuses_url": "https://api.github.com/repos/gitlab-qa-github/import-test/statuses/{sha}", + "subscribers_count": 1, + "subscribers_url": "https://api.github.com/repos/gitlab-qa-github/import-test/subscribers", + "subscription_url": "https://api.github.com/repos/gitlab-qa-github/import-test/subscription", + "svn_url": "https://github.com/gitlab-qa-github/import-test", + "tags_url": "https://api.github.com/repos/gitlab-qa-github/import-test/tags", + "teams_url": "https://api.github.com/repos/gitlab-qa-github/import-test/teams", + "temp_clone_token": "", + "topics": [], + "trees_url": "https://api.github.com/repos/gitlab-qa-github/import-test/git/trees{/sha}", + "updated_at": "2022-07-07T10:11:28Z", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test", + "visibility": "public", + "watchers": 0, + "watchers_count": 0, + "web_commit_signoff_required": false + } + +- request: + path: /repos/gitlab-qa-github/import-test/issues + method: GET + headers: + Host: api.github.com + response: + status: 200 + headers: + Content-Type: application/json; charset=utf-8 + X-Ratelimit-Limit: '5000' + X-Ratelimit-Remaining: '5000' + body: | + [ + { + "active_lock_reason": null, + "assignee": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "assignees": [ + { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + } + ], + "author_association": "OWNER", + "body": "Test pull request body", + "closed_at": null, + "comments": 1, + "comments_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/2/comments", + "created_at": "2022-03-07T07:58:10Z", + "draft": false, + "events_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/2/events", + "html_url": "https://github.com/gitlab-qa-github/import-test/pull/2", + "id": 1161030385, + "labels": [ + { + "color": "0075ca", + "default": true, + "description": "Improvements or additions to documentation", + "id": 3902072341, + "name": "documentation", + "node_id": "LA_kwDOG9XHMM7olOYV", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/labels/documentation" + } + ], + "labels_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/2/labels{/name}", + "locked": false, + "milestone": { + "closed_at": null, + "closed_issues": 0, + "created_at": "2022-03-07T07:54:43Z", + "creator": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "description": null, + "due_on": null, + "html_url": "https://github.com/gitlab-qa-github/import-test/milestone/1", + "id": 7741550, + "labels_url": "https://api.github.com/repos/gitlab-qa-github/import-test/milestones/1/labels", + "node_id": "MI_kwDOG9XHMM4AdiBu", + "number": 1, + "open_issues": 2, + "state": "open", + "title": "0.0.1", + "updated_at": "2022-07-07T10:01:32Z", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/milestones/1" + }, + "node_id": "PR_kwDOG9XHMM40Bfnz", + "number": 2, + "performed_via_github_app": null, + "pull_request": { + "diff_url": "https://github.com/gitlab-qa-github/import-test/pull/2.diff", + "html_url": "https://github.com/gitlab-qa-github/import-test/pull/2", + "merged_at": null, + "patch_url": "https://github.com/gitlab-qa-github/import-test/pull/2.patch", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/pulls/2" + }, + "reactions": { + "+1": 0, + "-1": 0, + "confused": 0, + "eyes": 0, + "heart": 0, + "hooray": 0, + "laugh": 0, + "rocket": 0, + "total_count": 0, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/2/reactions" + }, + "repository_url": "https://api.github.com/repos/gitlab-qa-github/import-test", + "state": "open", + "state_reason": null, + "timeline_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/2/timeline", + "title": "Test pull request", + "updated_at": "2022-12-27T09:57:21Z", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/2", + "user": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + } + } + ] + +- request: + path: /repos/gitlab-qa-github/import-test/labels + method: GET + query_params: + per_page: '100' + headers: + Host: api.github.com + response: + status: 200 + headers: + Content-Type: application/json; charset=utf-8 + X-Ratelimit-Limit: '5000' + X-Ratelimit-Remaining: '5000' + body: | + [ + { + "color": "d73a4a", + "default": true, + "description": "Something isn't working", + "id": 3902072340, + "name": "bug", + "node_id": "LA_kwDOG9XHMM7olOYU", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/labels/bug" + }, + { + "color": "0075ca", + "default": true, + "description": "Improvements or additions to documentation", + "id": 3902072341, + "name": "documentation", + "node_id": "LA_kwDOG9XHMM7olOYV", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/labels/documentation" + }, + { + "color": "cfd3d7", + "default": true, + "description": "This issue or pull request already exists", + "id": 3902072342, + "name": "duplicate", + "node_id": "LA_kwDOG9XHMM7olOYW", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/labels/duplicate" + }, + { + "color": "a2eeef", + "default": true, + "description": "New feature or request", + "id": 3902072343, + "name": "enhancement", + "node_id": "LA_kwDOG9XHMM7olOYX", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/labels/enhancement" + }, + { + "color": "7057ff", + "default": true, + "description": "Good for newcomers", + "id": 3902072345, + "name": "good first issue", + "node_id": "LA_kwDOG9XHMM7olOYZ", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/labels/good%20first%20issue" + }, + { + "color": "008672", + "default": true, + "description": "Extra attention is needed", + "id": 3902072344, + "name": "help wanted", + "node_id": "LA_kwDOG9XHMM7olOYY", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/labels/help%20wanted" + }, + { + "color": "e4e669", + "default": true, + "description": "This doesn't seem right", + "id": 3902072346, + "name": "invalid", + "node_id": "LA_kwDOG9XHMM7olOYa", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/labels/invalid" + }, + { + "color": "d876e3", + "default": true, + "description": "Further information is requested", + "id": 3902072347, + "name": "question", + "node_id": "LA_kwDOG9XHMM7olOYb", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/labels/question" + }, + { + "color": "ffffff", + "default": true, + "description": "This will not be worked on", + "id": 3902072348, + "name": "wontfix", + "node_id": "LA_kwDOG9XHMM7olOYc", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/labels/wontfix" + } + ] + +- request: + path: /repos/gitlab-qa-github/import-test/milestones + method: GET + query_params: + per_page: '100' + state: all + headers: + Host: api.github.com + response: + status: 200 + headers: + Content-Type: application/json; charset=utf-8 + X-Ratelimit-Limit: '5000' + X-Ratelimit-Remaining: '5000' + body: | + [ + { + "closed_at": null, + "closed_issues": 0, + "created_at": "2022-03-07T07:54:43Z", + "creator": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "description": null, + "due_on": null, + "html_url": "https://github.com/gitlab-qa-github/import-test/milestone/1", + "id": 7741550, + "labels_url": "https://api.github.com/repos/gitlab-qa-github/import-test/milestones/1/labels", + "node_id": "MI_kwDOG9XHMM4AdiBu", + "number": 1, + "open_issues": 2, + "state": "open", + "title": "0.0.1", + "updated_at": "2022-07-07T10:01:32Z", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/milestones/1" + } + ] + +- request: + path: /repos/gitlab-qa-github/import-test/releases + method: GET + query_params: + per_page: '100' + headers: + Host: api.github.com + response: + status: 200 + headers: + Content-Type: application/json; charset=utf-8 + X-Ratelimit-Limit: '5000' + X-Ratelimit-Remaining: '5000' + body: | + [ + { + "assets": [], + "assets_url": "https://api.github.com/repos/gitlab-qa-github/import-test/releases/61117625/assets", + "author": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "body": "Initial release", + "created_at": "2022-03-07T07:59:22Z", + "draft": false, + "html_url": "https://github.com/gitlab-qa-github/import-test/releases/tag/0.0.1", + "id": 61117625, + "name": "0.0.1", + "node_id": "RE_kwDOG9XHMM4DpJS5", + "prerelease": false, + "published_at": "2022-03-07T08:02:09Z", + "tag_name": "0.0.1", + "tarball_url": "https://api.github.com/repos/gitlab-qa-github/import-test/tarball/0.0.1", + "target_commitish": "main", + "upload_url": "https://uploads.github.com/repos/gitlab-qa-github/import-test/releases/61117625/assets{?name,label}", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/releases/61117625", + "zipball_url": "https://api.github.com/repos/gitlab-qa-github/import-test/zipball/0.0.1" + } + ] + +- request: + path: /repos/gitlab-qa-github/import-test/pulls + method: GET + query_params: + per_page: '100' + sort: created + state: all + headers: + Host: api.github.com + response: + status: 200 + headers: + Content-Type: application/json; charset=utf-8 + X-Ratelimit-Limit: '5000' + X-Ratelimit-Remaining: '5000' + body: | + [ + { + "_links": { + "comments": { + "href": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/2/comments" + }, + "commits": { + "href": "https://api.github.com/repos/gitlab-qa-github/import-test/pulls/2/commits" + }, + "html": { + "href": "https://github.com/gitlab-qa-github/import-test/pull/2" + }, + "issue": { + "href": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/2" + }, + "review_comment": { + "href": "https://api.github.com/repos/gitlab-qa-github/import-test/pulls/comments{/number}" + }, + "review_comments": { + "href": "https://api.github.com/repos/gitlab-qa-github/import-test/pulls/2/comments" + }, + "self": { + "href": "https://api.github.com/repos/gitlab-qa-github/import-test/pulls/2" + }, + "statuses": { + "href": "https://api.github.com/repos/gitlab-qa-github/import-test/statuses/05938cc9b0773f49bf800ceabcaa01b389a5d943" + } + }, + "active_lock_reason": null, + "assignee": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "assignees": [ + { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + } + ], + "author_association": "OWNER", + "auto_merge": null, + "base": { + "label": "gitlab-qa-github:main", + "ref": "main", + "repo": { + "allow_forking": true, + "archive_url": "https://api.github.com/repos/gitlab-qa-github/import-test/{archive_format}{/ref}", + "archived": false, + "assignees_url": "https://api.github.com/repos/gitlab-qa-github/import-test/assignees{/user}", + "blobs_url": "https://api.github.com/repos/gitlab-qa-github/import-test/git/blobs{/sha}", + "branches_url": "https://api.github.com/repos/gitlab-qa-github/import-test/branches{/branch}", + "clone_url": "https://github.com/gitlab-qa-github/import-test.git", + "collaborators_url": "https://api.github.com/repos/gitlab-qa-github/import-test/collaborators{/collaborator}", + "comments_url": "https://api.github.com/repos/gitlab-qa-github/import-test/comments{/number}", + "commits_url": "https://api.github.com/repos/gitlab-qa-github/import-test/commits{/sha}", + "compare_url": "https://api.github.com/repos/gitlab-qa-github/import-test/compare/{base}...{head}", + "contents_url": "https://api.github.com/repos/gitlab-qa-github/import-test/contents/{+path}", + "contributors_url": "https://api.github.com/repos/gitlab-qa-github/import-test/contributors", + "created_at": "2022-03-07T07:53:43Z", + "default_branch": "main", + "deployments_url": "https://api.github.com/repos/gitlab-qa-github/import-test/deployments", + "description": "Project for github import test", + "disabled": false, + "downloads_url": "https://api.github.com/repos/gitlab-qa-github/import-test/downloads", + "events_url": "https://api.github.com/repos/gitlab-qa-github/import-test/events", + "fork": false, + "forks": 0, + "forks_count": 0, + "forks_url": "https://api.github.com/repos/gitlab-qa-github/import-test/forks", + "full_name": "gitlab-qa-github/import-test", + "git_commits_url": "https://api.github.com/repos/gitlab-qa-github/import-test/git/commits{/sha}", + "git_refs_url": "https://api.github.com/repos/gitlab-qa-github/import-test/git/refs{/sha}", + "git_tags_url": "https://api.github.com/repos/gitlab-qa-github/import-test/git/tags{/sha}", + "git_url": "git://github.com/gitlab-qa-github/import-test.git", + "has_discussions": false, + "has_downloads": true, + "has_issues": true, + "has_pages": false, + "has_projects": true, + "has_wiki": true, + "homepage": null, + "hooks_url": "https://api.github.com/repos/gitlab-qa-github/import-test/hooks", + "html_url": "https://github.com/gitlab-qa-github/import-test", + "id": 466994992, + "is_template": false, + "issue_comment_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/comments{/number}", + "issue_events_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/events{/number}", + "issues_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues{/number}", + "keys_url": "https://api.github.com/repos/gitlab-qa-github/import-test/keys{/key_id}", + "labels_url": "https://api.github.com/repos/gitlab-qa-github/import-test/labels{/name}", + "language": null, + "languages_url": "https://api.github.com/repos/gitlab-qa-github/import-test/languages", + "license": { + "key": "mit", + "name": "MIT License", + "node_id": "MDc6TGljZW5zZTEz", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit" + }, + "merges_url": "https://api.github.com/repos/gitlab-qa-github/import-test/merges", + "milestones_url": "https://api.github.com/repos/gitlab-qa-github/import-test/milestones{/number}", + "mirror_url": null, + "name": "import-test", + "node_id": "R_kgDOG9XHMA", + "notifications_url": "https://api.github.com/repos/gitlab-qa-github/import-test/notifications{?since,all,participating}", + "open_issues": 2, + "open_issues_count": 2, + "owner": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "private": false, + "pulls_url": "https://api.github.com/repos/gitlab-qa-github/import-test/pulls{/number}", + "pushed_at": "2022-10-24T08:06:37Z", + "releases_url": "https://api.github.com/repos/gitlab-qa-github/import-test/releases{/id}", + "size": 4, + "ssh_url": "git@github.com:gitlab-qa-github/import-test.git", + "stargazers_count": 0, + "stargazers_url": "https://api.github.com/repos/gitlab-qa-github/import-test/stargazers", + "statuses_url": "https://api.github.com/repos/gitlab-qa-github/import-test/statuses/{sha}", + "subscribers_url": "https://api.github.com/repos/gitlab-qa-github/import-test/subscribers", + "subscription_url": "https://api.github.com/repos/gitlab-qa-github/import-test/subscription", + "svn_url": "https://github.com/gitlab-qa-github/import-test", + "tags_url": "https://api.github.com/repos/gitlab-qa-github/import-test/tags", + "teams_url": "https://api.github.com/repos/gitlab-qa-github/import-test/teams", + "topics": [], + "trees_url": "https://api.github.com/repos/gitlab-qa-github/import-test/git/trees{/sha}", + "updated_at": "2022-07-07T10:11:28Z", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test", + "visibility": "public", + "watchers": 0, + "watchers_count": 0, + "web_commit_signoff_required": false + }, + "sha": "61ae9e670fdcd0a35e37a7faf7489969564accc1", + "user": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + } + }, + "body": "Test pull request body", + "closed_at": null, + "comments_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/2/comments", + "commits_url": "https://api.github.com/repos/gitlab-qa-github/import-test/pulls/2/commits", + "created_at": "2022-03-07T07:58:10Z", + "diff_url": "https://github.com/gitlab-qa-github/import-test/pull/2.diff", + "draft": false, + "head": { + "label": "gitlab-qa-github:gitlab-qa-github-patch-1", + "ref": "gitlab-qa-github-patch-1", + "repo": { + "allow_forking": true, + "archive_url": "https://api.github.com/repos/gitlab-qa-github/import-test/{archive_format}{/ref}", + "archived": false, + "assignees_url": "https://api.github.com/repos/gitlab-qa-github/import-test/assignees{/user}", + "blobs_url": "https://api.github.com/repos/gitlab-qa-github/import-test/git/blobs{/sha}", + "branches_url": "https://api.github.com/repos/gitlab-qa-github/import-test/branches{/branch}", + "clone_url": "https://github.com/gitlab-qa-github/import-test.git", + "collaborators_url": "https://api.github.com/repos/gitlab-qa-github/import-test/collaborators{/collaborator}", + "comments_url": "https://api.github.com/repos/gitlab-qa-github/import-test/comments{/number}", + "commits_url": "https://api.github.com/repos/gitlab-qa-github/import-test/commits{/sha}", + "compare_url": "https://api.github.com/repos/gitlab-qa-github/import-test/compare/{base}...{head}", + "contents_url": "https://api.github.com/repos/gitlab-qa-github/import-test/contents/{+path}", + "contributors_url": "https://api.github.com/repos/gitlab-qa-github/import-test/contributors", + "created_at": "2022-03-07T07:53:43Z", + "default_branch": "main", + "deployments_url": "https://api.github.com/repos/gitlab-qa-github/import-test/deployments", + "description": "Project for github import test", + "disabled": false, + "downloads_url": "https://api.github.com/repos/gitlab-qa-github/import-test/downloads", + "events_url": "https://api.github.com/repos/gitlab-qa-github/import-test/events", + "fork": false, + "forks": 0, + "forks_count": 0, + "forks_url": "https://api.github.com/repos/gitlab-qa-github/import-test/forks", + "full_name": "gitlab-qa-github/import-test", + "git_commits_url": "https://api.github.com/repos/gitlab-qa-github/import-test/git/commits{/sha}", + "git_refs_url": "https://api.github.com/repos/gitlab-qa-github/import-test/git/refs{/sha}", + "git_tags_url": "https://api.github.com/repos/gitlab-qa-github/import-test/git/tags{/sha}", + "git_url": "git://github.com/gitlab-qa-github/import-test.git", + "has_discussions": false, + "has_downloads": true, + "has_issues": true, + "has_pages": false, + "has_projects": true, + "has_wiki": true, + "homepage": null, + "hooks_url": "https://api.github.com/repos/gitlab-qa-github/import-test/hooks", + "html_url": "https://github.com/gitlab-qa-github/import-test", + "id": 466994992, + "is_template": false, + "issue_comment_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/comments{/number}", + "issue_events_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/events{/number}", + "issues_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues{/number}", + "keys_url": "https://api.github.com/repos/gitlab-qa-github/import-test/keys{/key_id}", + "labels_url": "https://api.github.com/repos/gitlab-qa-github/import-test/labels{/name}", + "language": null, + "languages_url": "https://api.github.com/repos/gitlab-qa-github/import-test/languages", + "license": { + "key": "mit", + "name": "MIT License", + "node_id": "MDc6TGljZW5zZTEz", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit" + }, + "merges_url": "https://api.github.com/repos/gitlab-qa-github/import-test/merges", + "milestones_url": "https://api.github.com/repos/gitlab-qa-github/import-test/milestones{/number}", + "mirror_url": null, + "name": "import-test", + "node_id": "R_kgDOG9XHMA", + "notifications_url": "https://api.github.com/repos/gitlab-qa-github/import-test/notifications{?since,all,participating}", + "open_issues": 2, + "open_issues_count": 2, + "owner": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "private": false, + "pulls_url": "https://api.github.com/repos/gitlab-qa-github/import-test/pulls{/number}", + "pushed_at": "2022-10-24T08:06:37Z", + "releases_url": "https://api.github.com/repos/gitlab-qa-github/import-test/releases{/id}", + "size": 4, + "ssh_url": "git@github.com:gitlab-qa-github/import-test.git", + "stargazers_count": 0, + "stargazers_url": "https://api.github.com/repos/gitlab-qa-github/import-test/stargazers", + "statuses_url": "https://api.github.com/repos/gitlab-qa-github/import-test/statuses/{sha}", + "subscribers_url": "https://api.github.com/repos/gitlab-qa-github/import-test/subscribers", + "subscription_url": "https://api.github.com/repos/gitlab-qa-github/import-test/subscription", + "svn_url": "https://github.com/gitlab-qa-github/import-test", + "tags_url": "https://api.github.com/repos/gitlab-qa-github/import-test/tags", + "teams_url": "https://api.github.com/repos/gitlab-qa-github/import-test/teams", + "topics": [], + "trees_url": "https://api.github.com/repos/gitlab-qa-github/import-test/git/trees{/sha}", + "updated_at": "2022-07-07T10:11:28Z", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test", + "visibility": "public", + "watchers": 0, + "watchers_count": 0, + "web_commit_signoff_required": false + }, + "sha": "05938cc9b0773f49bf800ceabcaa01b389a5d943", + "user": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + } + }, + "html_url": "https://github.com/gitlab-qa-github/import-test/pull/2", + "id": 872806899, + "issue_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/2", + "labels": [ + { + "color": "0075ca", + "default": true, + "description": "Improvements or additions to documentation", + "id": 3902072341, + "name": "documentation", + "node_id": "LA_kwDOG9XHMM7olOYV", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/labels/documentation" + } + ], + "locked": false, + "merge_commit_sha": "e95005795a22f9bbf04a6398bdeed206f4e5d26d", + "merged_at": null, + "milestone": { + "closed_at": null, + "closed_issues": 0, + "created_at": "2022-03-07T07:54:43Z", + "creator": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "description": null, + "due_on": null, + "html_url": "https://github.com/gitlab-qa-github/import-test/milestone/1", + "id": 7741550, + "labels_url": "https://api.github.com/repos/gitlab-qa-github/import-test/milestones/1/labels", + "node_id": "MI_kwDOG9XHMM4AdiBu", + "number": 1, + "open_issues": 2, + "state": "open", + "title": "0.0.1", + "updated_at": "2022-07-07T10:01:32Z", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/milestones/1" + }, + "node_id": "PR_kwDOG9XHMM40Bfnz", + "number": 2, + "patch_url": "https://github.com/gitlab-qa-github/import-test/pull/2.patch", + "requested_reviewers": [], + "requested_teams": [], + "review_comment_url": "https://api.github.com/repos/gitlab-qa-github/import-test/pulls/comments{/number}", + "review_comments_url": "https://api.github.com/repos/gitlab-qa-github/import-test/pulls/2/comments", + "state": "open", + "statuses_url": "https://api.github.com/repos/gitlab-qa-github/import-test/statuses/05938cc9b0773f49bf800ceabcaa01b389a5d943", + "title": "Test pull request", + "updated_at": "2022-12-27T09:57:21Z", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/pulls/2", + "user": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + } + } + ] + +- request: + path: /repos/gitlab-qa-github/import-test/pulls/2/requested_reviewers + method: GET + query_params: + per_page: '100' + headers: + Host: api.github.com + response: + status: 200 + headers: + Content-Type: application/json; charset=utf-8 + X-Ratelimit-Limit: '5000' + X-Ratelimit-Remaining: '5000' + body: | + { + "teams": [], + "users": [] + } + +- request: + path: /repos/gitlab-qa-github/import-test/pulls/2/reviews + method: GET + query_params: + per_page: '100' + headers: + Host: api.github.com + response: + status: 200 + headers: + Content-Type: application/json; charset=utf-8 + X-Ratelimit-Limit: '5000' + X-Ratelimit-Remaining: '5000' + body: | + [ + { + "_links": { + "html": { + "href": "https://github.com/gitlab-qa-github/import-test/pull/2#pullrequestreview-901341181" + }, + "pull_request": { + "href": "https://api.github.com/repos/gitlab-qa-github/import-test/pulls/2" + } + }, + "author_association": "OWNER", + "body": "Good but needs some improvement", + "commit_id": "05938cc9b0773f49bf800ceabcaa01b389a5d943", + "html_url": "https://github.com/gitlab-qa-github/import-test/pull/2#pullrequestreview-901341181", + "id": 901341181, + "node_id": "PRR_kwDOG9XHMM41uV_9", + "pull_request_url": "https://api.github.com/repos/gitlab-qa-github/import-test/pulls/2", + "state": "COMMENTED", + "submitted_at": "2022-03-07T08:01:18Z", + "user": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + } + }, + { + "_links": { + "html": { + "href": "https://github.com/gitlab-qa-github/import-test/pull/2#pullrequestreview-1230532237" + }, + "pull_request": { + "href": "https://api.github.com/repos/gitlab-qa-github/import-test/pulls/2" + } + }, + "author_association": "COLLABORATOR", + "body": "", + "commit_id": "05938cc9b0773f49bf800ceabcaa01b389a5d943", + "html_url": "https://github.com/gitlab-qa-github/import-test/pull/2#pullrequestreview-1230532237", + "id": 1230532237, + "node_id": "PRR_kwDOG9XHMM5JWG6N", + "pull_request_url": "https://api.github.com/repos/gitlab-qa-github/import-test/pulls/2", + "state": "APPROVED", + "submitted_at": "2022-12-27T09:57:21Z", + "user": { + "avatar_url": "https://avatars.githubusercontent.com/u/40021320?v=4", + "events_url": "https://api.github.com/users/gitlab-qa/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa/followers", + "following_url": "https://api.github.com/users/gitlab-qa/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa", + "id": 40021320, + "login": "gitlab-qa", + "node_id": "MDQ6VXNlcjQwMDIxMzIw", + "organizations_url": "https://api.github.com/users/gitlab-qa/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa" + } + } + ] + +- request: + path: /repos/gitlab-qa-github/import-test/issues + method: GET + query_params: + per_page: '100' + sort: created + state: all + headers: + Host: api.github.com + response: + status: 200 + headers: + Content-Type: application/json; charset=utf-8 + X-Ratelimit-Limit: '5000' + X-Ratelimit-Remaining: '5000' + body: | + [ + { + "active_lock_reason": null, + "assignee": null, + "assignees": [], + "author_association": "OWNER", + "body": "Test issue description", + "closed_at": null, + "comments": 2, + "comments_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/1/comments", + "created_at": "2022-03-07T07:54:52Z", + "events_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/1/events", + "html_url": "https://github.com/gitlab-qa-github/import-test/issues/1", + "id": 1161027859, + "labels": [ + { + "color": "008672", + "default": true, + "description": "Extra attention is needed", + "id": 3902072344, + "name": "help wanted", + "node_id": "LA_kwDOG9XHMM7olOYY", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/labels/help%20wanted" + }, + { + "color": "7057ff", + "default": true, + "description": "Good for newcomers", + "id": 3902072345, + "name": "good first issue", + "node_id": "LA_kwDOG9XHMM7olOYZ", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/labels/good%20first%20issue" + }, + { + "color": "d876e3", + "default": true, + "description": "Further information is requested", + "id": 3902072347, + "name": "question", + "node_id": "LA_kwDOG9XHMM7olOYb", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/labels/question" + } + ], + "labels_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/1/labels{/name}", + "locked": false, + "milestone": { + "closed_at": null, + "closed_issues": 0, + "created_at": "2022-03-07T07:54:43Z", + "creator": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "description": null, + "due_on": null, + "html_url": "https://github.com/gitlab-qa-github/import-test/milestone/1", + "id": 7741550, + "labels_url": "https://api.github.com/repos/gitlab-qa-github/import-test/milestones/1/labels", + "node_id": "MI_kwDOG9XHMM4AdiBu", + "number": 1, + "open_issues": 2, + "state": "open", + "title": "0.0.1", + "updated_at": "2022-07-07T10:01:32Z", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/milestones/1" + }, + "node_id": "I_kwDOG9XHMM5FM-ET", + "number": 1, + "performed_via_github_app": null, + "reactions": { + "+1": 0, + "-1": 0, + "confused": 0, + "eyes": 0, + "heart": 0, + "hooray": 0, + "laugh": 0, + "rocket": 0, + "total_count": 0, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/1/reactions" + }, + "repository_url": "https://api.github.com/repos/gitlab-qa-github/import-test", + "state": "open", + "state_reason": "reopened", + "timeline_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/1/timeline", + "title": "Test issue", + "updated_at": "2022-07-07T10:01:32Z", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/1", + "user": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + } + }, + { + "active_lock_reason": null, + "assignee": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "assignees": [ + { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + } + ], + "author_association": "OWNER", + "body": "Test pull request body", + "closed_at": null, + "comments": 1, + "comments_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/2/comments", + "created_at": "2022-03-07T07:58:10Z", + "draft": false, + "events_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/2/events", + "html_url": "https://github.com/gitlab-qa-github/import-test/pull/2", + "id": 1161030385, + "labels": [ + { + "color": "0075ca", + "default": true, + "description": "Improvements or additions to documentation", + "id": 3902072341, + "name": "documentation", + "node_id": "LA_kwDOG9XHMM7olOYV", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/labels/documentation" + } + ], + "labels_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/2/labels{/name}", + "locked": false, + "milestone": { + "closed_at": null, + "closed_issues": 0, + "created_at": "2022-03-07T07:54:43Z", + "creator": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "description": null, + "due_on": null, + "html_url": "https://github.com/gitlab-qa-github/import-test/milestone/1", + "id": 7741550, + "labels_url": "https://api.github.com/repos/gitlab-qa-github/import-test/milestones/1/labels", + "node_id": "MI_kwDOG9XHMM4AdiBu", + "number": 1, + "open_issues": 2, + "state": "open", + "title": "0.0.1", + "updated_at": "2022-07-07T10:01:32Z", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/milestones/1" + }, + "node_id": "PR_kwDOG9XHMM40Bfnz", + "number": 2, + "performed_via_github_app": null, + "pull_request": { + "diff_url": "https://github.com/gitlab-qa-github/import-test/pull/2.diff", + "html_url": "https://github.com/gitlab-qa-github/import-test/pull/2", + "merged_at": null, + "patch_url": "https://github.com/gitlab-qa-github/import-test/pull/2.patch", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/pulls/2" + }, + "reactions": { + "+1": 0, + "-1": 0, + "confused": 0, + "eyes": 0, + "heart": 0, + "hooray": 0, + "laugh": 0, + "rocket": 0, + "total_count": 0, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/2/reactions" + }, + "repository_url": "https://api.github.com/repos/gitlab-qa-github/import-test", + "state": "open", + "state_reason": null, + "timeline_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/2/timeline", + "title": "Test pull request", + "updated_at": "2022-12-27T09:57:21Z", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/2", + "user": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + } + } + ] + +- request: + path: /repos/gitlab-qa-github/import-test/pulls/2/comments + method: GET + query_params: + per_page: '100' + headers: + Host: api.github.com + response: + status: 200 + headers: + Content-Type: application/json; charset=utf-8 + X-Ratelimit-Limit: '5000' + X-Ratelimit-Remaining: '5000' + body: | + [ + { + "_links": { + "html": { + "href": "https://github.com/gitlab-qa-github/import-test/pull/2#discussion_r820456469" + }, + "pull_request": { + "href": "https://api.github.com/repos/gitlab-qa-github/import-test/pulls/2" + }, + "self": { + "href": "https://api.github.com/repos/gitlab-qa-github/import-test/pulls/comments/820456469" + } + }, + "author_association": "OWNER", + "body": "```suggestion\r\nProject for GitHub import test to GitLab\r\n```", + "commit_id": "05938cc9b0773f49bf800ceabcaa01b389a5d943", + "created_at": "2022-03-07T08:00:45Z", + "diff_hunk": "@@ -1,2 +1,3 @@\n # import-test\n-Project for github import test\n+Project for github import test to GitLab", + "html_url": "https://github.com/gitlab-qa-github/import-test/pull/2#discussion_r820456469", + "id": 820456469, + "line": 2, + "node_id": "PRRC_kwDOG9XHMM4w5ywV", + "original_commit_id": "05938cc9b0773f49bf800ceabcaa01b389a5d943", + "original_line": 2, + "original_position": 3, + "original_start_line": null, + "path": "README.md", + "position": 3, + "pull_request_review_id": 901341181, + "pull_request_url": "https://api.github.com/repos/gitlab-qa-github/import-test/pulls/2", + "reactions": { + "+1": 0, + "-1": 0, + "confused": 0, + "eyes": 0, + "heart": 0, + "hooray": 0, + "laugh": 0, + "rocket": 0, + "total_count": 0, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/pulls/comments/820456469/reactions" + }, + "side": "RIGHT", + "start_line": null, + "start_side": null, + "updated_at": "2022-03-07T08:01:18Z", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/pulls/comments/820456469", + "user": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + } + } + ] + +- request: + path: /repos/gitlab-qa-github/import-test/issues/1/timeline + method: GET + query_params: + per_page: '100' + sort: created + state: all + headers: + Host: api.github.com + response: + status: 200 + headers: + Content-Type: application/json; charset=utf-8 + X-Ratelimit-Limit: '5000' + X-Ratelimit-Remaining: '5000' + body: | + [ + { + "actor": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "commit_id": null, + "commit_url": null, + "created_at": "2022-03-07T07:54:52Z", + "event": "labeled", + "id": 6192721273, + "label": { + "color": "d876e3", + "name": "question" + }, + "node_id": "LE_lADOG9XHMM5FM-ETzwAAAAFxHW15", + "performed_via_github_app": null, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/events/6192721273" + }, + { + "actor": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "commit_id": null, + "commit_url": null, + "created_at": "2022-03-07T07:54:52Z", + "event": "milestoned", + "id": 6192721279, + "milestone": { + "title": "0.0.1" + }, + "node_id": "MIE_lADOG9XHMM5FM-ETzwAAAAFxHW1_", + "performed_via_github_app": null, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/events/6192721279" + }, + { + "actor": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "commit_id": null, + "commit_url": null, + "created_at": "2022-03-07T08:07:17Z", + "event": "labeled", + "id": 6192790994, + "label": { + "color": "7057ff", + "name": "good first issue" + }, + "node_id": "LE_lADOG9XHMM5FM-ETzwAAAAFxHn3S", + "performed_via_github_app": null, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/events/6192790994" + }, + { + "actor": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "commit_id": null, + "commit_url": null, + "created_at": "2022-03-07T08:07:17Z", + "event": "labeled", + "id": 6192790996, + "label": { + "color": "008672", + "name": "help wanted" + }, + "node_id": "LE_lADOG9XHMM5FM-ETzwAAAAFxHn3U", + "performed_via_github_app": null, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/events/6192790996" + }, + { + "actor": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "author_association": "OWNER", + "body": "Some test comment", + "created_at": "2022-03-07T08:07:40Z", + "event": "commented", + "html_url": "https://github.com/gitlab-qa-github/import-test/issues/1#issuecomment-1060295687", + "id": 1060295687, + "issue_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/1", + "node_id": "IC_kwDOG9XHMM4_MtQH", + "performed_via_github_app": null, + "reactions": { + "+1": 0, + "-1": 0, + "confused": 0, + "eyes": 0, + "heart": 0, + "hooray": 0, + "laugh": 0, + "rocket": 0, + "total_count": 0, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/comments/1060295687/reactions" + }, + "updated_at": "2022-03-07T08:07:47Z", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/comments/1060295687", + "user": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + } + }, + { + "actor": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "author_association": "OWNER", + "body": "Another test comment", + "created_at": "2022-03-07T08:27:03Z", + "event": "commented", + "html_url": "https://github.com/gitlab-qa-github/import-test/issues/1#issuecomment-1060321905", + "id": 1060321905, + "issue_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/1", + "node_id": "IC_kwDOG9XHMM4_Mzpx", + "performed_via_github_app": null, + "reactions": { + "+1": 0, + "-1": 0, + "confused": 0, + "eyes": 0, + "heart": 0, + "hooray": 0, + "laugh": 0, + "rocket": 0, + "total_count": 0, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/comments/1060321905/reactions" + }, + "updated_at": "2022-03-07T08:27:03Z", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/comments/1060321905", + "user": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + } + }, + { + "actor": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "commit_id": null, + "commit_url": null, + "created_at": "2022-07-07T10:01:27Z", + "event": "closed", + "id": 6950161456, + "node_id": "CE_lADOG9XHMM5FM-ETzwAAAAGeQwww", + "performed_via_github_app": null, + "state_reason": "not_planned", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/events/6950161456" + }, + { + "actor": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "commit_id": null, + "commit_url": null, + "created_at": "2022-07-07T10:01:32Z", + "event": "reopened", + "id": 6950162104, + "node_id": "REE_lADOG9XHMM5FM-ETzwAAAAGeQw64", + "performed_via_github_app": null, + "state_reason": "reopened", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/events/6950162104" + } + ] + +- request: + path: /repos/gitlab-qa-github/import-test/issues/2/timeline + method: GET + query_params: + per_page: '100' + sort: created + state: all + headers: + Host: api.github.com + response: + status: 200 + headers: + Content-Type: application/json; charset=utf-8 + X-Ratelimit-Limit: '5000' + X-Ratelimit-Remaining: '5000' + body: | + [ + { + "author": { + "date": "2022-03-07T07:57:19Z", + "email": "59606922+gitlab-qa-github@users.noreply.github.com", + "name": "gitlab-qa-github" + }, + "committer": { + "date": "2022-03-07T07:57:19Z", + "email": "noreply@github.com", + "name": "GitHub" + }, + "event": "committed", + "html_url": "https://github.com/gitlab-qa-github/import-test/commit/05938cc9b0773f49bf800ceabcaa01b389a5d943", + "message": "Improve README", + "node_id": "C_kwDOG9XHMNoAKDA1OTM4Y2M5YjA3NzNmNDliZjgwMGNlYWJjYWEwMWIzODlhNWQ5NDM", + "parents": [ + { + "html_url": "https://github.com/gitlab-qa-github/import-test/commit/61ae9e670fdcd0a35e37a7faf7489969564accc1", + "sha": "61ae9e670fdcd0a35e37a7faf7489969564accc1", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/git/commits/61ae9e670fdcd0a35e37a7faf7489969564accc1" + } + ], + "sha": "05938cc9b0773f49bf800ceabcaa01b389a5d943", + "tree": { + "sha": "5eba7be6baa4c1e14b89c377d25dba1d6f8fc3fc", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/git/trees/5eba7be6baa4c1e14b89c377d25dba1d6f8fc3fc" + }, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/git/commits/05938cc9b0773f49bf800ceabcaa01b389a5d943", + "verification": { + "payload": "tree 5eba7be6baa4c1e14b89c377d25dba1d6f8fc3fc\nparent 61ae9e670fdcd0a35e37a7faf7489969564accc1\nauthor gitlab-qa-github <59606922+gitlab-qa-github@users.noreply.github.com> 1646639839 +0100\ncommitter GitHub <noreply@github.com> 1646639839 +0100\n\nImprove README", + "reason": "valid", + "signature": "-----BEGIN PGP SIGNATURE-----\n\nwsBcBAABCAAQBQJiJbrfCRBK7hj4Ov3rIwAAxZ4IAD3lRpLwlbBH/0nBd9cwXwLT\nd3mVtAz5irpSaeXZtaXSn46IpmA+JeBbwglEOp/GDQWs+6aYauiwFBmW2bPwJ1B8\nBxl+5ypTWd7azTuLsXHOjE+3j+DpfVgvkEYcwiwQ02suZ/Jt1FxyLdKZ95/DvP+w\nmZWWL8FhXPxaV1Z2b0tozmx2KpNkKFfplgq54BBIWn3S2fQ/qsr0ypyJUaFOQdbY\nx0m5adwXJ1oN9RGIskQ3402PfW3g6y/4d7fSugMcAVpJOyLu6VRJuXLcfzBLlZj8\n55wDqeDy1WN7tyPDxC7Ds6UHw7GbgPArFieSLiO9UXNO/jPY7S1Xr98kFhynsHI=\n=kU7W\n-----END PGP SIGNATURE-----\n", + "verified": true + } + }, + { + "actor": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "commit_id": null, + "commit_url": null, + "created_at": "2022-03-07T07:58:10Z", + "event": "labeled", + "id": 6192737366, + "label": { + "color": "0075ca", + "name": "documentation" + }, + "node_id": "LE_lADOG9XHMM5FM-rxzwAAAAFxHaxW", + "performed_via_github_app": null, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/events/6192737366" + }, + { + "actor": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "commit_id": null, + "commit_url": null, + "created_at": "2022-03-07T07:58:10Z", + "event": "milestoned", + "id": 6192737375, + "milestone": { + "title": "0.0.1" + }, + "node_id": "MIE_lADOG9XHMM5FM-rxzwAAAAFxHaxf", + "performed_via_github_app": null, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/events/6192737375" + }, + { + "_links": { + "html": { + "href": "https://github.com/gitlab-qa-github/import-test/pull/2#pullrequestreview-901341181" + }, + "pull_request": { + "href": "https://api.github.com/repos/gitlab-qa-github/import-test/pulls/2" + } + }, + "author_association": "OWNER", + "body": "Good but needs some improvement", + "commit_id": "05938cc9b0773f49bf800ceabcaa01b389a5d943", + "event": "reviewed", + "html_url": "https://github.com/gitlab-qa-github/import-test/pull/2#pullrequestreview-901341181", + "id": 901341181, + "node_id": "PRR_kwDOG9XHMM41uV_9", + "pull_request_url": "https://api.github.com/repos/gitlab-qa-github/import-test/pulls/2", + "state": "commented", + "submitted_at": "2022-03-07T08:01:18Z", + "user": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + } + }, + { + "actor": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "author_association": "OWNER", + "body": "Some test PR comment", + "created_at": "2022-03-07T08:27:17Z", + "event": "commented", + "html_url": "https://github.com/gitlab-qa-github/import-test/pull/2#issuecomment-1060322120", + "id": 1060322120, + "issue_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/2", + "node_id": "IC_kwDOG9XHMM4_MztI", + "performed_via_github_app": null, + "reactions": { + "+1": 0, + "-1": 0, + "confused": 0, + "eyes": 0, + "heart": 0, + "hooray": 0, + "laugh": 0, + "rocket": 0, + "total_count": 0, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/comments/1060322120/reactions" + }, + "updated_at": "2022-03-07T08:27:17Z", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/comments/1060322120", + "user": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + } + }, + { + "actor": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "assignee": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "commit_id": null, + "commit_url": null, + "created_at": "2022-12-27T06:17:51Z", + "event": "assigned", + "id": 8113792800, + "node_id": "AE_lADOG9XHMM5FM-rxzwAAAAHjnqcg", + "performed_via_github_app": null, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/events/8113792800" + }, + { + "actor": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "commit_id": null, + "commit_url": null, + "created_at": "2022-12-27T06:25:33Z", + "event": "review_requested", + "id": 8113816458, + "node_id": "RRE_lADOG9XHMM5FM-rxzwAAAAHjnwOK", + "performed_via_github_app": null, + "requested_reviewer": { + "avatar_url": "https://avatars.githubusercontent.com/u/40021320?v=4", + "events_url": "https://api.github.com/users/gitlab-qa/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa/followers", + "following_url": "https://api.github.com/users/gitlab-qa/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa", + "id": 40021320, + "login": "gitlab-qa", + "node_id": "MDQ6VXNlcjQwMDIxMzIw", + "organizations_url": "https://api.github.com/users/gitlab-qa/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa" + }, + "review_requester": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + }, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/events/8113816458" + }, + { + "_links": { + "html": { + "href": "https://github.com/gitlab-qa-github/import-test/pull/2#pullrequestreview-1230532237" + }, + "pull_request": { + "href": "https://api.github.com/repos/gitlab-qa-github/import-test/pulls/2" + } + }, + "author_association": "COLLABORATOR", + "body": "", + "commit_id": "05938cc9b0773f49bf800ceabcaa01b389a5d943", + "event": "reviewed", + "html_url": "https://github.com/gitlab-qa-github/import-test/pull/2#pullrequestreview-1230532237", + "id": 1230532237, + "node_id": "PRR_kwDOG9XHMM5JWG6N", + "pull_request_url": "https://api.github.com/repos/gitlab-qa-github/import-test/pulls/2", + "state": "approved", + "submitted_at": "2022-12-27T09:57:21Z", + "user": { + "avatar_url": "https://avatars.githubusercontent.com/u/40021320?v=4", + "events_url": "https://api.github.com/users/gitlab-qa/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa/followers", + "following_url": "https://api.github.com/users/gitlab-qa/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa", + "id": 40021320, + "login": "gitlab-qa", + "node_id": "MDQ6VXNlcjQwMDIxMzIw", + "organizations_url": "https://api.github.com/users/gitlab-qa/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa" + } + } + ] + +- request: + path: /repos/gitlab-qa-github/import-test/issues/2/comments + method: GET + query_params: + per_page: '100' + headers: + Host: api.github.com + response: + status: 200 + headers: + Content-Type: application/json; charset=utf-8 + X-Ratelimit-Limit: '5000' + X-Ratelimit-Remaining: '5000' + body: | + [ + { + "author_association": "OWNER", + "body": "Some test PR comment", + "created_at": "2022-03-07T08:27:17Z", + "html_url": "https://github.com/gitlab-qa-github/import-test/pull/2#issuecomment-1060322120", + "id": 1060322120, + "issue_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/2", + "node_id": "IC_kwDOG9XHMM4_MztI", + "performed_via_github_app": null, + "reactions": { + "+1": 0, + "-1": 0, + "confused": 0, + "eyes": 0, + "heart": 0, + "hooray": 0, + "laugh": 0, + "rocket": 0, + "total_count": 0, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/comments/1060322120/reactions" + }, + "updated_at": "2022-03-07T08:27:17Z", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/comments/1060322120", + "user": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + } + } + ] + +- request: + path: /repos/gitlab-qa-github/import-test/issues/1/comments + method: GET + query_params: + per_page: '100' + headers: + Host: api.github.com + response: + status: 200 + headers: + Content-Type: application/json; charset=utf-8 + X-Ratelimit-Limit: '5000' + X-Ratelimit-Remaining: '5000' + body: | + [ + { + "author_association": "OWNER", + "body": "Some test comment", + "created_at": "2022-03-07T08:07:40Z", + "html_url": "https://github.com/gitlab-qa-github/import-test/issues/1#issuecomment-1060295687", + "id": 1060295687, + "issue_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/1", + "node_id": "IC_kwDOG9XHMM4_MtQH", + "performed_via_github_app": null, + "reactions": { + "+1": 0, + "-1": 0, + "confused": 0, + "eyes": 0, + "heart": 0, + "hooray": 0, + "laugh": 0, + "rocket": 0, + "total_count": 0, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/comments/1060295687/reactions" + }, + "updated_at": "2022-03-07T08:07:47Z", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/comments/1060295687", + "user": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + } + }, + { + "author_association": "OWNER", + "body": "Another test comment", + "created_at": "2022-03-07T08:27:03Z", + "html_url": "https://github.com/gitlab-qa-github/import-test/issues/1#issuecomment-1060321905", + "id": 1060321905, + "issue_url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/1", + "node_id": "IC_kwDOG9XHMM4_Mzpx", + "performed_via_github_app": null, + "reactions": { + "+1": 0, + "-1": 0, + "confused": 0, + "eyes": 0, + "heart": 0, + "hooray": 0, + "laugh": 0, + "rocket": 0, + "total_count": 0, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/comments/1060321905/reactions" + }, + "updated_at": "2022-03-07T08:27:03Z", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/issues/comments/1060321905", + "user": { + "avatar_url": "https://avatars.githubusercontent.com/u/59606922?v=4", + "events_url": "https://api.github.com/users/gitlab-qa-github/events{/privacy}", + "followers_url": "https://api.github.com/users/gitlab-qa-github/followers", + "following_url": "https://api.github.com/users/gitlab-qa-github/following{/other_user}", + "gists_url": "https://api.github.com/users/gitlab-qa-github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/gitlab-qa-github", + "id": 59606922, + "login": "gitlab-qa-github", + "node_id": "MDQ6VXNlcjU5NjA2OTIy", + "organizations_url": "https://api.github.com/users/gitlab-qa-github/orgs", + "received_events_url": "https://api.github.com/users/gitlab-qa-github/received_events", + "repos_url": "https://api.github.com/users/gitlab-qa-github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/gitlab-qa-github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/gitlab-qa-github/subscriptions", + "type": "User", + "url": "https://api.github.com/users/gitlab-qa-github" + } + } + ] + +- request: + path: /repos/gitlab-qa-github/import-test/branches + method: GET + query_params: + per_page: '100' + headers: + Host: api.github.com + response: + status: 200 + headers: + Content-Type: application/json; charset=utf-8 + X-Ratelimit-Limit: '5000' + X-Ratelimit-Remaining: '5000' + body: | + [ + { + "commit": { + "sha": "05938cc9b0773f49bf800ceabcaa01b389a5d943", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/commits/05938cc9b0773f49bf800ceabcaa01b389a5d943" + }, + "name": "gitlab-qa-github-patch-1", + "protected": false, + "protection": { + "enabled": false, + "required_status_checks": { + "checks": [], + "contexts": [], + "enforcement_level": "off" + } + }, + "protection_url": "https://api.github.com/repos/gitlab-qa-github/import-test/branches/gitlab-qa-github-patch-1/protection" + }, + { + "commit": { + "sha": "fff7d743291b72165fea8781d5924650230e8d6c", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/commits/fff7d743291b72165fea8781d5924650230e8d6c" + }, + "name": "main", + "protected": true, + "protection": { + "enabled": true, + "required_status_checks": { + "checks": [], + "contexts": [], + "enforcement_level": "non_admins" + } + }, + "protection_url": "https://api.github.com/repos/gitlab-qa-github/import-test/branches/main/protection" + }, + { + "commit": { + "sha": "fff7d743291b72165fea8781d5924650230e8d6c", + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/commits/fff7d743291b72165fea8781d5924650230e8d6c" + }, + "name": "release", + "protected": true, + "protection": { + "enabled": true, + "required_status_checks": { + "checks": [], + "contexts": [], + "enforcement_level": "off" + } + }, + "protection_url": "https://api.github.com/repos/gitlab-qa-github/import-test/branches/release/protection" + } + ] + +- request: + path: /repos/gitlab-qa-github/import-test/branches/main/protection + method: GET + headers: + Host: api.github.com + response: + status: 200 + headers: + Content-Type: application/json; charset=utf-8 + X-Ratelimit-Limit: '5000' + X-Ratelimit-Remaining: '5000' + body: | + { + "allow_deletions": { + "enabled": false + }, + "allow_force_pushes": { + "enabled": false + }, + "allow_fork_syncing": { + "enabled": false + }, + "block_creations": { + "enabled": false + }, + "enforce_admins": { + "enabled": false, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/branches/main/protection/enforce_admins" + }, + "lock_branch": { + "enabled": false + }, + "required_conversation_resolution": { + "enabled": true + }, + "required_linear_history": { + "enabled": false + }, + "required_pull_request_reviews": { + "dismiss_stale_reviews": true, + "require_code_owner_reviews": true, + "require_last_push_approval": false, + "required_approving_review_count": 1, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/branches/main/protection/required_pull_request_reviews" + }, + "required_signatures": { + "enabled": true, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/branches/main/protection/required_signatures" + }, + "required_status_checks": { + "checks": [], + "contexts": [], + "contexts_url": "https://api.github.com/repos/gitlab-qa-github/import-test/branches/main/protection/required_status_checks/contexts", + "strict": false, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/branches/main/protection/required_status_checks" + }, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/branches/main/protection" + } + +- request: + path: /repos/gitlab-qa-github/import-test/branches/release/protection + method: GET + headers: + Host: api.github.com + response: + status: 200 + headers: + Content-Type: application/json; charset=utf-8 + X-Ratelimit-Limit: '5000' + X-Ratelimit-Remaining: '5000' + body: | + { + "allow_deletions": { + "enabled": false + }, + "allow_force_pushes": { + "enabled": true + }, + "allow_fork_syncing": { + "enabled": false + }, + "block_creations": { + "enabled": false + }, + "enforce_admins": { + "enabled": false, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/branches/release/protection/enforce_admins" + }, + "lock_branch": { + "enabled": true + }, + "required_conversation_resolution": { + "enabled": false + }, + "required_linear_history": { + "enabled": false + }, + "required_pull_request_reviews": { + "dismiss_stale_reviews": false, + "require_code_owner_reviews": true, + "require_last_push_approval": false, + "required_approving_review_count": 1, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/branches/release/protection/required_pull_request_reviews" + }, + "required_signatures": { + "enabled": false, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/branches/release/protection/required_signatures" + }, + "url": "https://api.github.com/repos/gitlab-qa-github/import-test/branches/release/protection" + } diff --git a/qa/qa/resource/group_runner.rb b/qa/qa/resource/group_runner.rb new file mode 100644 index 00000000000..d7fa26a1d53 --- /dev/null +++ b/qa/qa/resource/group_runner.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +module QA + module Resource + class GroupRunner < RunnerBase + attribute :group do + Resource::Group.fabricate_via_api! do |resource| + resource.name = "group-with-ci-cd-#{SecureRandom.hex(8)}" + resource.description = 'Group with CI/CD Pipelines' + end + end + + attribute :token do + group.runners_token + rescue NoValueError + group.reload!.runners_token + end + + private + + def runner(**kwargs) + fail_msg = "Wait for runner '#{name}' to register in group '#{group.name}'" + Support::Retrier.retry_until(max_duration: 60, sleep_interval: 1, message: fail_msg) do + auto_paginated_response(request_url("/runners", **kwargs)).find { |runner| runner[:description] == name } + end + end + end + end +end diff --git a/qa/qa/resource/project.rb b/qa/qa/resource/project.rb index 3cbc002fa86..3f42c6b649e 100644 --- a/qa/qa/resource/project.rb +++ b/qa/qa/resource/project.rb @@ -10,25 +10,25 @@ module QA include ApprovalConfiguration attr_accessor :initialize_with_readme, - :auto_devops_enabled, - :github_personal_access_token, - :github_repository_path, - :gitlab_repository_path, - :personal_namespace + :auto_devops_enabled, + :github_personal_access_token, + :github_repository_path, + :gitlab_repository_path, + :personal_namespace attr_reader :repository_storage attributes :id, - :name, - :path, - :add_name_uuid, - :runners_token, - :visibility, - :template_name, - :import, - :import_status, - :import_error, - :description + :name, + :path, + :add_name_uuid, + :runners_token, + :visibility, + :template_name, + :import, + :import_status, + :import_error, + :description attribute :group do Group.fabricate! do |group| @@ -43,7 +43,7 @@ module QA alias_method :full_path, :path_with_namespace def sandbox_path - return '' if personal_namespace || !group.respond_to?('sandbox') + return '' if personal_namespace || !group.respond_to?(:sandbox) "#{group.sandbox.path}/" end @@ -450,6 +450,14 @@ module QA parse_body(response) end + # Fetch project specific runners + # + # @param [Hash] **kwargs optional query arguments, see: https://docs.gitlab.com/ee/api/runners.html#list-projects-runners + # @return [Array] + def runners(**kwargs) + auto_paginated_response(request_url(api_runners_path, **kwargs)) + end + # Uses the API to wait until a pull mirroring update is successful (pull mirroring is treated as an import) def wait_for_pull_mirroring mirror_succeeded = Support::Retrier.retry_until( diff --git a/qa/qa/resource/project_runner.rb b/qa/qa/resource/project_runner.rb new file mode 100644 index 00000000000..173b17550c7 --- /dev/null +++ b/qa/qa/resource/project_runner.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +module QA + module Resource + class ProjectRunner < RunnerBase + attribute :project do + Project.fabricate_via_api! do |resource| + resource.name = 'project-with-ci-cd' + resource.description = 'Project with CI/CD Pipelines' + end + end + + attribute :token do + project.runners_token + rescue NoValueError + project.reload!.runners_token + end + + private + + def runner(**kwargs) + fail_msg = "Wait for runner '#{name}' to register in project '#{project.name}'" + Support::Retrier.retry_until(max_duration: 60, sleep_interval: 1, message: fail_msg) do + project.runners(**kwargs).find { |runner| runner[:description] == name } + end + end + end + end +end diff --git a/qa/qa/resource/runner.rb b/qa/qa/resource/runner.rb deleted file mode 100644 index 3c74d8de21a..00000000000 --- a/qa/qa/resource/runner.rb +++ /dev/null @@ -1,148 +0,0 @@ -# frozen_string_literal: true - -module QA - module Resource - class Runner < Base - attributes :id, - :active, - :paused, - :runner_type, - :online, - :status, - :ip_address, - :token, - :tags, - :config, - :run_untagged, - :name, # This attribute == runner[:description] - :image, - :executor, - :executor_image - - attribute :project do - Project.fabricate_via_api! do |resource| - resource.name = 'project-with-ci-cd' - resource.description = 'Project with CI/CD Pipelines' - end - end - - def initialize - @tags = nil - @config = nil - @run_untagged = nil - @name = "qa-runner-#{SecureRandom.hex(4)}" - @image = 'registry.gitlab.com/gitlab-org/gitlab-runner:alpine' - @executor = :shell - @executor_image = 'registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-qa-alpine-ruby-2.7' - end - - # Initially we only support fabricate - # via API - def fabricate! - fabricate_via_api! - end - - # Start container and register runner - # Fetch via API and populate attributes - # - def fabricate_via_api! - start_container_and_register - populate_runner_attributes - end - - def remove_via_api! - super - ensure - @docker_container.remove! - end - - def reload! - populate_runner_attributes - end - - def api_delete_path - "/runners/#{id}" - end - - def api_get_path - "/runners" - end - - def api_post_path - "/runners" - end - - def api_post_body; end - - def not_found_by_tags? - url = "#{api_get_path}?tag_list=#{tags.compact.join(',')}" - auto_paginated_response(request_url(url)).empty? - end - - def runners_list - runners_list = nil - url = tags ? "#{api_get_path}?tag_list=#{tags.compact.join(',')}" : api_get_path - Runtime::Logger.info('Looking for list of runners via API...') - Support::Retrier.retry_until(max_duration: 60, sleep_interval: 1) do - runners_list = auto_paginated_response(request_url(url)) - runners_list.present? - end - - runners_list - end - - def wait_until_online - Runtime::Logger.info('Waiting for runner to come online...') - Support::Retrier.retry_until(max_duration: 60, sleep_interval: 1) do - this_runner[:status] == 'online' - end - end - - def restart - Runtime::Logger.info("Restarting runner container #{name}...") - @docker_container.restart - wait_until_online - end - - private - - def start_container_and_register - @docker_container = Service::DockerRun::GitlabRunner.new(name).tap do |runner| - Support::Retrier.retry_on_exception(sleep_interval: 5) do - runner.pull - end - - runner.token = @token ||= project.runners_token - runner.address = Runtime::Scenario.gitlab_address - runner.tags = tags if tags - runner.image = image - runner.config = config if config - runner.executor = executor - runner.executor_image = executor_image if executor == :docker - runner.run_untagged = run_untagged if run_untagged - runner.register! - end - end - - def this_runner - runner = nil - Support::Retrier.retry_until(max_duration: 60, sleep_interval: 1) do - runner = runners_list.find { |runner| runner[:description] == name } - !runner.nil? - end - runner - end - - def populate_runner_attributes - runner = this_runner - @id = runner[:id] - @active = runner[:active] - @paused = runner[:paused] - @runner_type = runner[:typed] - @online = runner[:online] - @status = runner[:status] - @ip_address = runner[:ip_address] - end - end - end -end diff --git a/qa/qa/resource/runner_base.rb b/qa/qa/resource/runner_base.rb new file mode 100644 index 00000000000..7580aa108c9 --- /dev/null +++ b/qa/qa/resource/runner_base.rb @@ -0,0 +1,129 @@ +# frozen_string_literal: true + +module QA + module Resource + class RunnerBase < Base + attr_accessor :run_untagged, + :image, + :executor, + :executor_image, + :tags, + :config + + attributes :id, + :active, + :paused, + :runner_type, + :online, + :status, + :ip_address, + :description, + :name, + :is_shared, + :contacted_at, + :platform, + :architecture, + :projects, + :revision, + :tag_list, + :version, + :access_level, + :maximum_timeout + + def initialize + @tags = nil + @config = nil + @run_untagged = nil + @name = "qa-runner-#{SecureRandom.hex(4)}" + @image = 'registry.gitlab.com/gitlab-org/gitlab-runner:alpine' + @executor = :shell + @executor_image = 'registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-qa-alpine-ruby-2.7' + end + + # Initially we only support fabricate via API + def fabricate! + fabricate_via_api! + end + + # Start container and register runner + # Fetch via API and populate attributes + # + def fabricate_via_api! + api_get + rescue NoValueError + # Start container on initial fabrication and populate all attributes once id is known + # see: https://docs.gitlab.com/ee/api/runners.html#get-runners-details + start_container_and_register + api_get + end + + def remove_via_api! + super + ensure + @docker_container.remove! + @docker_container = nil + end + + def api_get_path + "/runners/#{id}" + end + + def api_post_path + "/runners" + end + + def api_delete_path + api_get_path + end + + def api_post_body; end + + def wait_until_online + Runtime::Logger.info('Waiting for runner to come online...') + Support::Retrier.retry_until(max_duration: 60, sleep_interval: 1) do + reload! && status == 'online' + end + end + + def restart + Runtime::Logger.info("Restarting runner container #{name}...") + @docker_container.restart + wait_until_online + end + + private + + def start_container_and_register + @docker_container ||= Service::DockerRun::GitlabRunner.new(name).tap do |runner| + Support::Retrier.retry_on_exception(sleep_interval: 5) do + runner.pull + end + + runner.token = token + runner.address = Runtime::Scenario.gitlab_address + runner.tags = tags if tags + runner.image = image + runner.config = config if config + runner.executor = executor + runner.executor_image = executor_image if executor == :docker + runner.run_untagged = run_untagged if run_untagged + runner.register! + end + populate_initial_id + rescue StandardError => e + @docker_container&.remove! + raise(e) + end + + def populate_initial_id + tag_list = tags ? { tag_list: tags.compact.join(',') } : {} + runner = runner(**tag_list) + @id = runner[:id] + end + + def runner(**kwargs) + raise("Not implemented!") + end + end + end +end diff --git a/qa/qa/runtime/path.rb b/qa/qa/runtime/path.rb index 3169c5dd743..fd451f2df19 100644 --- a/qa/qa/runtime/path.rb +++ b/qa/qa/runtime/path.rb @@ -8,6 +8,10 @@ module QA def qa_root ::File.expand_path('../../', __dir__) end + + def fixtures_path + ::File.expand_path('../fixtures', __dir__) + end end end end diff --git a/qa/qa/service/docker_run/gitlab_runner.rb b/qa/qa/service/docker_run/gitlab_runner.rb index 7a62951a2f6..d6d1a085b77 100644 --- a/qa/qa/service/docker_run/gitlab_runner.rb +++ b/qa/qa/service/docker_run/gitlab_runner.rb @@ -36,6 +36,8 @@ module QA end def register! + raise("Missing runner token value!") unless token + cmd = <<~CMD.tr("\n", ' ') docker run -d --rm --network #{runner_network} --name #{@name} #{'-v /var/run/docker.sock:/var/run/docker.sock' if @executor == :docker} diff --git a/qa/qa/service/docker_run/smocker.rb b/qa/qa/service/docker_run/smocker.rb index 83ab58887da..b48f8aa84e3 100644 --- a/qa/qa/service/docker_run/smocker.rb +++ b/qa/qa/service/docker_run/smocker.rb @@ -7,24 +7,43 @@ module QA def initialize @image = 'thiht/smocker:0.17.1' @name = 'smocker-server' - @public_port = '8080' - @admin_port = '8081' + @public_port = 8080 + @admin_port = 8081 super @network_cache = network end - def host_name - return '127.0.0.1' unless QA::Runtime::Env.running_in_ci? || QA::Runtime::Env.qa_hostname + # @param wait [Integer] seconds to wait for server + # @yieldparam [SmockerApi] the api object ready for interaction + def self.init(wait: 10) + if @container.nil? + @container = new + @container.register! + @container.wait_for_running - "#{@name}.#{@network_cache}" + @api = Vendor::Smocker::SmockerApi.new( + host: @container.host_name, + public_port: @container.public_port, + admin_port: @container.admin_port + ) + @api.wait_for_ready(wait: wait) + end + + yield @api end - def base_url - "http://#{host_name}:#{@public_port}" + def self.teardown! + @container&.remove! + @container = nil + @api = nil end - def admin_url - "http://#{host_name}:#{@admin_port}" + attr_reader :public_port, :admin_port + + def host_name + return '127.0.0.1' unless QA::Runtime::Env.running_in_ci? || QA::Runtime::Env.qa_hostname + + "#{@name}.#{@network_cache}" end def wait_for_running diff --git a/qa/qa/specs/features/api/1_manage/import/import_github_repo_spec.rb b/qa/qa/specs/features/api/1_manage/import/import_github_repo_spec.rb index cd3efade4ee..a10e95a860c 100644 --- a/qa/qa/specs/features/api/1_manage/import/import_github_repo_spec.rb +++ b/qa/qa/specs/features/api/1_manage/import/import_github_repo_spec.rb @@ -9,10 +9,7 @@ module QA context 'when imported via api' do it 'imports project', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347670' do - imported_project.reload! # import the project - - expect { imported_project.project_import_status[:import_status] }.to eventually_eq('finished') - .within(max_duration: 240, sleep_interval: 1) + expect_project_import_finished_successfully aggregate_failures do verify_status_data diff --git a/qa/qa/specs/features/api/1_manage/integrations/webhook_events_spec.rb b/qa/qa/specs/features/api/1_manage/integrations/webhook_events_spec.rb index 72817d7ddb7..fb530967073 100644 --- a/qa/qa/specs/features/api/1_manage/integrations/webhook_events_spec.rb +++ b/qa/qa/specs/features/api/1_manage/integrations/webhook_events_spec.rb @@ -8,7 +8,7 @@ module QA end after(:context) do - Vendor::Smocker::SmockerApi.teardown! + Service::DockerRun::Smocker.teardown! end let(:session) { SecureRandom.hex(5) } @@ -72,7 +72,7 @@ module QA end it 'sends an issues and note event', - testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/349723' do + testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/349723' do setup_webhook(issues: true, note: true) do |webhook, smocker| issue = Resource::Issue.fabricate_via_api! do |issue_init| issue_init.project = webhook.project @@ -100,7 +100,7 @@ module QA end it 'sends a tag event', - testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/383577' do + testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/383577' do setup_webhook(tag_push: true) do |webhook, smocker| project_push = Resource::Repository::ProjectPush.fabricate! do |project_push| project_push.project = webhook.project @@ -128,7 +128,7 @@ module QA private def setup_webhook(**event_args) - Vendor::Smocker::SmockerApi.init(wait: 10) do |smocker| + Service::DockerRun::Smocker.init(wait: 10) do |smocker| smocker.register(session: session) webhook = Resource::ProjectWebHook.fabricate_via_api! do |hook| diff --git a/qa/qa/specs/features/api/3_create/merge_request/push_options_mwps_spec.rb b/qa/qa/specs/features/api/3_create/merge_request/push_options_mwps_spec.rb index 0a82c5d6736..9fed6787ade 100644 --- a/qa/qa/specs/features/api/3_create/merge_request/push_options_mwps_spec.rb +++ b/qa/qa/specs/features/api/3_create/merge_request/push_options_mwps_spec.rb @@ -18,7 +18,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.project = project runner.name = "runner-for-#{project.name}" runner.tags = ["runner-for-#{project.name}"] diff --git a/qa/qa/specs/features/api/4_verify/file_variable_spec.rb b/qa/qa/specs/features/api/4_verify/file_variable_spec.rb index 5395725e2c0..bd0ec13b1f8 100644 --- a/qa/qa/specs/features/api/4_verify/file_variable_spec.rb +++ b/qa/qa/specs/features/api/4_verify/file_variable_spec.rb @@ -12,7 +12,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.project = project runner.name = executor runner.tags = [executor] diff --git a/qa/qa/specs/features/api/4_verify/remove_runner_spec.rb b/qa/qa/specs/features/api/4_verify/remove_runner_spec.rb deleted file mode 100644 index 7aaaa7137ed..00000000000 --- a/qa/qa/specs/features/api/4_verify/remove_runner_spec.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -module QA - RSpec.describe 'Verify', :runner, product_group: :runner do - describe 'Runner removal' do - include Support::API - - let(:api_client) { Runtime::API::Client.new(:gitlab) } - let(:executor) { "qa-runner-#{Time.now.to_i}" } - let(:runner_tags) { ["runner-registration-e2e-test-#{Faker::Alphanumeric.alphanumeric(number: 8)}"] } - let!(:runner) do - Resource::Runner.fabricate! do |runner| - runner.name = executor - runner.tags = runner_tags - end - end - - # Removing a runner via the UI is covered by `spec/features/runners_spec.rb`` - it 'removes the runner', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/354828' do - runners_list = runner.runners_list - expect(runners_list.size).to eq(1) - expect(runners_list.first[:description]).to eq(executor) - - request = Runtime::API::Request.new(api_client, "runners/#{runner.id}") - response = delete(request.url) - expect(response.code).to eq(Support::API::HTTP_STATUS_NO_CONTENT) - expect(response.body).to be_empty - - expect(runner).to be_not_found_by_tags - end - end - end -end diff --git a/qa/qa/specs/features/browser_ui/1_manage/integrations/pipeline_status_emails_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/integrations/pipeline_status_emails_spec.rb index 4495d83f336..da49573b960 100644 --- a/qa/qa/specs/features/browser_ui/1_manage/integrations/pipeline_status_emails_spec.rb +++ b/qa/qa/specs/features/browser_ui/1_manage/integrations/pipeline_status_emails_spec.rb @@ -36,7 +36,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.project = project runner.name = executor runner.tags = [executor] diff --git a/qa/qa/specs/features/browser_ui/3_create/merge_request/merge_when_pipeline_succeeds_spec.rb b/qa/qa/specs/features/browser_ui/3_create/merge_request/merge_when_pipeline_succeeds_spec.rb index 257021b158a..1b82543a5d4 100644 --- a/qa/qa/specs/features/browser_ui/3_create/merge_request/merge_when_pipeline_succeeds_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/merge_request/merge_when_pipeline_succeeds_spec.rb @@ -14,7 +14,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.project = project runner.name = runner_name runner.tags = [runner_name] diff --git a/qa/qa/specs/features/browser_ui/3_create/pages/new_static_page_spec.rb b/qa/qa/specs/features/browser_ui/3_create/pages/new_static_page_spec.rb index 4dc93bdf112..a214af19fca 100644 --- a/qa/qa/specs/features/browser_ui/3_create/pages/new_static_page_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/pages/new_static_page_spec.rb @@ -34,7 +34,7 @@ module QA # Update spec along with Feature Flag Removal. Runtime::Feature.disable(:show_pages_in_deployments_menu) Flow::Login.sign_in - Resource::Runner.fabricate_via_api! do |runner| + Resource::ProjectRunner.fabricate_via_api! do |runner| runner.project = project runner.executor = :docker end diff --git a/qa/qa/specs/features/browser_ui/3_create/web_ide/web_terminal_spec.rb b/qa/qa/specs/features/browser_ui/3_create/web_ide/web_terminal_spec.rb index 24e6f929bab..599c34ed3db 100644 --- a/qa/qa/specs/features/browser_ui/3_create/web_ide/web_terminal_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/web_ide/web_terminal_spec.rb @@ -37,7 +37,7 @@ module QA ) end - @runner = Resource::Runner.fabricate_via_api! do |runner| + @runner = Resource::ProjectRunner.fabricate_via_api! do |runner| runner.project = project runner.name = "qa-runner-#{Time.now.to_i}" runner.tags = %w[web-ide] diff --git a/qa/qa/specs/features/browser_ui/4_verify/ci_variable/custom_variable_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/ci_variable/custom_variable_spec.rb index 5dda8b04805..2ae28d54242 100644 --- a/qa/qa/specs/features/browser_ui/4_verify/ci_variable/custom_variable_spec.rb +++ b/qa/qa/specs/features/browser_ui/4_verify/ci_variable/custom_variable_spec.rb @@ -14,7 +14,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.project = project runner.name = executor runner.tags = [executor] diff --git a/qa/qa/specs/features/browser_ui/4_verify/ci_variable/pipeline_with_protected_variable_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/ci_variable/pipeline_with_protected_variable_spec.rb index 48d6ed8dc49..a8ec0a1c835 100644 --- a/qa/qa/specs/features/browser_ui/4_verify/ci_variable/pipeline_with_protected_variable_spec.rb +++ b/qa/qa/specs/features/browser_ui/4_verify/ci_variable/pipeline_with_protected_variable_spec.rb @@ -14,7 +14,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.project = project runner.name = executor runner.tags = [executor] diff --git a/qa/qa/specs/features/browser_ui/4_verify/ci_variable/raw_variables_defined_in_yaml_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/ci_variable/raw_variables_defined_in_yaml_spec.rb index 9544b3d2155..81ccd36c514 100644 --- a/qa/qa/specs/features/browser_ui/4_verify/ci_variable/raw_variables_defined_in_yaml_spec.rb +++ b/qa/qa/specs/features/browser_ui/4_verify/ci_variable/raw_variables_defined_in_yaml_spec.rb @@ -13,7 +13,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.project = project runner.name = executor runner.tags = [executor] diff --git a/qa/qa/specs/features/browser_ui/4_verify/pipeline/create_and_process_pipeline_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/pipeline/create_and_process_pipeline_spec.rb index b6270c11ef6..49e9aab4035 100644 --- a/qa/qa/specs/features/browser_ui/4_verify/pipeline/create_and_process_pipeline_spec.rb +++ b/qa/qa/specs/features/browser_ui/4_verify/pipeline/create_and_process_pipeline_spec.rb @@ -15,7 +15,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.project = project runner.name = executor runner.tags = [executor] diff --git a/qa/qa/specs/features/browser_ui/4_verify/pipeline/include_multiple_files_from_a_project_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/pipeline/include_multiple_files_from_a_project_spec.rb index d773d0f36d0..5bbe09b3fb0 100644 --- a/qa/qa/specs/features/browser_ui/4_verify/pipeline/include_multiple_files_from_a_project_spec.rb +++ b/qa/qa/specs/features/browser_ui/4_verify/pipeline/include_multiple_files_from_a_project_spec.rb @@ -20,7 +20,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.project = project runner.name = executor runner.tags = [executor] diff --git a/qa/qa/specs/features/browser_ui/4_verify/pipeline/locked_artifacts_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/pipeline/locked_artifacts_spec.rb index ba1363d79c5..588d22275df 100644 --- a/qa/qa/specs/features/browser_ui/4_verify/pipeline/locked_artifacts_spec.rb +++ b/qa/qa/specs/features/browser_ui/4_verify/pipeline/locked_artifacts_spec.rb @@ -15,7 +15,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.project = project runner.name = executor runner.tags = [executor] diff --git a/qa/qa/specs/features/browser_ui/4_verify/pipeline/merge_mr_when_pipline_is_blocked_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/pipeline/merge_mr_when_pipline_is_blocked_spec.rb index 34f548a0e69..ddd91f97515 100644 --- a/qa/qa/specs/features/browser_ui/4_verify/pipeline/merge_mr_when_pipline_is_blocked_spec.rb +++ b/qa/qa/specs/features/browser_ui/4_verify/pipeline/merge_mr_when_pipline_is_blocked_spec.rb @@ -12,7 +12,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.project = project runner.name = executor runner.tags = [executor] diff --git a/qa/qa/specs/features/browser_ui/4_verify/pipeline/mr_event_rule_pipeline_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/pipeline/mr_event_rule_pipeline_spec.rb index 448da6d9d87..5dff2db6f2b 100644 --- a/qa/qa/specs/features/browser_ui/4_verify/pipeline/mr_event_rule_pipeline_spec.rb +++ b/qa/qa/specs/features/browser_ui/4_verify/pipeline/mr_event_rule_pipeline_spec.rb @@ -14,7 +14,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.project = project runner.name = executor runner.tags = [executor] diff --git a/qa/qa/specs/features/browser_ui/4_verify/pipeline/parent_child_pipelines_independent_relationship_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/pipeline/parent_child_pipelines_independent_relationship_spec.rb index a7ca7b82d1e..fef90a7c8fc 100644 --- a/qa/qa/specs/features/browser_ui/4_verify/pipeline/parent_child_pipelines_independent_relationship_spec.rb +++ b/qa/qa/specs/features/browser_ui/4_verify/pipeline/parent_child_pipelines_independent_relationship_spec.rb @@ -10,7 +10,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate_via_api! do |runner| + Resource::ProjectRunner.fabricate_via_api! do |runner| runner.project = project runner.name = project.name runner.tags = [project.name] diff --git a/qa/qa/specs/features/browser_ui/4_verify/pipeline/pass_dotenv_variables_to_downstream_via_bridge_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/pipeline/pass_dotenv_variables_to_downstream_via_bridge_spec.rb index fca34fc1f8e..7d1339d2c2d 100644 --- a/qa/qa/specs/features/browser_ui/4_verify/pipeline/pass_dotenv_variables_to_downstream_via_bridge_spec.rb +++ b/qa/qa/specs/features/browser_ui/4_verify/pipeline/pass_dotenv_variables_to_downstream_via_bridge_spec.rb @@ -22,10 +22,10 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::GroupRunner.fabricate! do |runner| runner.name = executor runner.tags = [executor] - runner.token = group.reload!.runners_token + runner.group = group end end diff --git a/qa/qa/specs/features/browser_ui/4_verify/pipeline/pipeline_with_image_pull_policy_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/pipeline/pipeline_with_image_pull_policy_spec.rb index d30d5b43568..aaaa11ef867 100644 --- a/qa/qa/specs/features/browser_ui/4_verify/pipeline/pipeline_with_image_pull_policy_spec.rb +++ b/qa/qa/specs/features/browser_ui/4_verify/pipeline/pipeline_with_image_pull_policy_spec.rb @@ -13,7 +13,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.project = project runner.name = runner_name runner.tags = [runner_name] diff --git a/qa/qa/specs/features/browser_ui/4_verify/pipeline/run_pipeline_with_manual_jobs_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/pipeline/run_pipeline_with_manual_jobs_spec.rb index 4223caaafef..4294235a8b1 100644 --- a/qa/qa/specs/features/browser_ui/4_verify/pipeline/run_pipeline_with_manual_jobs_spec.rb +++ b/qa/qa/specs/features/browser_ui/4_verify/pipeline/run_pipeline_with_manual_jobs_spec.rb @@ -13,7 +13,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.project = project runner.name = executor runner.tags = [executor] diff --git a/qa/qa/specs/features/browser_ui/4_verify/pipeline/trigger_child_pipeline_with_manual_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/pipeline/trigger_child_pipeline_with_manual_spec.rb index c1d996df925..3361ab98bda 100644 --- a/qa/qa/specs/features/browser_ui/4_verify/pipeline/trigger_child_pipeline_with_manual_spec.rb +++ b/qa/qa/specs/features/browser_ui/4_verify/pipeline/trigger_child_pipeline_with_manual_spec.rb @@ -12,7 +12,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.project = project runner.name = executor runner.tags = [executor] diff --git a/qa/qa/specs/features/browser_ui/4_verify/pipeline/trigger_matrix_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/pipeline/trigger_matrix_spec.rb index 83283c5d8e3..bd656142989 100644 --- a/qa/qa/specs/features/browser_ui/4_verify/pipeline/trigger_matrix_spec.rb +++ b/qa/qa/specs/features/browser_ui/4_verify/pipeline/trigger_matrix_spec.rb @@ -12,7 +12,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.project = project runner.name = executor runner.tags = [executor] diff --git a/qa/qa/specs/features/browser_ui/4_verify/pipeline/update_ci_file_with_pipeline_editor_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/pipeline/update_ci_file_with_pipeline_editor_spec.rb index 1f49c7a3663..a749da4608a 100644 --- a/qa/qa/specs/features/browser_ui/4_verify/pipeline/update_ci_file_with_pipeline_editor_spec.rb +++ b/qa/qa/specs/features/browser_ui/4_verify/pipeline/update_ci_file_with_pipeline_editor_spec.rb @@ -12,7 +12,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate_via_api! do |runner| + Resource::ProjectRunner.fabricate_via_api! do |runner| runner.project = project runner.name = random_test_string runner.tags = [random_test_string] diff --git a/qa/qa/specs/features/browser_ui/4_verify/runner/register_runner_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/runner/register_runner_spec.rb index 24c49be13bb..e141bac5e3f 100644 --- a/qa/qa/specs/features/browser_ui/4_verify/runner/register_runner_spec.rb +++ b/qa/qa/specs/features/browser_ui/4_verify/runner/register_runner_spec.rb @@ -5,7 +5,7 @@ module QA describe 'Runner registration' do let(:executor) { "qa-runner-#{Time.now.to_i}" } let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.name = executor runner.tags = ['e2e-test'] end diff --git a/qa/qa/specs/features/browser_ui/4_verify/testing/endpoint_coverage_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/testing/endpoint_coverage_spec.rb index 0166c53ffd5..d4fee70fbf3 100644 --- a/qa/qa/specs/features/browser_ui/4_verify/testing/endpoint_coverage_spec.rb +++ b/qa/qa/specs/features/browser_ui/4_verify/testing/endpoint_coverage_spec.rb @@ -18,7 +18,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate_via_api! do |runner| + Resource::ProjectRunner.fabricate_via_api! do |runner| runner.project = project runner.name = project.name runner.tags = [project.name] diff --git a/qa/qa/specs/features/browser_ui/4_verify/testing/view_code_coverage_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/testing/view_code_coverage_spec.rb index 2a4852a2b8b..b45ccfa5433 100644 --- a/qa/qa/specs/features/browser_ui/4_verify/testing/view_code_coverage_spec.rb +++ b/qa/qa/specs/features/browser_ui/4_verify/testing/view_code_coverage_spec.rb @@ -5,7 +5,7 @@ module QA describe 'Code coverage statistics' do let(:executor) { "qa-runner-#{Time.now.to_i}" } let(:runner) do - Resource::Runner.fabricate_via_api! do |runner| + Resource::ProjectRunner.fabricate_via_api! do |runner| runner.name = executor runner.tags = ['e2e-test'] end diff --git a/qa/qa/specs/features/browser_ui/5_package/container_registry/container_registry_omnibus_spec.rb b/qa/qa/specs/features/browser_ui/5_package/container_registry/container_registry_omnibus_spec.rb index c57a5c27dd2..800324afc58 100644 --- a/qa/qa/specs/features/browser_ui/5_package/container_registry/container_registry_omnibus_spec.rb +++ b/qa/qa/specs/features/browser_ui/5_package/container_registry/container_registry_omnibus_spec.rb @@ -28,7 +28,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.name = "qa-runner-#{Time.now.to_i}" runner.tags = ["runner-for-#{project.name}"] runner.executor = :docker diff --git a/qa/qa/specs/features/browser_ui/5_package/dependency_proxy/dependency_proxy_spec.rb b/qa/qa/specs/features/browser_ui/5_package/dependency_proxy/dependency_proxy_spec.rb index 978867d5cf1..a0d283fd7ad 100644 --- a/qa/qa/specs/features/browser_ui/5_package/dependency_proxy/dependency_proxy_spec.rb +++ b/qa/qa/specs/features/browser_ui/5_package/dependency_proxy/dependency_proxy_spec.rb @@ -14,7 +14,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.name = "qa-runner-#{Time.now.to_i}" runner.tags = ["runner-for-#{project.name}"] runner.executor = :docker diff --git a/qa/qa/specs/features/browser_ui/5_package/infrastructure_registry/terraform_module_registry_spec.rb b/qa/qa/specs/features/browser_ui/5_package/infrastructure_registry/terraform_module_registry_spec.rb index a80e154a969..fe320f10416 100644 --- a/qa/qa/specs/features/browser_ui/5_package/infrastructure_registry/terraform_module_registry_spec.rb +++ b/qa/qa/specs/features/browser_ui/5_package/infrastructure_registry/terraform_module_registry_spec.rb @@ -16,12 +16,11 @@ module QA end let(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.name = "qa-runner-#{Time.now.to_i}" runner.tags = ["runner-for-#{imported_project.name}"] runner.executor = :docker runner.project = imported_project - runner.token = group.reload!.runners_token end end diff --git a/qa/qa/specs/features/browser_ui/5_package/package_registry/composer_registry_spec.rb b/qa/qa/specs/features/browser_ui/5_package/package_registry/composer_registry_spec.rb index ab4fb21f19a..0dce0022b38 100644 --- a/qa/qa/specs/features/browser_ui/5_package/package_registry/composer_registry_spec.rb +++ b/qa/qa/specs/features/browser_ui/5_package/package_registry/composer_registry_spec.rb @@ -20,7 +20,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.name = "qa-runner-#{Time.now.to_i}" runner.tags = ["runner-for-#{project.name}"] runner.executor = :docker diff --git a/qa/qa/specs/features/browser_ui/5_package/package_registry/conan_repository_spec.rb b/qa/qa/specs/features/browser_ui/5_package/package_registry/conan_repository_spec.rb index 687d9f710fb..39c2121331d 100644 --- a/qa/qa/specs/features/browser_ui/5_package/package_registry/conan_repository_spec.rb +++ b/qa/qa/specs/features/browser_ui/5_package/package_registry/conan_repository_spec.rb @@ -24,7 +24,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.name = "qa-runner-#{Time.now.to_i}" runner.tags = ["runner-for-#{project.name}"] runner.executor = :docker diff --git a/qa/qa/specs/features/browser_ui/5_package/package_registry/generic_repository_spec.rb b/qa/qa/specs/features/browser_ui/5_package/package_registry/generic_repository_spec.rb index 820571593a6..d6fb52cfea9 100644 --- a/qa/qa/specs/features/browser_ui/5_package/package_registry/generic_repository_spec.rb +++ b/qa/qa/specs/features/browser_ui/5_package/package_registry/generic_repository_spec.rb @@ -20,7 +20,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.name = "qa-runner-#{Time.now.to_i}" runner.tags = ["runner-for-#{project.name}"] runner.executor = :docker diff --git a/qa/qa/specs/features/browser_ui/5_package/package_registry/maven/maven_project_level_spec.rb b/qa/qa/specs/features/browser_ui/5_package/package_registry/maven/maven_project_level_spec.rb index 46c165ed806..c69b672a2ec 100644 --- a/qa/qa/specs/features/browser_ui/5_package/package_registry/maven/maven_project_level_spec.rb +++ b/qa/qa/specs/features/browser_ui/5_package/package_registry/maven/maven_project_level_spec.rb @@ -33,7 +33,7 @@ module QA end let(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.name = "qa-runner-#{Time.now.to_i}" runner.tags = ["runner-for-#{package_project.name}"] runner.executor = :docker @@ -173,11 +173,11 @@ module QA end let(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::GroupRunner.fabricate! do |runner| runner.name = "qa-runner-#{Time.now.to_i}" runner.tags = ["runner-for-#{imported_project.name}"] runner.executor = :docker - runner.token = group.reload!.runners_token + runner.group = group end end diff --git a/qa/qa/specs/features/browser_ui/5_package/package_registry/npm/npm_instance_level_spec.rb b/qa/qa/specs/features/browser_ui/5_package/package_registry/npm/npm_instance_level_spec.rb index e209fc55e35..92dee63e37a 100644 --- a/qa/qa/specs/features/browser_ui/5_package/package_registry/npm/npm_instance_level_spec.rb +++ b/qa/qa/specs/features/browser_ui/5_package/package_registry/npm/npm_instance_level_spec.rb @@ -45,11 +45,11 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::GroupRunner.fabricate! do |runner| runner.name = "qa-runner-#{Time.now.to_i}" runner.tags = ["runner-for-#{project.group.name}"] runner.executor = :docker - runner.token = project.group.reload!.runners_token + runner.group = project.group end end diff --git a/qa/qa/specs/features/browser_ui/5_package/package_registry/npm/npm_project_level_spec.rb b/qa/qa/specs/features/browser_ui/5_package/package_registry/npm/npm_project_level_spec.rb index d1aaa05c85a..29cdd5b9362 100644 --- a/qa/qa/specs/features/browser_ui/5_package/package_registry/npm/npm_project_level_spec.rb +++ b/qa/qa/specs/features/browser_ui/5_package/package_registry/npm/npm_project_level_spec.rb @@ -39,7 +39,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.name = "qa-runner-#{Time.now.to_i}" runner.tags = ["runner-for-#{project.name}"] runner.executor = :docker diff --git a/qa/qa/specs/features/browser_ui/5_package/package_registry/nuget/nuget_group_level_spec.rb b/qa/qa/specs/features/browser_ui/5_package/package_registry/nuget/nuget_group_level_spec.rb index 6466491a6e1..0e1ac4d861d 100644 --- a/qa/qa/specs/features/browser_ui/5_package/package_registry/nuget/nuget_group_level_spec.rb +++ b/qa/qa/specs/features/browser_ui/5_package/package_registry/nuget/nuget_group_level_spec.rb @@ -51,11 +51,11 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::GroupRunner.fabricate! do |runner| runner.name = "qa-runner-#{Time.now.to_i}" runner.tags = ["runner-for-#{project.group.name}"] runner.executor = :docker - runner.token = project.group.reload!.runners_token + runner.group = project.group end end diff --git a/qa/qa/specs/features/browser_ui/5_package/package_registry/nuget/nuget_project_level_spec.rb b/qa/qa/specs/features/browser_ui/5_package/package_registry/nuget/nuget_project_level_spec.rb index 442deb1eb4e..038decddd96 100644 --- a/qa/qa/specs/features/browser_ui/5_package/package_registry/nuget/nuget_project_level_spec.rb +++ b/qa/qa/specs/features/browser_ui/5_package/package_registry/nuget/nuget_project_level_spec.rb @@ -36,7 +36,7 @@ product_group: :package_registry do end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.name = "qa-runner-#{Time.now.to_i}" runner.tags = ["runner-for-#{project.name}"] runner.executor = :docker diff --git a/qa/qa/specs/features/browser_ui/5_package/package_registry/pypi_repository_spec.rb b/qa/qa/specs/features/browser_ui/5_package/package_registry/pypi_repository_spec.rb index fddb7fb6ebc..12e9d3e995f 100644 --- a/qa/qa/specs/features/browser_ui/5_package/package_registry/pypi_repository_spec.rb +++ b/qa/qa/specs/features/browser_ui/5_package/package_registry/pypi_repository_spec.rb @@ -21,7 +21,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.name = "qa-runner-#{Time.now.to_i}" runner.tags = ["runner-for-#{project.name}"] runner.executor = :docker diff --git a/qa/qa/specs/features/browser_ui/5_package/package_registry/rubygems_registry_spec.rb b/qa/qa/specs/features/browser_ui/5_package/package_registry/rubygems_registry_spec.rb index 284130fa92b..b80eb3a688e 100644 --- a/qa/qa/specs/features/browser_ui/5_package/package_registry/rubygems_registry_spec.rb +++ b/qa/qa/specs/features/browser_ui/5_package/package_registry/rubygems_registry_spec.rb @@ -21,7 +21,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.name = "qa-runner-#{Time.now.to_i}" runner.tags = ["runner-for-#{project.name}"] runner.executor = :docker diff --git a/qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb b/qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb index 3f91d120fdd..a504b694308 100644 --- a/qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb +++ b/qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb @@ -15,7 +15,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate_via_api! do |resource| + Resource::ProjectRunner.fabricate_via_api! do |resource| resource.project = project resource.name = runner_name resource.tags = [runner_name] diff --git a/qa/qa/specs/features/shared_contexts/import/github_import_shared_context.rb b/qa/qa/specs/features/shared_contexts/import/github_import_shared_context.rb index 27d94b04cde..481a09f601b 100644 --- a/qa/qa/specs/features/shared_contexts/import/github_import_shared_context.rb +++ b/qa/qa/specs/features/shared_contexts/import/github_import_shared_context.rb @@ -35,8 +35,44 @@ module QA end end + let(:smocker_host) { ENV["QA_SMOCKER_HOST"] } + let(:smocker) do + Vendor::Smocker::SmockerApi.new( + host: smocker_host, + public_port: 443, + admin_port: 8081, + tls: true + ) + end + + let(:mocks_path) { File.join(Runtime::Path.fixtures_path, "mocks", "import") } + before do + set_mocks group.add_member(user, Resource::Members::AccessLevel::MAINTAINER) end + + def expect_project_import_finished_successfully + imported_project.reload! # import the project + + status = nil + Support::Retrier.retry_until(max_duration: 240, sleep_interval: 1, raise_on_failure: false) do + status = imported_project.project_import_status[:import_status] + %w[finished failed].include?(status) + end + + # finished status means success, all other statuses are considered to fail the test + expect(status).to eq('finished'), "Expected import to finish successfully, but status was: #{status}" + end + + # Setup github mocked responses if mock server host is present + # + # @return [void] + def set_mocks + return Runtime::Logger.warn("Mock host is not set, skipping github response setup") unless smocker_host + + smocker.reset + smocker.register(File.read(File.join(mocks_path, "github.yml"))) + end end end diff --git a/qa/qa/specs/features/shared_contexts/merge_train_spec_with_user_prep.rb b/qa/qa/specs/features/shared_contexts/merge_train_spec_with_user_prep.rb index 9d1a37cb0b8..8af5dc5463e 100644 --- a/qa/qa/specs/features/shared_contexts/merge_train_spec_with_user_prep.rb +++ b/qa/qa/specs/features/shared_contexts/merge_train_spec_with_user_prep.rb @@ -20,7 +20,7 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::ProjectRunner.fabricate! do |runner| runner.project = project runner.name = executor runner.tags = [executor] diff --git a/qa/qa/specs/features/shared_contexts/packages_registry_shared_context.rb b/qa/qa/specs/features/shared_contexts/packages_registry_shared_context.rb index 73a6c2bd99e..a611a801b11 100644 --- a/qa/qa/specs/features/shared_contexts/packages_registry_shared_context.rb +++ b/qa/qa/specs/features/shared_contexts/packages_registry_shared_context.rb @@ -28,11 +28,11 @@ module QA end let(:runner) do - Resource::Runner.fabricate! do |runner| + Resource::GroupRunner.fabricate! do |runner| runner.name = "qa-runner-#{Time.now.to_i}" runner.tags = ["runner-for-#{package_project.group.name}"] runner.executor = :docker - runner.token = package_project.group.reload!.runners_token + runner.group = package_project.group end end diff --git a/qa/qa/specs/features/shared_contexts/variable_inheritance_shared_context.rb b/qa/qa/specs/features/shared_contexts/variable_inheritance_shared_context.rb index 45caeced35c..2219031e9c6 100644 --- a/qa/qa/specs/features/shared_contexts/variable_inheritance_shared_context.rb +++ b/qa/qa/specs/features/shared_contexts/variable_inheritance_shared_context.rb @@ -37,8 +37,8 @@ module QA end let!(:runner) do - Resource::Runner.fabricate! do |runner| - runner.token = group.reload!.runners_token + Resource::GroupRunner.fabricate! do |runner| + runner.group = group runner.name = random_string runner.tags = [random_string] end diff --git a/qa/qa/vendor/smocker/smocker_api.rb b/qa/qa/vendor/smocker/smocker_api.rb index 230656776b7..359d1497825 100644 --- a/qa/qa/vendor/smocker/smocker_api.rb +++ b/qa/qa/vendor/smocker/smocker_api.rb @@ -17,36 +17,21 @@ module QA body: '{}' YAML - # @param wait [Integer] seconds to wait for server - # @yieldparam [SmockerApi] the api object ready for interaction - def self.init(**wait_args) - if @container.nil? - @container = Service::DockerRun::Smocker.new - @container.register! - @container.wait_for_running - end - - yield new(@container, **wait_args) - end - - def self.teardown! - @container&.remove! - @container = nil - end - - def initialize(container, **wait_args) - @container = container - wait_for_ready(**wait_args) + def initialize(host:, public_port: 8080, admin_port: 8081, tls: false) + @host = host + @public_port = public_port + @admin_port = admin_port + @scheme = tls ? "https" : "http" end # @return [String] Base url of mock endpoint def base_url - @container.base_url + @base_url ||= "#{scheme}://#{host}:#{public_port}" end # @return [String] Url of admin endpoint def admin_url - @container.admin_url + @admin_url ||= "#{scheme}://#{host}:#{admin_port}" end # @param endpoint [String] path for mock endpoint @@ -130,6 +115,8 @@ module QA private + attr_reader :host, :public_port, :admin_port, :scheme + def build_params(**args) args.each_with_object([]) do |(k, v), memo| memo << "#{k}=#{v}" if v diff --git a/qa/spec/spec_helper.rb b/qa/spec/spec_helper.rb index 95970800a4e..84d3199a274 100644 --- a/qa/spec/spec_helper.rb +++ b/qa/spec/spec_helper.rb @@ -3,3 +3,4 @@ require_relative '../qa' require_relative 'scenario_shared_examples' +require_relative('../../jh/qa/spec/spec_helper') if GitlabEdition.jh? diff --git a/spec/frontend/boards/board_card_inner_spec.js b/spec/frontend/boards/board_card_inner_spec.js index 0df25604d5b..2c8e6306431 100644 --- a/spec/frontend/boards/board_card_inner_spec.js +++ b/spec/frontend/boards/board_card_inner_spec.js @@ -1,7 +1,7 @@ import { GlLabel, GlLoadingIcon, GlTooltip } from '@gitlab/ui'; import { range } from 'lodash'; +import Vue, { nextTick } from 'vue'; import Vuex from 'vuex'; -import { nextTick } from 'vue'; import setWindowLocation from 'helpers/set_window_location_helper'; import { createMockDirective, getBinding } from 'helpers/vue_mock_directive'; import { mountExtended } from 'helpers/vue_test_utils_helper'; @@ -17,6 +17,8 @@ import { mockLabelList, mockIssue, mockIssueFullPath } from './mock_data'; jest.mock('~/lib/utils/url_utility'); jest.mock('~/boards/eventhub'); +Vue.use(Vuex); + describe('Board card component', () => { const user = { id: 1, @@ -52,9 +54,8 @@ describe('Board card component', () => { const performSearchMock = jest.fn(); - const createStore = ({ isProjectBoard = false } = {}) => { + const createStore = () => { store = new Vuex.Store({ - ...defaultStore, actions: { performSearch: performSearchMock, }, @@ -62,14 +63,10 @@ describe('Board card component', () => { ...defaultStore.state, isShowingLabels: true, }, - getters: { - isGroupBoard: () => true, - isProjectBoard: () => isProjectBoard, - }, }); }; - const createWrapper = ({ props = {}, isEpicBoard = false } = {}) => { + const createWrapper = ({ props = {}, isEpicBoard = false, isGroupBoard = true } = {}) => { wrapper = mountExtended(BoardCardInner, { store, propsData: { @@ -97,6 +94,7 @@ describe('Board card component', () => { scopedLabelsAvailable: false, isEpicBoard, issuableType: issuableTypes.issue, + isGroupBoard, }, }); }; @@ -164,8 +162,8 @@ describe('Board card component', () => { }); it('does not render item reference path', () => { - createStore({ isProjectBoard: true }); - createWrapper(); + createStore(); + createWrapper({ isGroupBoard: false }); expect(wrapper.find('.board-card-number').text()).not.toContain(mockIssueFullPath); }); diff --git a/spec/frontend/boards/board_list_helper.js b/spec/frontend/boards/board_list_helper.js index c1d934cf274..af5509fd2e9 100644 --- a/spec/frontend/boards/board_list_helper.js +++ b/spec/frontend/boards/board_list_helper.js @@ -58,8 +58,6 @@ export default function createComponent({ ...state, }, getters: { - isGroupBoard: () => false, - isProjectBoard: () => true, isEpicBoard: () => false, ...getters, }, @@ -104,6 +102,8 @@ export default function createComponent({ canAdminList: true, isIssueBoard: true, isEpicBoard: false, + isGroupBoard: false, + isProjectBoard: true, ...provide, }, stubs, diff --git a/spec/frontend/boards/components/board_card_spec.js b/spec/frontend/boards/components/board_card_spec.js index 71a10fe7114..cd3882dc9ee 100644 --- a/spec/frontend/boards/components/board_card_spec.js +++ b/spec/frontend/boards/components/board_card_spec.js @@ -29,9 +29,6 @@ describe('Board card', () => { ...initialState, }, actions: mockActions, - getters: { - isProjectBoard: () => false, - }, }); }; @@ -62,6 +59,8 @@ describe('Board card', () => { scopedLabelsAvailable: false, isEpicBoard: false, issuableType: 'issue', + isProjectBoard: false, + isGroupBoard: true, ...provide, }, }); diff --git a/spec/frontend/boards/components/board_content_sidebar_spec.js b/spec/frontend/boards/components/board_content_sidebar_spec.js index cab00390901..51c42b48535 100644 --- a/spec/frontend/boards/components/board_content_sidebar_spec.js +++ b/spec/frontend/boards/components/board_content_sidebar_spec.js @@ -34,7 +34,6 @@ describe('BoardContentSidebar', () => { groupPathForActiveIssue: () => mockIssueGroupPath, projectPathForActiveIssue: () => mockIssueProjectPath, isSidebarOpen: () => true, - isGroupBoard: () => false, ...mockGetters, }, actions: mockActions, @@ -55,6 +54,7 @@ describe('BoardContentSidebar', () => { rootPath: '/', groupId: 1, issuableType: issuableTypes.issue, + isGroupBoard: false, }, store, stubs: { diff --git a/spec/frontend/boards/components/board_content_spec.js b/spec/frontend/boards/components/board_content_spec.js index 82e7ab48e7d..98f66ed804a 100644 --- a/spec/frontend/boards/components/board_content_spec.js +++ b/spec/frontend/boards/components/board_content_spec.js @@ -71,6 +71,7 @@ describe('BoardContent', () => { issuableType, isIssueBoard, isEpicBoard, + isGroupBoard: true, isApolloBoard, }, store, diff --git a/spec/frontend/boards/components/board_form_spec.js b/spec/frontend/boards/components/board_form_spec.js index fdc16b46167..f8154145d43 100644 --- a/spec/frontend/boards/components/board_form_spec.js +++ b/spec/frontend/boards/components/board_form_spec.js @@ -53,10 +53,6 @@ describe('BoardForm', () => { const setErrorMock = jest.fn(); const store = new Vuex.Store({ - getters: { - isGroupBoard: () => true, - isProjectBoard: () => false, - }, actions: { setBoard: setBoardMock, setError: setErrorMock, @@ -73,6 +69,8 @@ describe('BoardForm', () => { }, provide: { boardBaseUrl: 'root', + isGroupBoard: true, + isProjectBoard: false, }, mocks: { $apollo: { diff --git a/spec/frontend/boards/components/board_new_issue_spec.js b/spec/frontend/boards/components/board_new_issue_spec.js index 398caa4de62..c3e69ba0e40 100644 --- a/spec/frontend/boards/components/board_new_issue_spec.js +++ b/spec/frontend/boards/components/board_new_issue_spec.js @@ -16,7 +16,8 @@ const mockActions = { addListNewIssue: addListNewIssuesSpy }; const createComponent = ({ state = { selectedProject: mockGroupProjects[0] }, actions = mockActions, - getters = { isGroupBoard: () => true, getBoardItemsByList: () => () => [] }, + getters = { getBoardItemsByList: () => () => [] }, + isGroupBoard = true, } = {}) => shallowMount(BoardNewIssue, { store: new Vuex.Store({ @@ -32,6 +33,7 @@ const createComponent = ({ fullPath: mockGroupProjects[0].fullPath, weightFeatureAvailable: false, boardWeight: null, + isGroupBoard, }, stubs: { BoardNewItem, @@ -85,9 +87,9 @@ describe('Issue boards new issue form', () => { beforeEach(() => { wrapper = createComponent({ getters: { - isGroupBoard: () => true, getBoardItemsByList: () => () => [mockIssue, mockIssue2], }, + isGroupBoard: true, }); }); @@ -129,7 +131,7 @@ describe('Issue boards new issue form', () => { describe('when in project issue board', () => { beforeEach(() => { wrapper = createComponent({ - getters: { isGroupBoard: () => false }, + isGroupBoard: false, }); }); diff --git a/spec/frontend/boards/components/board_top_bar_spec.js b/spec/frontend/boards/components/board_top_bar_spec.js index 08b5042f70f..af492145eb0 100644 --- a/spec/frontend/boards/components/board_top_bar_spec.js +++ b/spec/frontend/boards/components/board_top_bar_spec.js @@ -33,6 +33,7 @@ describe('BoardTopBar', () => { boardType: 'group', releasesFetchPath: '/releases', isIssueBoard: true, + isGroupBoard: true, ...provide, }, stubs: { IssueBoardFilteredSearch }, diff --git a/spec/frontend/boards/components/boards_selector_spec.js b/spec/frontend/boards/components/boards_selector_spec.js index 9f7d36330b0..7b61ca5e6fd 100644 --- a/spec/frontend/boards/components/boards_selector_spec.js +++ b/spec/frontend/boards/components/boards_selector_spec.js @@ -10,7 +10,6 @@ import groupBoardsQuery from '~/boards/graphql/group_boards.query.graphql'; import projectBoardsQuery from '~/boards/graphql/project_boards.query.graphql'; import groupRecentBoardsQuery from '~/boards/graphql/group_recent_boards.query.graphql'; import projectRecentBoardsQuery from '~/boards/graphql/project_recent_boards.query.graphql'; -import defaultStore from '~/boards/stores'; import createMockApollo from 'helpers/mock_apollo_helper'; import { mountExtended } from 'helpers/vue_test_utils_helper'; import { @@ -28,23 +27,19 @@ import { const throttleDuration = 1; Vue.use(VueApollo); +Vue.use(Vuex); describe('BoardsSelector', () => { let wrapper; let fakeApollo; let store; - const createStore = ({ isGroupBoard = false, isProjectBoard = false } = {}) => { + const createStore = () => { store = new Vuex.Store({ - ...defaultStore, actions: { setError: jest.fn(), setBoardConfig: jest.fn(), }, - getters: { - isGroupBoard: () => isGroupBoard, - isProjectBoard: () => isProjectBoard, - }, state: { board: mockBoard, }, @@ -86,6 +81,7 @@ describe('BoardsSelector', () => { projectBoardsQueryHandler = projectBoardsQueryHandlerSuccess, projectRecentBoardsQueryHandler = projectRecentBoardsQueryHandlerSuccess, isGroupBoard = false, + isProjectBoard = false, } = {}) => { fakeApollo = createMockApollo([ [projectBoardsQuery, projectBoardsQueryHandler], @@ -110,6 +106,8 @@ describe('BoardsSelector', () => { scopedIssueBoardFeatureEnabled: true, weights: [], boardType: isGroupBoard ? 'group' : 'project', + isGroupBoard, + isProjectBoard, }, }); }; @@ -121,8 +119,8 @@ describe('BoardsSelector', () => { describe('template', () => { beforeEach(() => { - createStore({ isProjectBoard: true }); - createComponent(); + createStore(); + createComponent({ isProjectBoard: true }); }); describe('loading', () => { @@ -230,11 +228,11 @@ describe('BoardsSelector', () => { ${BoardType.group} | ${groupBoardsQueryHandlerSuccess} | ${projectBoardsQueryHandlerSuccess} ${BoardType.project} | ${projectBoardsQueryHandlerSuccess} | ${groupBoardsQueryHandlerSuccess} `('fetches $boardType boards', async ({ boardType, queryHandler, notCalledHandler }) => { - createStore({ - isProjectBoard: boardType === BoardType.project, + createStore(); + createComponent({ isGroupBoard: boardType === BoardType.group, + isProjectBoard: boardType === BoardType.project, }); - createComponent({ isGroupBoard: boardType === BoardType.group }); await nextTick(); diff --git a/spec/frontend/boards/components/issue_board_filtered_search_spec.js b/spec/frontend/boards/components/issue_board_filtered_search_spec.js index 513561307cd..57a30ddc512 100644 --- a/spec/frontend/boards/components/issue_board_filtered_search_spec.js +++ b/spec/frontend/boards/components/issue_board_filtered_search_spec.js @@ -18,7 +18,7 @@ describe('IssueBoardFilter', () => { isSignedIn, releasesFetchPath: '/releases', fullPath: 'gitlab-org', - boardType: 'group', + isGroupBoard: true, }, }); }; diff --git a/spec/frontend/boards/stores/getters_spec.js b/spec/frontend/boards/stores/getters_spec.js index 304f2aad98e..c86a256bd96 100644 --- a/spec/frontend/boards/stores/getters_spec.js +++ b/spec/frontend/boards/stores/getters_spec.js @@ -12,42 +12,6 @@ import { } from '../mock_data'; describe('Boards - Getters', () => { - describe('isGroupBoard', () => { - it('returns true when boardType on state is group', () => { - const state = { - boardType: 'group', - }; - - expect(getters.isGroupBoard(state)).toBe(true); - }); - - it('returns false when boardType on state is not group', () => { - const state = { - boardType: 'project', - }; - - expect(getters.isGroupBoard(state)).toBe(false); - }); - }); - - describe('isProjectBoard', () => { - it('returns true when boardType on state is project', () => { - const state = { - boardType: 'project', - }; - - expect(getters.isProjectBoard(state)).toBe(true); - }); - - it('returns false when boardType on state is not project', () => { - const state = { - boardType: 'group', - }; - - expect(getters.isProjectBoard(state)).toBe(false); - }); - }); - describe('isSidebarOpen', () => { it('returns true when activeId is not equal to 0', () => { const state = { diff --git a/spec/lib/gitlab/ci/parsers/sbom/validators/cyclonedx_schema_validator_spec.rb b/spec/lib/gitlab/ci/parsers/sbom/validators/cyclonedx_schema_validator_spec.rb index 712dc00ec7a..acb7c122bcd 100644 --- a/spec/lib/gitlab/ci/parsers/sbom/validators/cyclonedx_schema_validator_spec.rb +++ b/spec/lib/gitlab/ci/parsers/sbom/validators/cyclonedx_schema_validator_spec.rb @@ -62,6 +62,47 @@ RSpec.describe Gitlab::Ci::Parsers::Sbom::Validators::CyclonedxSchemaValidator, it { is_expected.to be_valid } end + context 'when components have licenses' do + let(:components) do + [ + { + "type" => "library", + "name" => "activesupport", + "version" => "5.1.4", + "licenses" => [ + { "license" => { "id" => "MIT" } } + ] + } + ] + end + + it { is_expected.to be_valid } + end + + context 'when components have a signature' do + let(:components) do + [ + { + "type" => "library", + "name" => "activesupport", + "version" => "5.1.4", + "signature" => { + "algorithm" => "ES256", + "publicKey" => { + "kty" => "EC", + "crv" => "P-256", + "x" => "6BKxpty8cI-exDzCkh-goU6dXq3MbcY0cd1LaAxiNrU", + "y" => "mCbcvUzm44j3Lt2b5BPyQloQ91tf2D2V-gzeUxWaUdg" + }, + "value" => "ybT1qz5zHNi4Ndc6y7Zhamuf51IqXkPkZwjH1XcC-KSuBiaQplTw6Jasf2MbCLg3CF7PAdnMO__WSLwvI5r2jA" + } + } + ] + end + + it { is_expected.to be_valid } + end + context "when components are not valid" do let(:components) do [ |