@opensource-observer/ops-external-prs
v0.1.1
Published
External PRs github app for OSO
Readme
External PRs
A Github App that allows us to accept external PRs by enabling PR checks by an out of band process. We need this because some of the checks require some form of authentication.
Usage
This is generally only supposed to be used on Github Actions. However, if you're developing this locally it's useful to know the available commands.
Remember to populate .env first.
General commands
# Initialize a check with a given check name
# If the user has write access then it automatically is listed as "queued"
# If the user does not have write access then it automatically fails and waits for approval
pnpm external-prs initialize-check {sha} {login} {check-name}OSO Specific
# Handle oso comments
pnpm external-prs oso parse-comment {comment} {output}
# Refresh gcp credentials for the test deployment infrastructure
pnpm external-prs oso refresh-gcp-credentials {environment} {creds-path} {name}
# Test deployment sub commands
pnpm external-prs oso test-deploy --help
# Test deployment setup
pnpm external-prs oso test-deploy setup {pr} {sha} {profile-path} {service-account-path} {checkout-path}
# Test deployment teardown
pnpm external-prs oso test-deploy teardown {pr}
# Test deployment clean
pnpm external-prs oso test-deploy clean {ttl-seconds}OSS-Directory Specific
First configure .env.
Then git clone to 2 different paths on your filesystem,
the oss-directory main branch
and the PR branch to compare.
[!TIP] In order to get an OSO API key, visit
oso.xyz
You can run the app via:
# Handle PR validations
pnpm external-prs ossd validate-pr {pr_number} {commit_sha} {main_path} {pr_path} --oso-api-key {oso_api_key}If you've configured your GitHub secrets correctly, this should post a comment in the PR with the results
