Skip to content
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

Dev Portfolio: Make opened PR's Optional for TPMs #633

Merged
merged 1 commit into from
Sep 22, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const DevPortfolioForm: React.FC = () => {
const userInfo = useSelf()!;
const isTpm = userInfo.role === 'tpm';
const isDevAdvisor = userInfo.role === 'dev-advisor';
const isOpenedPROptional = isTpm || isDevAdvisor;

const [devPortfolio, setDevPortfolio] = useState<DevPortfolio | undefined>(undefined);
const [devPortfolios, setDevPortfolios] = useState<DevPortfolio[]>([]);
Expand Down Expand Up @@ -87,7 +88,7 @@ const DevPortfolioForm: React.FC = () => {
? devPortfolio.lateDeadline
: devPortfolio?.deadline;

if (!isDevAdvisor && otherEmpty && (openedEmpty || reviewedEmpty)) {
if (!isOpenedPROptional && otherEmpty && (openedEmpty || reviewedEmpty)) {
Emitters.generalError.emit({
headerMsg: 'No opened or reviewed PR url submitted',
contentMsg: 'Please paste a link to a opened and reviewed PR!'
Expand Down Expand Up @@ -225,7 +226,7 @@ const DevPortfolioForm: React.FC = () => {
placeholder="Opened PR"
label="Opened Pull Request Github Link:"
openOther={openOther}
isRequired={!isDevAdvisor}
isRequired={!isOpenedPROptional}
/>
<PRInputs
prs={reviewPRs}
Expand Down
Loading