Skip to content
Merged
Show file tree
Hide file tree
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
118 changes: 60 additions & 58 deletions .github/workflows/pr-issue-sync.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Sync PR data from Linked Issues
name: PR Issue Sync

on:
pull_request_target:
types: [opened, edited, synchronize]
workflow_dispatch: {} # manual trigger only (disables automatic runs)

jobs:
sync-metadata:
Expand All @@ -28,66 +27,69 @@ jobs:
}
core.setOutput("issues", JSON.stringify(matches));

- name: Post or Update data Comment
if: steps.extract.outputs.issues && steps.extract.outputs.issues != '[]'
- name: Sync metadata
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const issues = JSON.parse(`${{ steps.extract.outputs.issues }}`);
const prNumber = context.payload.pull_request.number;

let combinedLabels = [];
let combinedAssignees = [];
let combinedMilestones = [];

for (const number of issues) {
const data = ${{ fromJSON(format('{{\"issues\":{0},\"pr\":{1}}}', steps.extract.outputs.issues, github.event.pull_request.number)) }};
const prNumber = data.pr;
const issueNumbers = data.issues || [];

if (issueNumbers.length === 0) {
console.log("No linked issues found");
return;
}

for (const issueNumber of issueNumbers) {
try {
const issue = await github.rest.issues.get({
...context.repo,
issue_number: number
// Fetch issue
const { data: issue } = await github.rest.issues.get({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: parseInt(issueNumber)
});

combinedLabels.push(...issue.data.labels.map(l => l.name));
combinedAssignees.push(...issue.data.assignees.map(a => a.login));
if (issue.data.milestone) combinedMilestones.push(issue.data.milestone.title);

} catch (err) {
console.log(`Could not fetch issue #${number}: ${err.message}`);

console.log(`Syncing metadata from Issue #${issueNumber} to PR #${prNumber}`);

// --- Sync Labels ---
const issueLabels = issue.labels.map(l => l.name);
const { data: pr } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: prNumber
});
const currentPRLabels = pr.labels.map(l => l.name);
const combinedLabels = Array.from(new Set([...currentPRLabels, ...issueLabels]));

await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
labels: combinedLabels
});
console.log(`Labels applied: ${combinedLabels.join(', ')}`);

// --- Sync Milestone ---
if (issue.milestone) {
await github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
milestone: issue.milestone.number
});
console.log(`Milestone synced: ${issue.milestone.title}`);
}

// --- Optionally: Add a comment on PR ---
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
body: `✅ Synchronized metadata from Issue #${issueNumber}:\nLabels: ${issueLabels.join(', ')}\nMilestone: ${issue.milestone ? issue.milestone.title : 'None'}`
});

} catch (error) {
console.error(`Error syncing issue #${issueNumber} to PR #${prNumber}:`, error.message);
}
}

// Deduplicate
combinedLabels = [...new Set(combinedLabels)];
combinedAssignees = [...new Set(combinedAssignees)];
combinedMilestones = [...new Set(combinedMilestones)];

const commentBody =
`### Synced data from Linked Issues\n\n` +
`**Labels:**\n${combinedLabels.length ? combinedLabels.map(l => `- ${l}`).join("\n") : "- None"}\n\n` +
`**Assignees:**\n${combinedAssignees.length ? combinedAssignees.map(a => `- ${a}`).join("\n") : "- None"}\n\n` +
`**Milestones:**\n${combinedMilestones.length ? combinedMilestones.map(m => `- ${m}`).join("\n") : "- None"}\n`;

// Get existing comments
const comments = await github.rest.issues.listComments({
...context.repo,
issue_number: prNumber
});

// Find existing workflow comment
const existingComment = comments.data.find(c => c.body.includes("### Synced data from Linked Issues"));

if (existingComment) {
await github.rest.issues.updateComment({
...context.repo,
comment_id: existingComment.id,
body: commentBody
});
} else {
// Create new comment
await github.rest.issues.createComment({
...context.repo,
issue_number: prNumber,
body: commentBody
});
}
208 changes: 179 additions & 29 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -523,35 +523,6 @@ body {
}

