devdraft 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +160 -191
- data/Rakefile +2 -0
- data/devdraft-1.0.0.gem +0 -0
- data/{devdraft_ai_sdk.gemspec → devdraft.gemspec} +15 -11
- data/docs/APIHealthApi.md +82 -30
- data/docs/AggregatedBalanceResponse.md +19 -6
- data/docs/AllBalancesResponse.md +19 -6
- data/docs/AppBalancesApi.md +125 -65
- data/docs/BridgeFiatPaymentRail.md +15 -0
- data/docs/BridgePaymentRail.md +12 -3
- data/docs/CreateBankPaymentIntentDto.md +49 -21
- data/docs/CreateCustomerDto.md +25 -9
- data/docs/CreateDirectBankTransferDto.md +29 -11
- data/docs/CreateDirectWalletTransferDto.md +21 -7
- data/docs/CreateExternalBankTransferDto.md +40 -0
- data/docs/CreateExternalStablecoinTransferDto.md +28 -0
- data/docs/CreateInvoiceDto.md +45 -19
- data/docs/CreateLiquidationAddressDto.md +43 -18
- data/docs/CreatePaymentLinkDto.md +53 -28
- data/docs/CreateStablePaymentIntentDto.md +43 -18
- data/docs/CreateStablecoinConversionDto.md +23 -8
- data/docs/CreateTaxDto.md +26 -0
- data/docs/CreateWebhookDto.md +23 -8
- data/docs/CustomerStatus.md +12 -3
- data/docs/CustomerType.md +15 -0
- data/docs/CustomersApi.md +187 -114
- data/docs/DestinationCurrency.md +12 -3
- data/docs/ExchangeRateResponseDto.md +25 -9
- data/docs/ExchangeRatesApi.md +130 -72
- data/docs/FiatCurrency.md +12 -3
- data/docs/HealthResponseDto.md +25 -9
- data/docs/InvoiceProductDto.md +17 -5
- data/docs/InvoicesApi.md +177 -104
- data/docs/LiquidationAddressResponseDto.md +41 -17
- data/docs/LiquidationAddressesApi.md +115 -61
- data/docs/PaymentIntentsApi.md +93 -57
- data/docs/PaymentLinkProductDto.md +17 -5
- data/docs/PaymentLinksApi.md +175 -102
- data/docs/PaymentRequestDto.md +21 -7
- data/docs/PaymentResponseDto.md +23 -8
- data/docs/ProductsApi.md +307 -194
- data/docs/PublicHealthResponseDto.md +19 -6
- data/docs/RefundResponseDto.md +23 -8
- data/docs/StableCoinCurrency.md +12 -3
- data/docs/TaxControllerCreate201Response.md +30 -0
- data/docs/TaxControllerDeleteWithoutId400Response.md +22 -0
- data/docs/TaxControllerUpdateWithoutId400Response.md +22 -0
- data/docs/TaxesApi.md +374 -122
- data/docs/TestPaymentsApi.md +150 -60
- data/docs/TransfersApi.md +274 -72
- data/docs/UpdateCustomerDto.md +25 -9
- data/docs/UpdateTaxDto.md +26 -0
- data/docs/UpdateWebhookDto.md +23 -8
- data/docs/WalletsApi.md +44 -24
- data/docs/WebhookResponseDto.md +29 -11
- data/docs/WebhooksApi.md +225 -134
- data/git_push.sh +41 -28
- data/lib/devdraft/api/api_health_api.rb +32 -16
- data/lib/devdraft/api/app_balances_api.rb +45 -22
- data/lib/devdraft/api/customers_api.rb +124 -71
- data/lib/devdraft/api/exchange_rates_api.rb +49 -26
- data/lib/devdraft/api/invoices_api.rb +89 -53
- data/lib/devdraft/api/liquidation_addresses_api.rb +70 -44
- data/lib/devdraft/api/payment_intents_api.rb +62 -40
- data/lib/devdraft/api/payment_links_api.rb +85 -49
- data/lib/devdraft/api/products_api.rb +214 -216
- data/lib/devdraft/api/taxes_api.rb +257 -66
- data/lib/devdraft/api/test_payments_api.rb +70 -44
- data/lib/devdraft/api/transfers_api.rb +206 -46
- data/lib/devdraft/api/wallets_api.rb +18 -9
- data/lib/devdraft/api/webhooks_api.rb +109 -66
- data/lib/devdraft/api_client.rb +76 -71
- data/lib/devdraft/api_error.rb +5 -4
- data/lib/devdraft/api_model_base.rb +88 -0
- data/lib/devdraft/configuration.rb +121 -18
- data/lib/devdraft/models/aggregated_balance_response.rb +68 -101
- data/lib/devdraft/models/all_balances_response.rb +76 -99
- data/lib/devdraft/models/bridge_fiat_payment_rail.rb +45 -0
- data/lib/devdraft/models/bridge_payment_rail.rb +36 -24
- data/lib/devdraft/models/create_bank_payment_intent_dto.rb +191 -114
- data/lib/devdraft/models/create_customer_dto.rb +123 -113
- data/lib/devdraft/models/create_direct_bank_transfer_dto.rb +105 -104
- data/lib/devdraft/models/create_direct_wallet_transfer_dto.rb +89 -100
- data/lib/devdraft/models/create_external_bank_transfer_dto.rb +505 -0
- data/lib/devdraft/models/create_external_stablecoin_transfer_dto.rb +266 -0
- data/lib/devdraft/models/create_invoice_dto.rb +151 -121
- data/lib/devdraft/models/create_liquidation_address_dto.rb +195 -115
- data/lib/devdraft/models/create_payment_link_dto.rb +192 -214
- data/lib/devdraft/models/create_stable_payment_intent_dto.rb +324 -111
- data/lib/devdraft/models/create_stablecoin_conversion_dto.rb +102 -101
- data/lib/devdraft/models/create_tax_dto.rb +281 -0
- data/lib/devdraft/models/create_webhook_dto.rb +104 -101
- data/lib/devdraft/models/customer_status.rb +23 -10
- data/lib/devdraft/models/customer_type.rb +45 -0
- data/lib/devdraft/models/destination_currency.rb +27 -15
- data/lib/devdraft/models/exchange_rate_response_dto.rb +103 -102
- data/lib/devdraft/models/fiat_currency.rb +22 -10
- data/lib/devdraft/models/health_response_dto.rb +99 -106
- data/lib/devdraft/models/invoice_product_dto.rb +63 -98
- data/lib/devdraft/models/liquidation_address_response_dto.rb +147 -110
- data/lib/devdraft/models/payment_link_product_dto.rb +70 -98
- data/lib/devdraft/models/payment_request_dto.rb +77 -100
- data/lib/devdraft/models/payment_response_dto.rb +102 -101
- data/lib/devdraft/models/public_health_response_dto.rb +68 -101
- data/lib/devdraft/models/refund_response_dto.rb +102 -101
- data/lib/devdraft/models/stable_coin_currency.rb +21 -9
- data/lib/devdraft/models/tax_controller_create201_response.rb +201 -0
- data/lib/devdraft/models/tax_controller_delete_without_id400_response.rb +165 -0
- data/lib/devdraft/models/tax_controller_update_without_id400_response.rb +165 -0
- data/lib/devdraft/models/update_customer_dto.rb +117 -113
- data/lib/devdraft/models/update_tax_dto.rb +256 -0
- data/lib/devdraft/models/update_webhook_dto.rb +70 -101
- data/lib/devdraft/models/webhook_response_dto.rb +140 -103
- data/lib/devdraft/version.rb +6 -5
- data/lib/devdraft.rb +18 -27
- data/spec/api/api_health_api_spec.rb +10 -9
- data/spec/api/app_balances_api_spec.rb +11 -10
- data/spec/api/customers_api_spec.rb +25 -24
- data/spec/api/exchange_rates_api_spec.rb +11 -10
- data/spec/api/invoices_api_spec.rb +16 -15
- data/spec/api/liquidation_addresses_api_spec.rb +13 -12
- data/spec/api/payment_intents_api_spec.rb +12 -11
- data/spec/api/payment_links_api_spec.rb +14 -13
- data/spec/api/products_api_spec.rb +41 -40
- data/spec/api/taxes_api_spec.rb +51 -21
- data/spec/api/test_payments_api_spec.rb +14 -13
- data/spec/api/transfers_api_spec.rb +36 -13
- data/spec/api/wallets_api_spec.rb +9 -8
- data/spec/api/webhooks_api_spec.rb +20 -19
- data/spec/models/aggregated_balance_response_spec.rb +15 -19
- data/spec/models/all_balances_response_spec.rb +14 -18
- data/spec/models/bridge_fiat_payment_rail_spec.rb +30 -0
- data/spec/models/bridge_payment_rail_spec.rb +11 -15
- data/spec/models/create_bank_payment_intent_dto_spec.rb +29 -33
- data/spec/models/create_customer_dto_spec.rb +17 -25
- data/spec/models/create_direct_bank_transfer_dto_spec.rb +19 -23
- data/spec/models/create_direct_wallet_transfer_dto_spec.rb +15 -19
- data/spec/models/create_external_bank_transfer_dto_spec.rb +102 -0
- data/spec/models/create_external_stablecoin_transfer_dto_spec.rb +66 -0
- data/spec/models/create_invoice_dto_spec.rb +31 -35
- data/spec/models/create_liquidation_address_dto_spec.rb +28 -32
- data/spec/models/create_payment_link_dto_spec.rb +34 -76
- data/spec/models/create_stable_payment_intent_dto_spec.rb +26 -30
- data/spec/models/create_stablecoin_conversion_dto_spec.rb +16 -20
- data/spec/models/create_tax_dto_spec.rb +60 -0
- data/spec/models/create_webhook_dto_spec.rb +16 -20
- data/spec/models/customer_status_spec.rb +11 -15
- data/spec/models/customer_type_spec.rb +30 -0
- data/spec/models/destination_currency_spec.rb +11 -15
- data/spec/models/exchange_rate_response_dto_spec.rb +17 -21
- data/spec/models/fiat_currency_spec.rb +11 -15
- data/spec/models/health_response_dto_spec.rb +19 -23
- data/spec/models/invoice_product_dto_spec.rb +13 -17
- data/spec/models/liquidation_address_response_dto_spec.rb +25 -29
- data/spec/models/payment_link_product_dto_spec.rb +13 -17
- data/spec/models/payment_request_dto_spec.rb +15 -19
- data/spec/models/payment_response_dto_spec.rb +16 -20
- data/spec/models/public_health_response_dto_spec.rb +15 -19
- data/spec/models/refund_response_dto_spec.rb +16 -20
- data/spec/models/stable_coin_currency_spec.rb +11 -15
- data/spec/models/tax_controller_create201_response_spec.rb +72 -0
- data/spec/models/tax_controller_delete_without_id400_response_spec.rb +48 -0
- data/spec/models/tax_controller_update_without_id400_response_spec.rb +48 -0
- data/spec/models/update_customer_dto_spec.rb +17 -25
- data/spec/models/update_tax_dto_spec.rb +60 -0
- data/spec/models/update_webhook_dto_spec.rb +16 -20
- data/spec/models/webhook_response_dto_spec.rb +19 -23
- data/spec/spec_helper.rb +5 -4
- metadata +49 -116
- data/docs/AllOfAllBalancesResponseEurc.md +0 -9
- data/docs/AllOfAllBalancesResponseUsdc.md +0 -9
- data/docs/AllOfCreateBankPaymentIntentDtoDestinationCurrency.md +0 -6
- data/docs/AllOfCreateBankPaymentIntentDtoDestinationNetwork.md +0 -6
- data/docs/AllOfCreateBankPaymentIntentDtoSourceCurrency.md +0 -6
- data/docs/AllOfCreateBankPaymentIntentDtoSourcePaymentRail.md +0 -6
- data/docs/AllOfCreateCustomerDtoStatus.md +0 -6
- data/docs/AllOfCreateLiquidationAddressDtoDestinationCurrency.md +0 -6
- data/docs/AllOfCreateLiquidationAddressDtoDestinationPaymentRail.md +0 -6
- data/docs/AllOfCreateStablePaymentIntentDtoDestinationCurrency.md +0 -6
- data/docs/AllOfCreateStablePaymentIntentDtoDestinationNetwork.md +0 -6
- data/docs/AllOfCreateStablePaymentIntentDtoSourceCurrency.md +0 -6
- data/docs/AllOfCreateStablePaymentIntentDtoSourceNetwork.md +0 -6
- data/docs/AllOfUpdateCustomerDtoStatus.md +0 -6
- data/docs/CreateProductDto.md +0 -18
- data/docs/CreateTaxInput.md +0 -6
- data/docs/UpdatePaymentLinkDto.md +0 -6
- data/docs/UpdatePreferenceInput.md +0 -6
- data/docs/UpdateProductDto.md +0 -18
- data/docs/UpdateTaxInput.md +0 -6
- data/example.rb +0 -94
- data/lib/devdraft/models/all_of_all_balances_response_eurc.rb +0 -283
- data/lib/devdraft/models/all_of_all_balances_response_usdc.rb +0 -283
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_network.rb +0 -202
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_payment_rail.rb +0 -202
- data/lib/devdraft/models/all_of_create_customer_dto_status.rb +0 -202
- data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_payment_rail.rb +0 -202
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_network.rb +0 -202
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_network.rb +0 -202
- data/lib/devdraft/models/all_of_update_customer_dto_status.rb +0 -202
- data/lib/devdraft/models/create_product_dto.rb +0 -370
- data/lib/devdraft/models/create_tax_input.rb +0 -197
- data/lib/devdraft/models/update_payment_link_dto.rb +0 -197
- data/lib/devdraft/models/update_preference_input.rb +0 -197
- data/lib/devdraft/models/update_product_dto.rb +0 -355
- data/lib/devdraft/models/update_tax_input.rb +0 -197
- data/spec/api_client_spec.rb +0 -225
- data/spec/base_object_spec.rb +0 -109
- data/spec/configuration_spec.rb +0 -41
- data/spec/models/all_of_all_balances_response_eurc_spec.rb +0 -56
- data/spec/models/all_of_all_balances_response_usdc_spec.rb +0 -56
- data/spec/models/all_of_create_bank_payment_intent_dto_destination_currency_spec.rb +0 -34
- data/spec/models/all_of_create_bank_payment_intent_dto_destination_network_spec.rb +0 -34
- data/spec/models/all_of_create_bank_payment_intent_dto_source_currency_spec.rb +0 -34
- data/spec/models/all_of_create_bank_payment_intent_dto_source_payment_rail_spec.rb +0 -34
- data/spec/models/all_of_create_customer_dto_status_spec.rb +0 -34
- data/spec/models/all_of_create_liquidation_address_dto_destination_currency_spec.rb +0 -34
- data/spec/models/all_of_create_liquidation_address_dto_destination_payment_rail_spec.rb +0 -34
- data/spec/models/all_of_create_stable_payment_intent_dto_destination_currency_spec.rb +0 -34
- data/spec/models/all_of_create_stable_payment_intent_dto_destination_network_spec.rb +0 -34
- data/spec/models/all_of_create_stable_payment_intent_dto_source_currency_spec.rb +0 -34
- data/spec/models/all_of_create_stable_payment_intent_dto_source_network_spec.rb +0 -34
- data/spec/models/all_of_update_customer_dto_status_spec.rb +0 -34
- data/spec/models/create_product_dto_spec.rb +0 -110
- data/spec/models/create_tax_input_spec.rb +0 -34
- data/spec/models/update_payment_link_dto_spec.rb +0 -34
- data/spec/models/update_preference_input_spec.rb +0 -34
- data/spec/models/update_product_dto_spec.rb +0 -110
- data/spec/models/update_tax_input_spec.rb +0 -34
data/docs/WebhookResponseDto.md
CHANGED
|
@@ -1,14 +1,32 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Devdraft::WebhookResponseDto
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
**
|
|
8
|
-
**
|
|
9
|
-
**
|
|
10
|
-
**
|
|
11
|
-
**
|
|
12
|
-
**
|
|
13
|
-
**
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | Unique identifier for the webhook | |
|
|
8
|
+
| **name** | **String** | Name of the webhook | |
|
|
9
|
+
| **url** | **String** | URL where webhook events are sent | |
|
|
10
|
+
| **is_active** | **Boolean** | Whether the webhook is currently active | |
|
|
11
|
+
| **encrypted** | **Boolean** | Whether webhook payloads are encrypted | |
|
|
12
|
+
| **created_at** | **String** | Timestamp when the webhook was created | |
|
|
13
|
+
| **updated_at** | **String** | Timestamp when the webhook was last updated | |
|
|
14
|
+
| **delivery_stats** | **Object** | Webhook delivery statistics | |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
require 'devdraft'
|
|
20
|
+
|
|
21
|
+
instance = Devdraft::WebhookResponseDto.new(
|
|
22
|
+
id: 550e8400-e29b-41d4-a716-446655440000,
|
|
23
|
+
name: Payment Notifications,
|
|
24
|
+
url: https://api.example.com/webhooks/payments,
|
|
25
|
+
is_active: true,
|
|
26
|
+
encrypted: false,
|
|
27
|
+
created_at: 2024-03-20T12:00:00.000Z,
|
|
28
|
+
updated_at: 2024-03-20T12:00:00.000Z,
|
|
29
|
+
delivery_stats: {"total_events":150,"successful_deliveries":145,"failed_deliveries":5,"last_delivery":"2024-03-20T11:55:00.000Z"}
|
|
30
|
+
)
|
|
31
|
+
```
|
|
14
32
|
|
data/docs/WebhooksApi.md
CHANGED
|
@@ -1,57 +1,77 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Devdraft::WebhooksApi
|
|
2
2
|
|
|
3
3
|
All URIs are relative to *https://api.devdraft.ai*
|
|
4
4
|
|
|
5
|
-
Method | HTTP request | Description
|
|
6
|
-
|
|
7
|
-
[**webhook_controller_create**](WebhooksApi.md#webhook_controller_create) | **POST** /api/v0/webhooks | Create a new webhook
|
|
8
|
-
[**webhook_controller_find_all**](WebhooksApi.md#webhook_controller_find_all) | **GET** /api/v0/webhooks | Get all webhooks
|
|
9
|
-
[**webhook_controller_find_one**](WebhooksApi.md#webhook_controller_find_one) | **GET** /api/v0/webhooks/{id} | Get a webhook by id
|
|
10
|
-
[**webhook_controller_remove**](WebhooksApi.md#webhook_controller_remove) | **DELETE** /api/v0/webhooks/{id} | Delete a webhook
|
|
11
|
-
[**webhook_controller_update**](WebhooksApi.md#webhook_controller_update) | **PATCH** /api/v0/webhooks/{id} | Update a webhook
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**webhook_controller_create**](WebhooksApi.md#webhook_controller_create) | **POST** /api/v0/webhooks | Create a new webhook |
|
|
8
|
+
| [**webhook_controller_find_all**](WebhooksApi.md#webhook_controller_find_all) | **GET** /api/v0/webhooks | Get all webhooks |
|
|
9
|
+
| [**webhook_controller_find_one**](WebhooksApi.md#webhook_controller_find_one) | **GET** /api/v0/webhooks/{id} | Get a webhook by id |
|
|
10
|
+
| [**webhook_controller_remove**](WebhooksApi.md#webhook_controller_remove) | **DELETE** /api/v0/webhooks/{id} | Delete a webhook |
|
|
11
|
+
| [**webhook_controller_update**](WebhooksApi.md#webhook_controller_update) | **PATCH** /api/v0/webhooks/{id} | Update a webhook |
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
|
|
14
|
+
## webhook_controller_create
|
|
15
|
+
|
|
16
|
+
> <WebhookResponseDto> webhook_controller_create(create_webhook_dto)
|
|
15
17
|
|
|
16
18
|
Create a new webhook
|
|
17
19
|
|
|
18
20
|
Creates a new webhook endpoint for receiving event notifications. Requires webhook:create scope.
|
|
19
21
|
|
|
20
|
-
###
|
|
22
|
+
### Examples
|
|
23
|
+
|
|
21
24
|
```ruby
|
|
22
|
-
|
|
23
|
-
require '
|
|
25
|
+
require 'time'
|
|
26
|
+
require 'devdraft'
|
|
24
27
|
# setup authorization
|
|
25
|
-
|
|
28
|
+
Devdraft.configure do |config|
|
|
29
|
+
# Configure API key authorization: x-client-secret
|
|
30
|
+
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
|
31
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
32
|
+
# config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
33
|
+
|
|
26
34
|
# Configure API key authorization: x-client-key
|
|
27
35
|
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
28
36
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
29
|
-
#config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
37
|
+
# config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
38
|
+
end
|
|
30
39
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
40
|
+
api_instance = Devdraft::WebhooksApi.new
|
|
41
|
+
create_webhook_dto = Devdraft::CreateWebhookDto.new({name: 'Payment Notifications', url: 'https://api.example.com/webhooks/payments', is_active: true, encrypted: false}) # CreateWebhookDto | Webhook configuration details
|
|
42
|
+
|
|
43
|
+
begin
|
|
44
|
+
# Create a new webhook
|
|
45
|
+
result = api_instance.webhook_controller_create(create_webhook_dto)
|
|
46
|
+
p result
|
|
47
|
+
rescue Devdraft::ApiError => e
|
|
48
|
+
puts "Error when calling WebhooksApi->webhook_controller_create: #{e}"
|
|
35
49
|
end
|
|
50
|
+
```
|
|
36
51
|
|
|
37
|
-
|
|
38
|
-
body = DevDraftAI::CreateWebhookDto.new # CreateWebhookDto | Webhook configuration details
|
|
52
|
+
#### Using the webhook_controller_create_with_http_info variant
|
|
39
53
|
|
|
54
|
+
This returns an Array which contains the response data, status code and headers.
|
|
40
55
|
|
|
56
|
+
> <Array(<WebhookResponseDto>, Integer, Hash)> webhook_controller_create_with_http_info(create_webhook_dto)
|
|
57
|
+
|
|
58
|
+
```ruby
|
|
41
59
|
begin
|
|
42
|
-
#Create a new webhook
|
|
43
|
-
|
|
44
|
-
p
|
|
45
|
-
|
|
46
|
-
|
|
60
|
+
# Create a new webhook
|
|
61
|
+
data, status_code, headers = api_instance.webhook_controller_create_with_http_info(create_webhook_dto)
|
|
62
|
+
p status_code # => 2xx
|
|
63
|
+
p headers # => { ... }
|
|
64
|
+
p data # => <WebhookResponseDto>
|
|
65
|
+
rescue Devdraft::ApiError => e
|
|
66
|
+
puts "Error when calling WebhooksApi->webhook_controller_create_with_http_info: #{e}"
|
|
47
67
|
end
|
|
48
68
|
```
|
|
49
69
|
|
|
50
70
|
### Parameters
|
|
51
71
|
|
|
52
|
-
Name | Type | Description
|
|
53
|
-
|
|
54
|
-
**
|
|
72
|
+
| Name | Type | Description | Notes |
|
|
73
|
+
| ---- | ---- | ----------- | ----- |
|
|
74
|
+
| **create_webhook_dto** | [**CreateWebhookDto**](CreateWebhookDto.md) | Webhook configuration details | |
|
|
55
75
|
|
|
56
76
|
### Return type
|
|
57
77
|
|
|
@@ -59,60 +79,79 @@ Name | Type | Description | Notes
|
|
|
59
79
|
|
|
60
80
|
### Authorization
|
|
61
81
|
|
|
62
|
-
[x-client-
|
|
82
|
+
[x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
|
|
63
83
|
|
|
64
84
|
### HTTP request headers
|
|
65
85
|
|
|
66
|
-
|
|
67
|
-
|
|
86
|
+
- **Content-Type**: application/json
|
|
87
|
+
- **Accept**: application/json
|
|
68
88
|
|
|
69
89
|
|
|
90
|
+
## webhook_controller_find_all
|
|
70
91
|
|
|
71
|
-
|
|
72
|
-
> Array<WebhookResponseDto> webhook_controller_find_all(opts)
|
|
92
|
+
> <Array<WebhookResponseDto>> webhook_controller_find_all(opts)
|
|
73
93
|
|
|
74
94
|
Get all webhooks
|
|
75
95
|
|
|
76
96
|
Retrieves a list of all webhooks for your application. Requires webhook:read scope.
|
|
77
97
|
|
|
78
|
-
###
|
|
98
|
+
### Examples
|
|
99
|
+
|
|
79
100
|
```ruby
|
|
80
|
-
|
|
81
|
-
require '
|
|
101
|
+
require 'time'
|
|
102
|
+
require 'devdraft'
|
|
82
103
|
# setup authorization
|
|
83
|
-
|
|
84
|
-
# Configure API key authorization: x-client-key
|
|
85
|
-
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
86
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
87
|
-
#config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
88
|
-
|
|
104
|
+
Devdraft.configure do |config|
|
|
89
105
|
# Configure API key authorization: x-client-secret
|
|
90
106
|
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
|
91
107
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
92
|
-
#config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
108
|
+
# config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
109
|
+
|
|
110
|
+
# Configure API key authorization: x-client-key
|
|
111
|
+
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
112
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
113
|
+
# config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
93
114
|
end
|
|
94
115
|
|
|
95
|
-
api_instance =
|
|
96
|
-
opts = {
|
|
97
|
-
skip:
|
|
98
|
-
take:
|
|
116
|
+
api_instance = Devdraft::WebhooksApi.new
|
|
117
|
+
opts = {
|
|
118
|
+
skip: 8.14, # Float | Number of records to skip (default: 0)
|
|
119
|
+
take: 8.14 # Float | Number of records to return (default: 10)
|
|
99
120
|
}
|
|
100
121
|
|
|
101
122
|
begin
|
|
102
|
-
#Get all webhooks
|
|
123
|
+
# Get all webhooks
|
|
103
124
|
result = api_instance.webhook_controller_find_all(opts)
|
|
104
125
|
p result
|
|
105
|
-
rescue
|
|
106
|
-
puts "
|
|
126
|
+
rescue Devdraft::ApiError => e
|
|
127
|
+
puts "Error when calling WebhooksApi->webhook_controller_find_all: #{e}"
|
|
128
|
+
end
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
#### Using the webhook_controller_find_all_with_http_info variant
|
|
132
|
+
|
|
133
|
+
This returns an Array which contains the response data, status code and headers.
|
|
134
|
+
|
|
135
|
+
> <Array(<Array<WebhookResponseDto>>, Integer, Hash)> webhook_controller_find_all_with_http_info(opts)
|
|
136
|
+
|
|
137
|
+
```ruby
|
|
138
|
+
begin
|
|
139
|
+
# Get all webhooks
|
|
140
|
+
data, status_code, headers = api_instance.webhook_controller_find_all_with_http_info(opts)
|
|
141
|
+
p status_code # => 2xx
|
|
142
|
+
p headers # => { ... }
|
|
143
|
+
p data # => <Array<WebhookResponseDto>>
|
|
144
|
+
rescue Devdraft::ApiError => e
|
|
145
|
+
puts "Error when calling WebhooksApi->webhook_controller_find_all_with_http_info: #{e}"
|
|
107
146
|
end
|
|
108
147
|
```
|
|
109
148
|
|
|
110
149
|
### Parameters
|
|
111
150
|
|
|
112
|
-
Name | Type | Description
|
|
113
|
-
|
|
114
|
-
**skip** | **
|
|
115
|
-
**take** | **
|
|
151
|
+
| Name | Type | Description | Notes |
|
|
152
|
+
| ---- | ---- | ----------- | ----- |
|
|
153
|
+
| **skip** | **Float** | Number of records to skip (default: 0) | [optional] |
|
|
154
|
+
| **take** | **Float** | Number of records to return (default: 10) | [optional] |
|
|
116
155
|
|
|
117
156
|
### Return type
|
|
118
157
|
|
|
@@ -120,57 +159,75 @@ Name | Type | Description | Notes
|
|
|
120
159
|
|
|
121
160
|
### Authorization
|
|
122
161
|
|
|
123
|
-
[x-client-
|
|
162
|
+
[x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
|
|
124
163
|
|
|
125
164
|
### HTTP request headers
|
|
126
165
|
|
|
127
|
-
|
|
128
|
-
|
|
166
|
+
- **Content-Type**: Not defined
|
|
167
|
+
- **Accept**: application/json
|
|
129
168
|
|
|
130
169
|
|
|
170
|
+
## webhook_controller_find_one
|
|
131
171
|
|
|
132
|
-
|
|
133
|
-
> WebhookResponseDto webhook_controller_find_one(id)
|
|
172
|
+
> <WebhookResponseDto> webhook_controller_find_one(id)
|
|
134
173
|
|
|
135
174
|
Get a webhook by id
|
|
136
175
|
|
|
137
176
|
Retrieves details for a specific webhook. Requires webhook:read scope.
|
|
138
177
|
|
|
139
|
-
###
|
|
178
|
+
### Examples
|
|
179
|
+
|
|
140
180
|
```ruby
|
|
141
|
-
|
|
142
|
-
require '
|
|
181
|
+
require 'time'
|
|
182
|
+
require 'devdraft'
|
|
143
183
|
# setup authorization
|
|
144
|
-
|
|
145
|
-
# Configure API key authorization: x-client-key
|
|
146
|
-
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
147
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
148
|
-
#config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
149
|
-
|
|
184
|
+
Devdraft.configure do |config|
|
|
150
185
|
# Configure API key authorization: x-client-secret
|
|
151
186
|
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
|
152
187
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
153
|
-
#config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
154
|
-
end
|
|
188
|
+
# config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
155
189
|
|
|
156
|
-
|
|
157
|
-
|
|
190
|
+
# Configure API key authorization: x-client-key
|
|
191
|
+
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
192
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
193
|
+
# config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
194
|
+
end
|
|
158
195
|
|
|
196
|
+
api_instance = Devdraft::WebhooksApi.new
|
|
197
|
+
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Webhook unique identifier (UUID)
|
|
159
198
|
|
|
160
199
|
begin
|
|
161
|
-
#Get a webhook by id
|
|
200
|
+
# Get a webhook by id
|
|
162
201
|
result = api_instance.webhook_controller_find_one(id)
|
|
163
202
|
p result
|
|
164
|
-
rescue
|
|
165
|
-
puts "
|
|
203
|
+
rescue Devdraft::ApiError => e
|
|
204
|
+
puts "Error when calling WebhooksApi->webhook_controller_find_one: #{e}"
|
|
205
|
+
end
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
#### Using the webhook_controller_find_one_with_http_info variant
|
|
209
|
+
|
|
210
|
+
This returns an Array which contains the response data, status code and headers.
|
|
211
|
+
|
|
212
|
+
> <Array(<WebhookResponseDto>, Integer, Hash)> webhook_controller_find_one_with_http_info(id)
|
|
213
|
+
|
|
214
|
+
```ruby
|
|
215
|
+
begin
|
|
216
|
+
# Get a webhook by id
|
|
217
|
+
data, status_code, headers = api_instance.webhook_controller_find_one_with_http_info(id)
|
|
218
|
+
p status_code # => 2xx
|
|
219
|
+
p headers # => { ... }
|
|
220
|
+
p data # => <WebhookResponseDto>
|
|
221
|
+
rescue Devdraft::ApiError => e
|
|
222
|
+
puts "Error when calling WebhooksApi->webhook_controller_find_one_with_http_info: #{e}"
|
|
166
223
|
end
|
|
167
224
|
```
|
|
168
225
|
|
|
169
226
|
### Parameters
|
|
170
227
|
|
|
171
|
-
Name | Type | Description
|
|
172
|
-
|
|
173
|
-
**id** | **String
|
|
228
|
+
| Name | Type | Description | Notes |
|
|
229
|
+
| ---- | ---- | ----------- | ----- |
|
|
230
|
+
| **id** | **String** | Webhook unique identifier (UUID) | |
|
|
174
231
|
|
|
175
232
|
### Return type
|
|
176
233
|
|
|
@@ -178,57 +235,75 @@ Name | Type | Description | Notes
|
|
|
178
235
|
|
|
179
236
|
### Authorization
|
|
180
237
|
|
|
181
|
-
[x-client-
|
|
238
|
+
[x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
|
|
182
239
|
|
|
183
240
|
### HTTP request headers
|
|
184
241
|
|
|
185
|
-
|
|
186
|
-
|
|
242
|
+
- **Content-Type**: Not defined
|
|
243
|
+
- **Accept**: application/json
|
|
187
244
|
|
|
188
245
|
|
|
246
|
+
## webhook_controller_remove
|
|
189
247
|
|
|
190
|
-
|
|
191
|
-
> WebhookResponseDto webhook_controller_remove(id)
|
|
248
|
+
> <WebhookResponseDto> webhook_controller_remove(id)
|
|
192
249
|
|
|
193
250
|
Delete a webhook
|
|
194
251
|
|
|
195
252
|
Deletes a webhook configuration. Requires webhook:delete scope.
|
|
196
253
|
|
|
197
|
-
###
|
|
254
|
+
### Examples
|
|
255
|
+
|
|
198
256
|
```ruby
|
|
199
|
-
|
|
200
|
-
require '
|
|
257
|
+
require 'time'
|
|
258
|
+
require 'devdraft'
|
|
201
259
|
# setup authorization
|
|
202
|
-
|
|
203
|
-
# Configure API key authorization: x-client-key
|
|
204
|
-
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
205
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
206
|
-
#config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
207
|
-
|
|
260
|
+
Devdraft.configure do |config|
|
|
208
261
|
# Configure API key authorization: x-client-secret
|
|
209
262
|
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
|
210
263
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
211
|
-
#config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
212
|
-
end
|
|
264
|
+
# config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
213
265
|
|
|
214
|
-
|
|
215
|
-
|
|
266
|
+
# Configure API key authorization: x-client-key
|
|
267
|
+
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
268
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
269
|
+
# config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
270
|
+
end
|
|
216
271
|
|
|
272
|
+
api_instance = Devdraft::WebhooksApi.new
|
|
273
|
+
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Webhook unique identifier (UUID)
|
|
217
274
|
|
|
218
275
|
begin
|
|
219
|
-
#Delete a webhook
|
|
276
|
+
# Delete a webhook
|
|
220
277
|
result = api_instance.webhook_controller_remove(id)
|
|
221
278
|
p result
|
|
222
|
-
rescue
|
|
223
|
-
puts "
|
|
279
|
+
rescue Devdraft::ApiError => e
|
|
280
|
+
puts "Error when calling WebhooksApi->webhook_controller_remove: #{e}"
|
|
281
|
+
end
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
#### Using the webhook_controller_remove_with_http_info variant
|
|
285
|
+
|
|
286
|
+
This returns an Array which contains the response data, status code and headers.
|
|
287
|
+
|
|
288
|
+
> <Array(<WebhookResponseDto>, Integer, Hash)> webhook_controller_remove_with_http_info(id)
|
|
289
|
+
|
|
290
|
+
```ruby
|
|
291
|
+
begin
|
|
292
|
+
# Delete a webhook
|
|
293
|
+
data, status_code, headers = api_instance.webhook_controller_remove_with_http_info(id)
|
|
294
|
+
p status_code # => 2xx
|
|
295
|
+
p headers # => { ... }
|
|
296
|
+
p data # => <WebhookResponseDto>
|
|
297
|
+
rescue Devdraft::ApiError => e
|
|
298
|
+
puts "Error when calling WebhooksApi->webhook_controller_remove_with_http_info: #{e}"
|
|
224
299
|
end
|
|
225
300
|
```
|
|
226
301
|
|
|
227
302
|
### Parameters
|
|
228
303
|
|
|
229
|
-
Name | Type | Description
|
|
230
|
-
|
|
231
|
-
**id** | **String
|
|
304
|
+
| Name | Type | Description | Notes |
|
|
305
|
+
| ---- | ---- | ----------- | ----- |
|
|
306
|
+
| **id** | **String** | Webhook unique identifier (UUID) | |
|
|
232
307
|
|
|
233
308
|
### Return type
|
|
234
309
|
|
|
@@ -236,59 +311,77 @@ Name | Type | Description | Notes
|
|
|
236
311
|
|
|
237
312
|
### Authorization
|
|
238
313
|
|
|
239
|
-
[x-client-
|
|
314
|
+
[x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
|
|
240
315
|
|
|
241
316
|
### HTTP request headers
|
|
242
317
|
|
|
243
|
-
|
|
244
|
-
|
|
318
|
+
- **Content-Type**: Not defined
|
|
319
|
+
- **Accept**: application/json
|
|
245
320
|
|
|
246
321
|
|
|
322
|
+
## webhook_controller_update
|
|
247
323
|
|
|
248
|
-
|
|
249
|
-
> WebhookResponseDto webhook_controller_update(bodyid)
|
|
324
|
+
> <WebhookResponseDto> webhook_controller_update(id, update_webhook_dto)
|
|
250
325
|
|
|
251
326
|
Update a webhook
|
|
252
327
|
|
|
253
328
|
Updates an existing webhook configuration. Requires webhook:update scope.
|
|
254
329
|
|
|
255
|
-
###
|
|
330
|
+
### Examples
|
|
331
|
+
|
|
256
332
|
```ruby
|
|
257
|
-
|
|
258
|
-
require '
|
|
333
|
+
require 'time'
|
|
334
|
+
require 'devdraft'
|
|
259
335
|
# setup authorization
|
|
260
|
-
|
|
336
|
+
Devdraft.configure do |config|
|
|
337
|
+
# Configure API key authorization: x-client-secret
|
|
338
|
+
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
|
339
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
340
|
+
# config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
341
|
+
|
|
261
342
|
# Configure API key authorization: x-client-key
|
|
262
343
|
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
263
344
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
264
|
-
#config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
345
|
+
# config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
346
|
+
end
|
|
265
347
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
348
|
+
api_instance = Devdraft::WebhooksApi.new
|
|
349
|
+
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Webhook unique identifier (UUID)
|
|
350
|
+
update_webhook_dto = Devdraft::UpdateWebhookDto.new # UpdateWebhookDto | Webhook update details
|
|
351
|
+
|
|
352
|
+
begin
|
|
353
|
+
# Update a webhook
|
|
354
|
+
result = api_instance.webhook_controller_update(id, update_webhook_dto)
|
|
355
|
+
p result
|
|
356
|
+
rescue Devdraft::ApiError => e
|
|
357
|
+
puts "Error when calling WebhooksApi->webhook_controller_update: #{e}"
|
|
270
358
|
end
|
|
359
|
+
```
|
|
271
360
|
|
|
272
|
-
|
|
273
|
-
body = DevDraftAI::UpdateWebhookDto.new # UpdateWebhookDto | Webhook update details
|
|
274
|
-
id = 'id_example' # String | Webhook ID
|
|
361
|
+
#### Using the webhook_controller_update_with_http_info variant
|
|
275
362
|
|
|
363
|
+
This returns an Array which contains the response data, status code and headers.
|
|
276
364
|
|
|
365
|
+
> <Array(<WebhookResponseDto>, Integer, Hash)> webhook_controller_update_with_http_info(id, update_webhook_dto)
|
|
366
|
+
|
|
367
|
+
```ruby
|
|
277
368
|
begin
|
|
278
|
-
#Update a webhook
|
|
279
|
-
|
|
280
|
-
p
|
|
281
|
-
|
|
282
|
-
|
|
369
|
+
# Update a webhook
|
|
370
|
+
data, status_code, headers = api_instance.webhook_controller_update_with_http_info(id, update_webhook_dto)
|
|
371
|
+
p status_code # => 2xx
|
|
372
|
+
p headers # => { ... }
|
|
373
|
+
p data # => <WebhookResponseDto>
|
|
374
|
+
rescue Devdraft::ApiError => e
|
|
375
|
+
puts "Error when calling WebhooksApi->webhook_controller_update_with_http_info: #{e}"
|
|
283
376
|
end
|
|
284
377
|
```
|
|
285
378
|
|
|
286
379
|
### Parameters
|
|
287
380
|
|
|
288
|
-
Name | Type | Description
|
|
289
|
-
|
|
290
|
-
**
|
|
291
|
-
**
|
|
381
|
+
| Name | Type | Description | Notes |
|
|
382
|
+
| ---- | ---- | ----------- | ----- |
|
|
383
|
+
| **id** | **String** | Webhook unique identifier (UUID) | |
|
|
384
|
+
| **update_webhook_dto** | [**UpdateWebhookDto**](UpdateWebhookDto.md) | Webhook update details | |
|
|
292
385
|
|
|
293
386
|
### Return type
|
|
294
387
|
|
|
@@ -296,12 +389,10 @@ Name | Type | Description | Notes
|
|
|
296
389
|
|
|
297
390
|
### Authorization
|
|
298
391
|
|
|
299
|
-
[x-client-
|
|
392
|
+
[x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
|
|
300
393
|
|
|
301
394
|
### HTTP request headers
|
|
302
395
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
396
|
+
- **Content-Type**: application/json
|
|
397
|
+
- **Accept**: application/json
|
|
307
398
|
|
data/git_push.sh
CHANGED
|
@@ -1,44 +1,57 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
|
-
#
|
|
3
|
-
# Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
4
|
-
#
|
|
5
2
|
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
|
6
3
|
#
|
|
7
|
-
# Usage example: /bin/sh ./git_push.sh wing328
|
|
4
|
+
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
|
|
5
|
+
|
|
6
|
+
git_user_id=$1
|
|
7
|
+
git_repo_id=$2
|
|
8
|
+
release_note=$3
|
|
9
|
+
git_host=$4
|
|
10
|
+
|
|
11
|
+
if [ "$git_host" = "" ]; then
|
|
12
|
+
git_host="github.com"
|
|
13
|
+
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
if [ "$git_user_id" = "" ]; then
|
|
17
|
+
git_user_id="GIT_USER_ID"
|
|
18
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
|
19
|
+
fi
|
|
8
20
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
21
|
+
if [ "$git_repo_id" = "" ]; then
|
|
22
|
+
git_repo_id="GIT_REPO_ID"
|
|
23
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
if [ "$release_note" = "" ]; then
|
|
27
|
+
release_note="Minor update"
|
|
28
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
|
29
|
+
fi
|
|
14
30
|
|
|
15
31
|
# Initialize the local directory as a Git repository
|
|
16
32
|
git init
|
|
17
33
|
|
|
18
|
-
# Remove any existing remote
|
|
19
|
-
git remote remove origin 2>/dev/null || true
|
|
20
|
-
|
|
21
34
|
# Adds the files in the local repository and stages them for commit.
|
|
22
35
|
git add .
|
|
23
36
|
|
|
24
37
|
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
|
25
|
-
git commit -m "$
|
|
26
|
-
|
|
27
|
-
#
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
git remote add origin "https://${GIT_REPO_BASE_URL}/${GIT_USER_ID}/${GIT_REPO_ID}.git"
|
|
31
|
-
else
|
|
32
|
-
git remote add origin "https://${GIT_USER_ID}:${GIT_TOKEN}@${GIT_REPO_BASE_URL}/${GIT_USER_ID}/${GIT_REPO_ID}.git"
|
|
33
|
-
fi
|
|
38
|
+
git commit -m "$release_note"
|
|
39
|
+
|
|
40
|
+
# Sets the new remote
|
|
41
|
+
git_remote=$(git remote)
|
|
42
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
|
34
43
|
|
|
35
|
-
|
|
36
|
-
git
|
|
44
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
|
45
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
|
46
|
+
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
|
47
|
+
else
|
|
48
|
+
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
|
|
49
|
+
fi
|
|
37
50
|
|
|
38
|
-
|
|
39
|
-
git pull origin main || true
|
|
51
|
+
fi
|
|
40
52
|
|
|
41
|
-
|
|
42
|
-
echo "Git pushing to https://${GIT_REPO_BASE_URL}/${GIT_USER_ID}/${GIT_REPO_ID}.git"
|
|
43
|
-
git push -u origin main 2>&1 | grep -v 'To https'
|
|
53
|
+
git pull origin master
|
|
44
54
|
|
|
55
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
|
56
|
+
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
|
57
|
+
git push origin master 2>&1 | grep -v 'To https'
|