Class: Webhookdb::Replicator::GithubIssueV1
- Inherits:
-
Base
- Object
- Base
- Webhookdb::Replicator::GithubIssueV1
show all
- Includes:
- Appydays::Loggable, GithubRepoV1Mixin
- Defined in:
- lib/webhookdb/replicator/github_issue_v1.rb
Constant Summary
Webhookdb::Replicator::GithubRepoV1Mixin::API_VERSION, Webhookdb::Replicator::GithubRepoV1Mixin::JSON_CONTENT_TYPE
Constants inherited
from Base
Base::MAX_INDEX_NAME_LENGTH
DBAdapter::ColumnTypes::BIGINT, DBAdapter::ColumnTypes::BIGINT_ARRAY, DBAdapter::ColumnTypes::BOOLEAN, DBAdapter::ColumnTypes::COLUMN_TYPES, DBAdapter::ColumnTypes::DATE, DBAdapter::ColumnTypes::DECIMAL, DBAdapter::ColumnTypes::DOUBLE, DBAdapter::ColumnTypes::FLOAT, DBAdapter::ColumnTypes::INTEGER, DBAdapter::ColumnTypes::INTEGER_ARRAY, DBAdapter::ColumnTypes::OBJECT, DBAdapter::ColumnTypes::TEXT, DBAdapter::ColumnTypes::TEXT_ARRAY, DBAdapter::ColumnTypes::TIMESTAMP, DBAdapter::ColumnTypes::UUID
Instance Attribute Summary
#service_integration
Attributes inherited from Base
#service_integration
Class Method Summary
collapse
Instance Method Summary
collapse
_api_docs_url, #_fetch_backfill_page, #_fetch_enrichment, #_fullreponame, #_handle_repo_name_state_machine, #_http_get, #_is_repo_public?, #_prepare_for_insert, #_reponame, #_repoowner, #_resource_and_event, #_resource_to_data, #_update_where_expr, #_valid_repo_name?, #_verify_backfill_err_msg, #_webhook_response, #_webhook_state_change_fields, #calculate_backfill_state_machine, #calculate_webhook_state_machine, #process_state_change
Methods inherited from Base
#_any_subscriptions_to_notify?, #_backfill_state_change_fields, #_backfillers, #_clear_backfill_information, #_clear_webook_information, #_coalesce_excluded_on_update, #_enqueue_backfill_jobs, #_extra_index_specs, #_fetch_enrichment, #_find_dependency_candidate, #_notify_dependents, #_parallel_backfill, #_prepare_for_insert, #_publish_rowupsert, #_resource_and_event, #_resource_to_data, #_store_enrichment_body?, #_to_json, #_update_where_expr, #_upsert_update_expr, #_upsert_webhook, #_verify_backfill_err_msg, #_webhook_response, #_webhook_state_change_fields, #admin_dataset, #backfill, #backfill_not_supported_message, #calculate_and_backfill_state_machine, #calculate_backfill_state_machine, #calculate_dependency_state_machine_step, #calculate_preferred_create_state_machine, #calculate_webhook_state_machine, chunked_row_update_bounds, #clear_backfill_information, #clear_webhook_information, #create_table, #create_table_modification, #data_column, #dbadapter_table, #denormalized_columns, #descriptor, #dispatch_request_to, #documentation_url, #enqueue_sync_targets, #enrichment_column, #ensure_all_columns, #ensure_all_columns_modification, #find_dependent, #find_dependent!, #indices, #initialize, #on_dependency_webhook_upsert, #preferred_create_state_machine_method, #preprocess_headers_for_logging, #primary_key_column, #process_state_change, #process_webhooks_synchronously?, #qualified_table_sequel_identifier, #readonly_dataset, #remote_key_column, #requires_sequence?, #resource_name_plural, #resource_name_singular, #schema_and_table_symbols, #storable_columns, #synchronous_processing_response_body, #timestamp_column, #upsert_has_deps?, #upsert_webhook, #upsert_webhook_body, #verify_backfill_credentials, #webhook_endpoint, #webhook_response
Instance Method Details
#_denormalized_columns ⇒ Object
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
# File 'lib/webhookdb/replicator/github_issue_v1.rb', line 42
def _denormalized_columns
return [
Webhookdb::Replicator::Column.new(:node_id, TEXT, index: true),
Webhookdb::Replicator::Column.new(:number, INTEGER, index: true),
Webhookdb::Replicator::Column.new(:state, TEXT),
Webhookdb::Replicator::Column.new(:user_id, BIGINT, index: true, data_key: ["user", "id"], optional: true),
Webhookdb::Replicator::Column.new(
:closed_by_id,
BIGINT,
index: true,
data_key: ["closed_by", "id"],
optional: true,
),
Webhookdb::Replicator::Column.new(
:assignee_ids,
BIGINT_ARRAY,
index: true,
data_key: "assignees",
optional: true,
converter: Webhookdb::Replicator::Column.converter_array_pluck("id", BIGINT),
),
Webhookdb::Replicator::Column.new(
:milestone_number,
INTEGER,
data_key: ["milestone", "number"],
optional: true,
),
Webhookdb::Replicator::Column.new(
:label_ids,
BIGINT_ARRAY,
data_key: "labels",
optional: true,
converter: Webhookdb::Replicator::Column.converter_array_pluck("id", BIGINT),
),
Webhookdb::Replicator::Column.new(:created_at, TIMESTAMP, index: true),
Webhookdb::Replicator::Column.new(:closed_at, TIMESTAMP, index: true),
Webhookdb::Replicator::Column.new(:updated_at, TIMESTAMP, index: true),
]
end
|
#_mixin_backfill_url ⇒ Object
10
|
# File 'lib/webhookdb/replicator/github_issue_v1.rb', line 10
def _mixin_backfill_url = "/issues"
|
#_mixin_fetch_resource_if_field_missing ⇒ Object
14
|
# File 'lib/webhookdb/replicator/github_issue_v1.rb', line 14
def _mixin_fetch_resource_if_field_missing = "closed_by"
|
#_mixin_fine_grained_permission ⇒ Object
13
|
# File 'lib/webhookdb/replicator/github_issue_v1.rb', line 13
def _mixin_fine_grained_permission = "Issues"
|
#_mixin_query_params(last_backfilled:) ⇒ Object
16
17
18
19
20
21
22
23
|
# File 'lib/webhookdb/replicator/github_issue_v1.rb', line 16
def _mixin_query_params(last_backfilled:)
q = {state: "all"}
if last_backfilled
q[:sort] = "updated"
q[:since] = last_backfilled.utc.iso8601
end
return q
end
|
#_mixin_webhook_events ⇒ Object
11
|
# File 'lib/webhookdb/replicator/github_issue_v1.rb', line 11
def _mixin_webhook_events = ["Issues"]
|
#_mixin_webhook_key ⇒ Object
12
|
# File 'lib/webhookdb/replicator/github_issue_v1.rb', line 12
def _mixin_webhook_key = "issue"
|
#_remote_key_column ⇒ Object
38
39
40
|
# File 'lib/webhookdb/replicator/github_issue_v1.rb', line 38
def _remote_key_column
return Webhookdb::Replicator::Column.new(:github_id, BIGINT, data_key: "id")
end
|
#_timestamp_column_name ⇒ Object
82
|
# File 'lib/webhookdb/replicator/github_issue_v1.rb', line 82
def _timestamp_column_name = :updated_at
|