.navbar-sidebar .navbar__link:hover {
background-color: var(--ifm-color-emphasis-200) !important;
}

/* Improve sidebar dropdown behavior */
.navbar-sidebar .dropdown {
display: block !important;
}

.navbar-sidebar .dropdown__menu {
position: static !important;
display: block !important;
box-shadow: none !important;
border: none !important;
margin: 0 !important;
padding: 0.5rem 0 !important;
background: transparent !important;
overflow: visible !important;
}

.navbar-sidebar .dropdown__link {
padding: 0.5rem 1rem 0.5rem 2rem !important;
border-radius: 4px !important;
margin: 2px 0 !important;
font-size: 0.9rem !important;
display: block !important;
color: var(--ifm-font-color-base) !important;
}

.navbar-sidebar .dropdown__link:hover {
background-color: var(--ifm-color-emphasis-300) !important;
color: var(--ifm-color-primary) !important;
}
Expand Down Expand Up @@ -864,6 +835,43 @@ html.theme-light .text-gray-900 {
background-color: #ffffff !important;
}

/* Ensure the specific block is forced light in light mode */
html[data-theme="light"] .interview-prep-page .technical-outer {
background-image: linear-gradient(135deg,#eff6ff 0%, #f8fafc 100%) !important;
background-color: #ffffff !important;
-webkit-backdrop-filter: none !important;
backdrop-filter: none !important;
mix-blend-mode: normal !important;
isolation: isolate !important;
z-index: 10 !important;
}

/* Companies tab: use white gradients in light mode and remove overlays */
[data-theme="light"] .company-outer {
background-image: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
background-color: #ffffff !important;
color: #0f172a !important;
isolation: isolate !important;
-webkit-backdrop-filter: none !important;
backdrop-filter: none !important;
mix-blend-mode: normal !important;
}

/* hide the subtle pattern overlay added inside the component */
[data-theme="light"] .company-outer > .absolute.inset-0,
[data-theme="light"] .company-outer .absolute.inset-0.opacity-5 {
display: none !important;
background: none !important;
opacity: 1 !important;
}

/* ensure badges & inner panels render normally */
[data-theme="light"] .company-outer,
[data-theme="light"] .company-outer * {
mix-blend-mode: normal !important;
background-blend-mode: normal !important;
}

/*==== SECTION 13 Modern Blog Enhancements ======*/
.modern-gradient-bg {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
Expand Down Expand Up @@ -1517,3 +1525,145 @@ a {
.theme-doc-breadcrumbs a.breadcrumbs__link > svg.breadcrumbHomeIcon_YNFT {
display: inline-block;
}

/* Fix difficulty and topic pill backgrounds in light/dark mode */
[data-theme='light'] .rounded.bg-gray-100,
[data-theme='light'] .rounded-full.bg-green-100,
[data-theme='light'] .rounded-full.bg-yellow-100,
[data-theme='light'] .rounded-full.bg-red-100,
[data-theme='light'] .rounded-full.bg-blue-100 {
background-color: var(--ifm-color-emphasis-100) !important;
}

[data-theme='light'] .rounded-full.bg-green-100 {
background-color: #dcfce7 !important; /* green-100 */
}

[data-theme='light'] .rounded-full.bg-yellow-100 {
background-color: #fef9c3 !important; /* yellow-100 */
}

[data-theme='light'] .rounded-full.bg-red-100 {
background-color: #fee2e2 !important; /* red-100 */
}

[data-theme='light'] .rounded-full.bg-blue-100 {
background-color: #dbeafe !important; /* blue-100 */
}

[data-theme='light'] .rounded.bg-gray-100 {
background-color: #f3f4f6 !important; /* gray-100 */
}

/* Dark mode overrides */
[data-theme='dark'] .rounded.dark\:bg-gray-700,
[data-theme='dark'] .rounded-full.dark\:bg-green-900,
[data-theme='dark'] .rounded-full.dark\:bg-yellow-900,
[data-theme='dark'] .rounded-full.dark\:bg-red-900,
[data-theme='dark'] .rounded-full.dark\:bg-blue-900 {
opacity: 1 !important;
}

[data-theme='dark'] .rounded-full.dark\:bg-green-900 {
background-color: #14532d !important; /* green-900 */
}

[data-theme='dark'] .rounded-full.dark\:bg-yellow-900 {
background-color: #713f12 !important; /* yellow-900 */
}

[data-theme='dark'] .rounded-full.dark\:bg-red-900 {
background-color: #7f1d1d !important; /* red-900 */
}

[data-theme='dark'] .rounded-full.dark\:bg-blue-900 {
background-color: #1e3a8a !important; /* blue-900 */
}

[data-theme='dark'] .rounded.dark\:bg-gray-700 {
background-color: #374151 !important; /* gray-700 */
}

/* difficulty badge overrides — ensure readable in light mode and lift above overlays */
.interview-prep-page .difficulty-badge {
z-index: 50;
background-clip: padding-box;
box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

/* Light mode: explicit background + text for each variant */
[data-theme="light"] .interview-prep-page .difficulty-badge.bg-green-200 {
background-color: #DCFCE7 !important; /* green-200 -> higher contrast */
color: #14532D !important;
}
[data-theme="light"] .interview-prep-page .difficulty-badge.bg-yellow-200 {
background-color: #FEF3C7 !important; /* yellow-200 */
color: #78350F !important;
}
[data-theme="light"] .interview-prep-page .difficulty-badge.bg-red-200 {
background-color: #FEE2E2 !important; /* red-200 */
color: #7F1D1D !important;
}

/* Keep all duration badges grey in light mode */
[data-theme="light"] .interview-prep-page .duration-badge {
background-color: #f3f4f6 !important; /* gray-100 */
color: #1f2937 !important; /* gray-800 */
z-index: 50;
}

/* Force removal of that Tailwind gradient in light mode */
html[data-theme="light"] .bg-gradient-to-r.from-blue-50.to-purple-50 {
background-image: none !important;
background-color: #ffffff !important;
}

/* Companies: force white/near-white surface in light mode for .company-outer */
html[data-theme="light"] .company-outer {
background-image: linear-gradient(135deg,#ffffff 0%, #f8fafc 100%) !important;
background-color: #ffffff !important;
-webkit-backdrop-filter: none !important;
backdrop-filter: none !important;
mix-blend-mode: normal !important;
}
html[data-theme="light"] .company-outer::before,
html[data-theme="light"] .company-outer::after {
display: none !important;
background: none !important;
content: none !important;
}

/* Strong, final overrides for pill buttons and community button text in light mode */
html[data-theme="light"] .pill-badge,
html[data-theme="light"] .company-outer .pill-badge,
html[data-theme="light"] [data-slot="card-header"] .pill-badge,
html[data-theme="light"] .company-border .pill-badge,
html[data-theme="light"] .pill-badge[class*="bg-"],
html[data-theme="light"] span.bg-gray-100.pill-badge {
background-color: #f3f4f6 !important; /* gray-100 visible in light mode */
color: #1f2937 !important; /* dark text */
mix-blend-mode: normal !important;
background-clip: padding-box !important;
z-index: 9999 !important;
opacity: 1 !important;
}

/* Force link text inside gradient buttons to be white */
html[data-theme="light"] .company-tab-link,
html[data-theme="light"] .company-tab-community-link,
html[data-theme="light"] .company-border a,
html[data-theme="light"] button [class*="company-tab-link"],
html[data-theme="light"] a.company-tab-link {
color: #ffffff !important;
text-decoration: none !important;
}

/* If any Tailwind gradient utility still applies, remove it for these containers in light mode */
html[data-theme="light"] .company-outer.bg-gradient-to-br,
html[data-theme="light"] [data-slot="card-header"].bg-gradient-to-br {
background-image: linear-gradient(135deg,#ffffff 0%, #f8fafc 100%) !important;
background-color: #ffffff !important;
-webkit-backdrop-filter: none !important;
backdrop-filter: none !important;
mix-blend-mode: normal !important;
}
Loading
Loading