MCPcopy
hub / github.com/buildbot/buildbot / ResponsibleUsersTabWidget

Function ResponsibleUsersTabWidget

www/base/src/views/BuildView/BuildView.tsx:173–199  ·  view source on GitHub ↗
({build, propertiesQuery}: ResponsibleUsersTabWidgetProps)

Source from the content-addressed store, hash-verified

171} & TabWidgetProps;
172
173const ResponsibleUsersTabWidget = ({build, propertiesQuery}: ResponsibleUsersTabWidgetProps) => {
174 const changesQuery = useDataApiSingleElementQuery(
175 build, [],
176 b => b.getChanges({subscribe: false, query: {field: 'author'}})
177 );
178
179 if (!propertiesQuery.isResolved() || !changesQuery.isResolved()) {
180 return <LoadingSpan />
181 }
182
183 const responsibleUsers = computed(() => getResponsibleUsers(
184 propertiesQuery,
185 new Set(changesQuery.array.map(c => c.author))
186 )).get();
187
188 return (
189 <ul className="list-group">
190 {
191 Object.entries(responsibleUsers).map(([author, email], index) => (
192 <li key={index} className="list-group-item">
193 <ChangeUserAvatar name={author} email={email} showName={true}/>
194 </li>
195 ))
196 }
197 </ul>
198 );
199}
200
201const BuildView = observer(() => {
202 const builderid = useParams<"builderid">().builderid;

Callers

nothing calls this directly

Calls 5

getResponsibleUsersFunction · 0.85
isResolvedMethod · 0.65
getMethod · 0.65
getChangesMethod · 0.45

Tested by

no test coverage detected