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

update [githubpipenv] tests/examples #8797

Merged
merged 5 commits into from
Jan 14, 2023

Conversation

chris48s
Copy link
Member

This is mostly a standard "update the test/example" PR, but there was a confusing wrinkle to this one.

The service tests were failing, but the badge was actually working in production.
https://img.shields.io/github/pipenv/locked/dependency-version/metabolize/rq-dashboard-on-heroku/rq-dashboard/master totally works.

The reason is this code here:

if (serviceInstance.staticAuthConfigured) {
const buffer = await fetchRepoContent(serviceInstance, {
user,
repo,
branch,
filename,
})
const json = serviceInstance._parseJson(buffer)
return serviceInstance.constructor._validate(json, schema)
} else {
return serviceInstance._requestJson({
schema,
url: `https://raw.githubusercontent.com/${user}/${repo}/${branch}/${filename}`,
errorMessages: errorMessagesFor(
`repo not found, branch not found, or ${filename} missing`
),
})
}

In production, staticAuthConfigured is false because we use the token pool. https://raw.githubusercontent.com/metabolize/rq-dashboard-on-heroku/master/Pipfile.lock still works if you rename your master branch to main, even though there is no master branch any more. The /contents API doesn't do that, hence the difference in behaviour.

@chris48s chris48s added the keep-service-tests-green Related to fixing failing tests of the services label Jan 12, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jan 12, 2023

Messages
📖 ✨ Thanks for your contribution to Shields, @chris48s!

Generated by 🚫 dangerJS against 3ca5bc6

@repo-ranger repo-ranger bot merged commit 2fb9889 into badges:master Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep-service-tests-green Related to fixing failing tests of the services
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants