Skip to content

[PROD RELEASE] #1653

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Jun 18, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
4ec89b1
fix: pagination in submissions tab
hentrymartin May 21, 2025
6b81b05
fix: pagination in submissions tab
hentrymartin May 21, 2025
cd5322c
fix: pagination in submissions tab
hentrymartin May 21, 2025
1e3c8e0
Merge pull request #1649 from topcoder-platform/pm-1214
kkartunov May 22, 2025
0eb4fb3
fix: send source to accept or decline invite API
hentrymartin May 30, 2025
8390251
fix: send source to accept or decline invite API
hentrymartin May 30, 2025
713528f
fix: send source to accept or decline invite API
hentrymartin May 30, 2025
a211634
Merge pull request #1650 from topcoder-platform/pm-1169
kkartunov Jun 3, 2025
6063bbe
PM-1178 Update copilot requests form link
Jun 4, 2025
f489bae
PM-1178 Clean up typeform code
Jun 4, 2025
0b819d7
Merge pull request #1651 from topcoder-platform/PM-1178
kkartunov Jun 5, 2025
fc93578
fix: show request copilot for PMs
hentrymartin Jun 10, 2025
9c67f2b
Merge pull request #1652 from topcoder-platform/pm-1317
hentrymartin Jun 10, 2025
3b67a7e
fix: retain query param
hentrymartin Jun 16, 2025
153ab96
fix: retain query param
hentrymartin Jun 16, 2025
1aa70f4
fix: retain query param
hentrymartin Jun 16, 2025
78755ed
Merge pull request #1654 from topcoder-platform/pm-1355
hentrymartin Jun 16, 2025
b3eb22c
fix: send source only if its available
hentrymartin Jun 16, 2025
612a798
fix: send source only if its available
hentrymartin Jun 16, 2025
8d4d3a8
fix: send source only if its available
hentrymartin Jun 16, 2025
37c544a
Merge pull request #1655 from topcoder-platform/pm-1355_1
hentrymartin Jun 16, 2025
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ workflows:
context: org-global
filters: &filters-dev
branches:
only: ["develop", "PM-803_wm-regression-fixes", "PM-902_show-all-projects-on-challenge-page"]
only: ["develop", "PM-803_wm-regression-fixes", "PM-902_show-all-projects-on-challenge-page", "pm-1169"]

# Production builds are exectuted only on tagged commits to the
# master branch.
Expand Down
12 changes: 7 additions & 5 deletions src/containers/ProjectInvitations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ const ProjectInvitations = ({ match, auth, isProjectLoading, history, projectDet
const [isUpdating, setIsUpdating] = useState(automaticAction || false)
const isAccepting = isUpdating === PROJECT_MEMBER_INVITE_STATUS_ACCEPTED
const isDeclining = isUpdating === PROJECT_MEMBER_INVITE_STATUS_REFUSED
const queryParams = new URLSearchParams(window.location.search)
const source = queryParams.get('source')

useEffect(() => {
if (!projectId) {
Expand All @@ -42,9 +44,9 @@ const ProjectInvitations = ({ match, auth, isProjectLoading, history, projectDet
}
}, [projectId, auth, projectDetail, isProjectLoading, history])

const updateInvite = useCallback(async (status) => {
const updateInvite = useCallback(async (status, source) => {
setIsUpdating(status)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The updateInvite function now takes an additional source parameter, but it's not clear how this parameter is being used within the function. Ensure that the source parameter is necessary and is being utilized appropriately in the updateProjectMemberInvite function.

await updateProjectMemberInvite(projectId, invitation.id, status)
await updateProjectMemberInvite(projectId, invitation.id, status, source)

// await for the project details to propagate
await delay(1000)
Expand All @@ -56,8 +58,8 @@ const ProjectInvitations = ({ match, auth, isProjectLoading, history, projectDet
history.push(status === PROJECT_MEMBER_INVITE_STATUS_ACCEPTED ? `/projects/${projectId}/challenges` : '/projects')
}, [projectId, invitation, loadProjectInvites, history])

const acceptInvite = useCallback(() => updateInvite(PROJECT_MEMBER_INVITE_STATUS_ACCEPTED), [updateInvite])
const declineInvite = useCallback(() => updateInvite(PROJECT_MEMBER_INVITE_STATUS_REFUSED), [updateInvite])
const acceptInvite = useCallback(() => updateInvite(PROJECT_MEMBER_INVITE_STATUS_ACCEPTED, source), [updateInvite, source])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The acceptInvite function now includes a source parameter. Ensure that source is defined and passed correctly to avoid potential runtime errors.

const declineInvite = useCallback(() => updateInvite(PROJECT_MEMBER_INVITE_STATUS_REFUSED, source), [updateInvite, source])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The declineInvite function now includes a source parameter. Ensure that source is defined and passed correctly to avoid potential runtime errors.


useEffect(() => {
if (!invitation || !automaticAction) {
Expand All @@ -69,7 +71,7 @@ const ProjectInvitations = ({ match, auth, isProjectLoading, history, projectDet
} else if (automaticAction === PROJECT_MEMBER_INVITE_STATUS_REFUSED) {
declineInvite()
}
}, [invitation, automaticAction])
}, [invitation, automaticAction, source])

return (
<>
Expand Down
4 changes: 2 additions & 2 deletions src/services/projectMemberInvites.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import { PROJECTS_API_URL } from '../config/constants'
* @param {string} status the new status for invitation
* @return {object} project member invite returned by api
*/
export function updateProjectMemberInvite (projectId, inviteId, status) {
export function updateProjectMemberInvite (projectId, inviteId, status, source) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function updateProjectMemberInvite now includes an additional parameter source. Ensure that all calls to this function throughout the codebase are updated to pass this new parameter, or provide a default value if it's optional.

const url = `${PROJECTS_API_URL}/${projectId}/invites/${inviteId}`
return axios.patch(url, { status })
return axios.patch(url, { status, source })
.then(resp => resp.data)
}

Expand Down