Skip to content

Commit

Permalink
Make opened PR's Optional for TPMs
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew032011 committed Sep 21, 2024
1 parent 1010146 commit 095c935
Showing 1 changed file with 3 additions and 2 deletions.
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

0 comments on commit 095c935

Please sign in to comment.