hackclub / hackclub/stasis

checking of GitHub repo while the submit design button

Open
#18 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
5
Forks
17
Avg merge
7m
Merged PRs (30d)
1

Description

I faced this while submitting I linked repo before adding image in readme and when I added image later it didn't recognize then I relinked but It didn't work because it is cache then I removed https:// part so it is refetch the repo and than it worked

process of recreating :
- create a new project
- link a repo without photo in readme
- check submit design page for check list
- then add photo in readme and again check the submit design checklist
- try relinking without changing the link
- same result in three cases
- then try adding https:// or removing https:// to repo link it would work

solution:
recheck the photo while submitting the project for design and also every time the project is relinked

most probable cause:
```export const IMAGE_PATTERN = /!\[.*?\]\(.*?\)|]*src\s*=|\.png|\.jpg|\.jpeg|\.gif|\.webp|\.svg/i;

// Check 3: README has photos (blocking)
if (readmeExists) {
const hasPhoto = IMAGE_PATTERN.test(readmeContent!);
checks.push({
key: 'readme_has_photo',
label: hasPhoto ? 'README has photos' : 'README photos missing',
status: hasPhoto ? 'pass' : 'fail',
detail: hasPhoto ? undefined : 'No images found in README - photos of your project are required to submit',
blocking: true,
});
}
```
path:[stasis/lib/github-checks.ts]()

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.