Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
114 changes: 102 additions & 12 deletions .github/workflows/pr-metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,19 @@ jobs:
break;
}

const changedLines = files.reduce((sum, file) => sum + file.additions + file.deletions, 0);
let priority = 'Medium';
if (labels.has('data') && (files.length >= 25 || changedLines >= 1000)) {
priority = 'High';
} else if (labels.has('data') || labels.has('app') || title.startsWith('fix')) {
priority = 'High';
} else if (labels.size === 1 && labels.has('documentation')) {
priority = 'Low';
} else if (changedLines <= 25 && !labels.has('ci')) {
priority = 'Low';
}
core.exportVariable('TRIAGE_PRIORITY', priority);

const trackingIssuesByLabel = new Map([
['data', 1],
['site', 19],
Expand Down Expand Up @@ -131,20 +144,97 @@ jobs:
body: updatedBody,
});
}
}

const changedLines = files.reduce((sum, file) => sum + file.additions + file.deletions, 0);
let priority = 'Medium';
if (labels.has('data') && (files.length >= 25 || changedLines >= 1000)) {
priority = 'High';
} else if (labels.has('data') || labels.has('app') || title.startsWith('fix')) {
priority = 'High';
} else if (labels.size === 1 && labels.has('documentation')) {
priority = 'Low';
} else if (changedLines <= 25 && !labels.has('ci')) {
priority = 'Low';
const changedByTopLevel = new Map();
const changedData = new Map([
['brand', { added: 0, modified: 0, deleted: 0 }],
['soc', { added: 0, modified: 0, deleted: 0 }],
['smartphone', { added: 0, modified: 0, deleted: 0 }],
['gpu', { added: 0, modified: 0, deleted: 0 }],
['cpu', { added: 0, modified: 0, deleted: 0 }],
]);
for (const file of files) {
const top = file.filename.split('/')[0] || '(root)';
changedByTopLevel.set(top, (changedByTopLevel.get(top) || 0) + 1);
const parts = file.filename.split('/');
if (parts[0] === 'data' && changedData.has(parts[1])) {
const bucket = changedData.get(parts[1]);
const status = file.status === 'removed'
? 'deleted'
: file.status === 'added'
? 'added'
: 'modified';
bucket[status] += 1;
}
}

const dataRows = [...changedData.entries()]
.filter(([, counts]) => counts.added || counts.modified || counts.deleted)
.map(([category, counts]) => `| ${category} | ${counts.added} | ${counts.modified} | ${counts.deleted} |`)
.join('\n') || '| none | 0 | 0 | 0 |';
const topRows = [...changedByTopLevel.entries()]
.sort((a, b) => b[1] - a[1])
.slice(0, 8)
.map(([area, count]) => `| ${area} | ${count} |`)
.join('\n');
const labelText = [...labels].sort().map((label) => `\`${label}\``).join(', ') || 'none';
const trackerComment = [
`<!-- techapi-tracking-issue-pr-${issue_number} -->`,
`## Linked PR update: ${pr.title} #${issue_number}`,
'',
`- PR: ${pr.html_url}`,
`- Branch: \`${pr.head.ref}\``,
`- Author: @${pr.user.login}`,
`- Labels: ${labelText}`,
`- Priority: ${priority}`,
`- Files changed: ${files.length}`,
`- Lines changed: +${files.reduce((sum, file) => sum + file.additions, 0)} / -${files.reduce((sum, file) => sum + file.deletions, 0)}`,
'',
'### Changed Data',
'',
'| Category | Added | Modified | Deleted |',
'| --- | ---: | ---: | ---: |',
dataRows,
'',
'### Changed Areas',
'',
'| Area | Files |',
'| --- | ---: |',
topRows || '| none | 0 |',
'',
'### Notes',
'',
'- This is an automatic tracking comment for the long-running issue.',
'- PR validation details are posted on the PR by TechEngineBot.',
'- The tracker issue remains open even when the PR uses `Closes #...` for GitHub Development linking.',
].join('\n');

for (const issueNumber of trackingIssues) {
const comments = await github.paginate(github.rest.issues.listComments, {
owner,
repo,
issue_number: issueNumber,
per_page: 100,
});
const marker = `<!-- techapi-tracking-issue-pr-${issue_number} -->`;
const existing = comments.find((comment) => comment.body?.includes(marker));
if (existing) {
await github.rest.issues.updateComment({
owner,
repo,
comment_id: existing.id,
body: trackerComment,
});
} else {
await github.rest.issues.createComment({
owner,
repo,
issue_number: issueNumber,
body: trackerComment,
});
}
}
}
core.exportVariable('TRIAGE_PRIORITY', priority);

