Bug 1619017 - Remove exception code for Thunderbird treenames in TreeStatus. (#6080)

New Thunderbird trees are set up and are named the same as the repositories.
The getTreeStatusName is no longer needed.
This commit is contained in:
Armen Zambrano 2020-03-05 08:52:02 -05:00 коммит произвёл GitHub
Родитель 5f6e02e75c
Коммит a1d89b7657
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 2 добавлений и 12 удалений

Просмотреть файл

@ -130,7 +130,6 @@ export default class WatchedRepo extends React.Component {
const activeClass = watchedRepo === repoName ? 'active' : '';
const { btnClass, icon, color } = statusInfo;
const pulseIcon = statusInfo.pulseIcon || null;
const treeStatusName = TreeStatusModel.getTreeStatusName(watchedRepo);
const changeRepoUrl = getRepoUrl(watchedRepo);
return (
@ -201,7 +200,7 @@ export default class WatchedRepo extends React.Component {
)}
<DropdownItem
tag="a"
href={`https://treestatus.mozilla-releng.net/static/ui/treestatus/show/${treeStatusName}`}
href={`https://treestatus.mozilla-releng.net/static/ui/treestatus/show/${watchedRepo}`}
target="_blank"
rel="noopener noreferrer"
>

Просмотреть файл

@ -1,17 +1,8 @@
const uri = 'https://treestatus.mozilla-releng.net/trees/';
export default class TreeStatusModel {
static getTreeStatusName(name) {
// The thunderbird names in TreeStatus don't match what
// we use, so translate them. pretty hacky, yes...
// TODO: Move these to the repository fixture in the service.
return name.includes('comm-') && name !== 'try-comm-central'
? `${name}-thunderbird`
: name;
}
static get(repoName) {
return fetch(`${uri}${TreeStatusModel.getTreeStatusName(repoName)}`)
return fetch(`${uri}${repoName}`)
.then(async resp => {
if (resp.ok) {
return resp.json();