adobe / adobe/spacecat-api-service
Validate (or auto-update) Github URL to be correct when adding or updating sites
- Dominant language
- JavaScript
- Stars
- 10
- Forks
- 15
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 150
Description
**Description**
Some sites have been added to SpaceCat with a (now, after the sites moved outside of the `hlxsites` Github org) invalid Github URL.
**To Reproduce**
Steps to reproduce the behavior:
1. Add a new site and set the githubURL to "https://example.com"
**Expected behavior**
Ideally the github URL for a sites would be updated automatically from an external system that provides the correct URL (e.g. based on Helix 5 config).
If any audit needs to be developed based on Github URLs, then the API/data layer needs to validate:
* the URL returns 200 (not 404)
* the URL is that of a Github repo (not https://bitbucket.org/foo/bar)
* (optional) the dev URL built from the Github URL (e.g. https://main--foo--bar.hlx.live/) returns 200
Contributor guide
Research direction
Start in the API/data layer used when adding or updating sites and trace how githubURL is stored and handled. Define how repository URL checks and the optional dev-URL check should behave, then verify that invalid or non-GitHub URLs are rejected or updated according to the chosen approach.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100