Skip to content

Commit 179a3f1

Browse files
committed
chore(greenhouse): show a Team's members from the Team status
1 parent f8bda70 commit 179a3f1

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

.secret

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
GITHUB_TOKEN=e60d9593d484cd15cc610cfd8ac7bb7f26793c01

apps/greenhouse/src/components/core-apps/org-admin/components/teams/components/team/TeamList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const TeamList = () => {
2626
// @ts-ignore
2727
const matchingTeam = teamMemberships.find((item: any) => item.metadata.name === selectedTeam)
2828

29-
return matchingTeam?.spec?.members || []
29+
return matchingTeam?.status?.members || []
3030
}, [selectedTeam, teamMemberships])
3131

3232
const { scrollListItems, iterator } = useEndlessScrollList(team, {

apps/greenhouse/src/components/core-apps/org-admin/components/teams/hooks/useAPI.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const useAPI = () => {
2222
const watchTeamMembers = useCallback(() => {
2323
if (!client || !namespace) return
2424

25-
const watch = client.watch(`/apis/greenhouse.sap/v1alpha1/namespaces/${namespace}/teammemberships`)
25+
const watch = client.watch(`/apis/greenhouse.sap/v1alpha1/namespaces/${namespace}/teams`)
2626

2727
watch.on(client.WATCH_ERROR, (e: any) => {
2828
console.log("ERROR: Failed to watch resource", e)

0 commit comments

Comments
 (0)