Skip to content

Commit 67f6b8d

Browse files
committed
Add new github ID field, and feeds importer keyed on the new field.
1 parent 3c8220c commit 67f6b8d

8 files changed

+167
-11
lines changed
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
{
2+
"_config_name": "feeds.feeds_importer.github_features",
3+
"id": "github_features",
4+
"disabled": false,
5+
"config": {
6+
"name": "GitHub Features",
7+
"description": "Import Feature Requests from GitHub Issue queue.",
8+
"fetcher": {
9+
"plugin_key": "FeedsHTTPFetcher",
10+
"config": {
11+
"auto_detect_feeds": false,
12+
"use_pubsubhubbub": false,
13+
"designated_hub": "",
14+
"request_timeout": null,
15+
"auto_scheme": "http",
16+
"accept_invalid_cert": false,
17+
"cache_http_result": true
18+
}
19+
},
20+
"parser": {
21+
"plugin_key": "FeedsJSONPathParser",
22+
"config": {
23+
"context": "*",
24+
"sources": {
25+
"jsonpath_parser:0": "id",
26+
"jsonpath_parser:1": "title",
27+
"jsonpath_parser:2": "body",
28+
"jsonpath_parser:3": "html_url",
29+
"jsonpath_parser:4": ""
30+
},
31+
"debug": {
32+
"options": {
33+
"context": 0,
34+
"jsonpath_parser:0": 0,
35+
"jsonpath_parser:1": 0,
36+
"jsonpath_parser:2": 0,
37+
"jsonpath_parser:3": 0,
38+
"jsonpath_parser:4": 0
39+
}
40+
},
41+
"allow_override": 0,
42+
"convert_four_byte": 0
43+
}
44+
},
45+
"processor": {
46+
"plugin_key": "FeedsNodeProcessor",
47+
"config": {
48+
"expire": "-1",
49+
"author": "1302",
50+
"authorize": 0,
51+
"mappings": [
52+
{
53+
"source": "jsonpath_parser:0",
54+
"target": "field_github_uid",
55+
"unique": 1,
56+
"language": "und"
57+
},
58+
{
59+
"source": "jsonpath_parser:1",
60+
"target": "title",
61+
"unique": false,
62+
"language": "und"
63+
},
64+
{
65+
"source": "jsonpath_parser:2",
66+
"target": "body",
67+
"unique": false,
68+
"language": "und"
69+
},
70+
{
71+
"source": "jsonpath_parser:3",
72+
"target": "field_github_link:url",
73+
"unique": false,
74+
"language": "und"
75+
},
76+
{
77+
"source": "jsonpath_parser:4",
78+
"target": "field_github_uid",
79+
"unique": false,
80+
"language": "und"
81+
}
82+
],
83+
"insert_new": "1",
84+
"update_existing": "2",
85+
"update_non_existent": "skip",
86+
"input_format": "markdown",
87+
"skip_hash_check": 0,
88+
"bundle": "feature",
89+
"language": "und"
90+
}
91+
},
92+
"content_type": "",
93+
"update": 0,
94+
"import_period": "43200",
95+
"expire_period": 3600,
96+
"import_on_create": 1,
97+
"process_in_background": 0
98+
}
99+
}

config/staging/field.bundle.node.feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"extra_fields": {
77
"form": {
88
"title": {
9-
"weight": "-5"
9+
"weight": "0"
1010
}
1111
},
1212
"display": []
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"_config_name": "field.field.field_github_uid",
3+
"field_name": "field_github_uid",
4+
"type": "text",
5+
"translatable": false,
6+
"module": "text",
7+
"active": 1,
8+
"locked": 0,
9+
"cardinality": "1",
10+
"deleted": 0,
11+
"entity_types": [],
12+
"settings": {
13+
"max_length": "255"
14+
},
15+
"storage": {
16+
"type": "field_sql_storage",
17+
"settings": [],
18+
"module": "field_sql_storage",
19+
"active": 1
20+
}
21+
}

config/staging/field.instance.node.feature.body.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@
1010
"rows": 10,
1111
"summary_rows": 5
1212
},
13-
"weight": "-4",
13+
"weight": "1",
1414
"module": "text"
1515
},
1616
"settings": {
1717
"display_summary": true,
1818
"text_processing": 1,
19-
"user_register_form": false
19+
"user_register_form": false,
20+
"allowed_formats": []
2021
},
2122
"display": {
2223
"default": {

config/staging/field.instance.node.feature.field_github_id.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"field_name": "field_github_id",
44
"entity_type": "node",
55
"bundle": "feature",
6-
"label": "GitHub ID",
6+
"label": "GitHub ID (Legacy)",
77
"widget": {
8-
"weight": "-2",
8+
"weight": "3",
99
"type": "number",
1010
"module": "number",
1111
"active": 0,
@@ -18,7 +18,7 @@
1818
"default_value_function": null,
1919
"settings": {
2020
"min": "",
21-
"max": "999999999999",
21+
"max": "2147483646",
2222
"prefix": "",
2323
"suffix": "",
2424
"user_register_form": false
@@ -27,7 +27,7 @@
2727
"default": {
2828
"label": "hidden",
2929
"type": "hidden",
30-
"weight": "2",
30+
"weight": "4",
3131
"settings": []
3232
}
3333
}

config/staging/field.instance.node.feature.field_github_issue.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"bundle": "feature",
66
"label": "GitHub Issue #",
77
"widget": {
8-
"weight": "-1",
8+
"weight": "5",
99
"type": "number",
1010
"module": "number",
1111
"active": 0,
@@ -27,7 +27,7 @@
2727
"default": {
2828
"label": "inline",
2929
"type": "number_integer",
30-
"weight": "3",
30+
"weight": "2",
3131
"settings": {
3232
"thousand_separator": "",
3333
"decimal_separator": ".",

config/staging/field.instance.node.feature.field_github_link.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"bundle": "feature",
66
"label": "GitHub Link",
77
"widget": {
8-
"weight": "-3",
8+
"weight": "2",
99
"type": "link_field",
1010
"module": "link",
1111
"active": 0,
@@ -36,7 +36,8 @@
3636
"title": ""
3737
},
3838
"rel_remove": "default",
39-
"user_register_form": false
39+
"user_register_form": false,
40+
"type": "both"
4041
},
4142
"display": {
4243
"default": {
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"_config_name": "field.instance.node.feature.field_github_uid",
3+
"field_name": "field_github_uid",
4+
"entity_type": "node",
5+
"bundle": "feature",
6+
"label": "GitHub ID",
7+
"widget": {
8+
"weight": "4",
9+
"type": "text_textfield",
10+
"module": "text",
11+
"active": 1,
12+
"settings": {
13+
"size": "60"
14+
}
15+
},
16+
"description": "",
17+
"required": 0,
18+
"deleted": 0,
19+
"default_value": null,
20+
"default_value_function": null,
21+
"settings": {
22+
"text_processing": "0",
23+
"allowed_formats": [],
24+
"user_register_form": false
25+
},
26+
"display": {
27+
"default": {
28+
"label": "hidden",
29+
"type": "hidden",
30+
"weight": "3",
31+
"settings": []
32+
}
33+
}
34+
}

0 commit comments

Comments
 (0)