- name: Add PR to configured projects
if: env.TRIAGE_PROJECT_URLS != '' && env.PROJECT_TOKEN != ''
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"slug": "one-touch-pop-4-global-dual-sim-lte-5056d-pop-4-plus",
"name": "One Touch Pop 4+ Global Dual SIM LTE 5056D / Pop 4 Plus",
"brand": "alcatel",
"soc": "snapdragon-210",
"release_date": "2016-03-01",
"ram_gb": 2,
"battery_mah": 2500,
"weight_g": 156.0,
"os": "Android",
"verified": false,
"source_urls": [
"https://www.kaggle.com/datasets/sady36/mobile-phones-specs"
],
"os_version": "6.0",
"storage_options_gb": [
16
],
"display": {
"size_inch": 5.5,
"resolution": "720x1280",
"type": "Color IPS TFT LCD display",
"ppi": 267
},
"cameras": [
{
"type": "main",
"mp": 8.0
},
{
"type": "selfie",
"mp": 5.0
}
],
"connectivity": {
"bluetooth": "Bluetooth 4.1",
"usb": "USB Micro-B (Micro-USB)"
},
"market_countries": "Austria , Belarus , Belgium , Bulgaria , Czech , Denmark , Estonia , Finland , France , Germany , Hungary , Italy , Latvia , Lithuania , Netherlands , Norway , Pakistan , Poland , Portugal , Russia , Romania , Saudi Arabia , Serbia , Slovakia , Slovenia , Spain , Switzerland , Sweden , UAE , UK , Ukraine",
"market_regions": "Asia , Eastern Europe , Europe , Middle East , Western Europe"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"slug": "one-touch-pop-4-lte-latam-5056a-pop-4-plus",
"name": "One Touch Pop 4+ LTE LATAM 5056A / Pop 4 Plus",
"brand": "alcatel",
"soc": "snapdragon-210",
"release_date": "2016-09-01",
"ram_gb": 2,
"battery_mah": 2500,
"weight_g": 156.0,
"os": "Android",
"verified": false,
"source_urls": [
"https://www.kaggle.com/datasets/sady36/mobile-phones-specs"
],
"os_version": "6.0",
"storage_options_gb": [
16
],
"display": {
"size_inch": 5.5,
"resolution": "720x1280",
"type": "Color IPS TFT LCD display",
"ppi": 267
},
"cameras": [
{
"type": "main",
"mp": 8.0
},
{
"type": "selfie",
"mp": 5.0
}
],
"charging_wired_w": 5,
"connectivity": {
"bluetooth": "Bluetooth 4.1",
"usb": "USB Micro-B (Micro-USB)"
},
"market_countries": "Mexico",
"market_regions": "North America"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"slug": "one-touch-pop-4-plus-dual-sim-lte-am-5056e-pop-4",
"name": "One Touch Pop 4 Plus Dual SIM LTE AM 5056E / Pop 4+",
"brand": "alcatel",
"soc": "snapdragon-210",
"release_date": "2016-08-01",
"ram_gb": 2,
"battery_mah": 2500,
"weight_g": 156.0,
"os": "Android",
"verified": false,
"source_urls": [
"https://www.kaggle.com/datasets/sady36/mobile-phones-specs"
],
"os_version": "6.0",
"storage_options_gb": [
16
],
"display": {
"size_inch": 5.5,
"resolution": "720x1280",
"type": "Color IPS TFT LCD display",
"ppi": 267
},
"cameras": [
{
"type": "main",
"mp": 8.0
},
{
"type": "selfie",
"mp": 5.0
}
],
"charging_wired_w": 5,
"connectivity": {
"bluetooth": "Bluetooth 4.1",
"usb": "USB Micro-B (Micro-USB)"
},
"market_countries": "Canada , Ecuador , Mexico , Peru , USA",
"market_regions": "North America , South America"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"slug": "one-touch-pop-4-plus-lte-am-5056g-pop-4",
"name": "One Touch Pop 4 Plus LTE AM 5056G / Pop 4+",
"brand": "alcatel",
"soc": "snapdragon-210",
"release_date": "2016-09-01",
"ram_gb": 2,
"battery_mah": 2500,
"weight_g": 156.0,
"os": "Android",
"verified": false,
"source_urls": [
"https://www.kaggle.com/datasets/sady36/mobile-phones-specs"
],
"os_version": "6.0",
"storage_options_gb": [
16
],
"display": {
"size_inch": 5.5,
"resolution": "720x1280",
"type": "Color IPS TFT LCD display",
"ppi": 267
},
"cameras": [
{
"type": "main",
"mp": 8.0
},
{
"type": "selfie",
"mp": 5.0
}
],
"charging_wired_w": 5,
"connectivity": {
"bluetooth": "Bluetooth 4.1",
"usb": "USB Micro-B (Micro-USB)"
},
"market_countries": "Argentina , Canada , Chile , Paraguay , Peru",
"market_regions": "North America , South America"
}
41 changes: 41 additions & 0 deletions data/smartphone/alcatel/2018/5v-dual-sim-lte-emea.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"slug": "5v-dual-sim-lte-emea",
"name": "5V Dual SIM LTE EMEA",
"brand": "alcatel",
"soc": "helio-p22",
"release_date": "2018-07-01",
"ram_gb": 3.0,
"battery_mah": 4000,
"weight_g": 158.0,
"os": "Android",
"verified": false,
"source_urls": [
"https://www.kaggle.com/datasets/sady36/mobile-phones-specs"
],
"os_version": "8.1",
"storage_options_gb": [
32
],
"display": {
"size_inch": 6.2,
"resolution": "720x1500",
"type": "Color IPS TFT LCD display",
"ppi": 268
},
"cameras": [
{
"type": "main",
"mp": 12.2
},
{
"type": "selfie",
"mp": 8.0
}
],
"connectivity": {
"bluetooth": "Bluetooth 4.0",
"usb": "USB C reversible"
},
"market_countries": "France , Germany , Hungary , Italy , Poland , Portugal , Romania , Russia , Spain , UK",
"market_regions": "Eastern Europe , Europe , Western Europe"
}
41 changes: 41 additions & 0 deletions data/smartphone/alcatel/2018/7-lte-am-6062w.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"slug": "7-lte-am-6062w",
"name": "7 LTE AM 6062W",
"brand": "alcatel",
"soc": "helio-p23",
"release_date": "2018-09-01",
"ram_gb": 2.0,
"battery_mah": 4000,
"weight_g": 175.0,
"os": "Android",
"verified": false,
"source_urls": [
"https://www.kaggle.com/datasets/sady36/mobile-phones-specs"
],
"os_version": "8.1",
"storage_options_gb": [
32
],
"display": {
"size_inch": 6.0,
"resolution": "1080x2180",
"type": "Color IPS TFT LCD display",
"ppi": 405
},
"cameras": [
{
"type": "main",
"mp": 12.2
},
{
"type": "selfie",
"mp": 8.0
}
],
"connectivity": {
"bluetooth": "Bluetooth 4.2",
"usb": "USB Micro-B (Micro-USB)"
},
"market_countries": "USA",
"market_regions": "North America"
}
Loading
Loading