Skip to content
Closed
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pw/patchwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ def __init__(self, config):
self._project = int(config_project)
except ValueError:
raise Exception("Patchwork project not found", config_project)
pw_project = self.get('projects', self._project)
if not pw_project:
raise Exception("Patchwork project not found", config_project)
self.project_link_name = pw_project['link_name']

def _request(self, url):
try:
Expand Down
1 change: 1 addition & 0 deletions pw_air_poller.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ def submit_to_air(self, series_id: int) -> Optional[str]:
'token': self.air_token,
'tree': self.air_tree,
'patchwork_series_id': series_id,
'patchwork_project_link_name': self.patchwork.project_link_name,
}

if self.air_branch:
Expand Down
3 changes: 2 additions & 1 deletion ui/ai-review.html
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,8 @@ <h2>Review Information <span style="font-family: monospace; font-size: 0.75em; f
// Patchwork series ID
if (data.patchwork_series_id) {
document.getElementById('patchwork-info').style.display = 'block';
const pwUrl = `https://patchwork.kernel.org/project/netdevbpf/list/?series=${data.patchwork_series_id}`;
const pwProject = data.patchwork_project_link_name || 'netdevbpf';
const pwUrl = `https://patchwork.kernel.org/project/${pwProject}/list/?series=${data.patchwork_series_id}`;
document.getElementById('review-pw-series').innerHTML = `<a href="${pwUrl}" target="_blank" rel="noopener noreferrer">${data.patchwork_series_id}</a>`;
}

Expand Down
6 changes: 4 additions & 2 deletions ui/air.html
Original file line number Diff line number Diff line change
Expand Up @@ -1940,7 +1940,8 @@ <h3 style="margin-top: 40px;">Daily Averages (by feedback status)</h3>

// Show patch source information
if (data.patchwork_series_id) {
const pwUrl = `https://patchwork.kernel.org/project/netdevbpf/list/?series=${data.patchwork_series_id}`;
const pwProject = data.patchwork_project_link_name || 'netdevbpf';
const pwUrl = `https://patchwork.kernel.org/project/${pwProject}/list/?series=${data.patchwork_series_id}`;
html += `<p><strong>Patchwork Series:</strong> <a href="${pwUrl}" target="_blank" rel="noopener noreferrer">${data.patchwork_series_id}</a></p>`;
} else if (data.hash) {
html += `<p><strong>Hash/Range:</strong> <code>${data.hash}</code></p>`;
Expand Down Expand Up @@ -2035,7 +2036,8 @@ <h3 style="margin-top: 40px;">Daily Averages (by feedback status)</h3>
// Determine submission type
let submissionType = '';
if (review.patchwork_series_id) {
const pwUrl = `https://patchwork.kernel.org/project/netdevbpf/list/?series=${review.patchwork_series_id}`;
const pwProject = data.patchwork_project_link_name || 'netdevbpf';
const pwUrl = `https://patchwork.kernel.org/project/${pwProject}/list/?series=${review.patchwork_series_id}`;
submissionType = `Patchwork: <span onclick="event.stopPropagation(); event.preventDefault(); window.open('${pwUrl}', '_blank');" style="cursor: pointer; text-decoration: underline;">${review.patchwork_series_id}</span>`;
} else if (review.hash) {
submissionType = `Hash: ${review.hash.substring(0, 12)}`;
Expand Down