{"id":18765763,"url":"https://github.com/andersonshatch/redirect-java-agent","last_synced_at":"2025-07-08T11:35:04.164Z","repository":{"id":174001165,"uuid":"651029498","full_name":"andersonshatch/redirect-java-agent","owner":"andersonshatch","description":"Generate redirects to the Java agent on Maven Central","archived":false,"fork":false,"pushed_at":"2023-08-09T15:43:59.000Z","size":33,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-29T06:09:22.561Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andersonshatch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-08T10:35:26.000Z","updated_at":"2023-06-09T16:34:23.000Z","dependencies_parsed_at":"2024-11-07T18:54:05.571Z","dependency_job_id":null,"html_url":"https://github.com/andersonshatch/redirect-java-agent","commit_stats":null,"previous_names":["andersonshatch/redirect-java-agent"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andersonshatch%2Fredirect-java-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andersonshatch%2Fredirect-java-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andersonshatch%2Fredirect-java-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andersonshatch%2Fredirect-java-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andersonshatch","download_url":"https://codeload.github.com/andersonshatch/redirect-java-agent/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239665157,"owners_count":19676879,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T18:35:08.252Z","updated_at":"2025-02-19T13:27:01.228Z","avatar_url":"https://github.com/andersonshatch.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Redirect to Contrast Java Agent\n\nUtility script to update Azure Static Web App site redirects to the very latest and latest major versions of `com.contrastsecurity:contrast-agent` on Maven Central.\n\nFiles in the `publish` directory are made available on the deployed site.\n\n## Requirements\n\n- Python 3.11 or newer\n\n## Usage\n\n### Inputs\n\nThe script reads in an environment variable `NEW_VERSION_URL`.\nThe value of this environment variable should be the full URL to the download of that version of contrast-agent, e.g. https://repo1.maven.org/maven2/com/contrastsecurity/contrast-agent/5.1.2/contrast-agent-5.1.2.jar\n\nThe version is extracted from the first path segment containing a version string; in the above example, from `/5.1.2/`.\nThis version is checked against existing redirects to versions in `staticwebapp.config.json`.\nIf a redirect is already present for major version 5, that destination is replaced with the new URL. Else, a new major version redirect will be added to the list.\nIf the major version to be updated is the current latest major version, or a new major version, the `latest` redirect destination will also be updated to the new URL.\n\n\n### GitHub Action\n\nThe GitHub Action workflow `main.yml` takes in a `new_version_url` input from either manual trigger (via GitHub UI/API), or via repository_dispatch event from another repository.\nThis version input is used to update the redirects in `staticwebapp.config.json`, and a PR is then opened so the changes can be reviewed. When the PR is merged, the deployment is triggered.\n\n### Local testing / development\n\n1. `pip install -r requirements.txt`\n1. `NEW_VERSION_URL=https://new-version-url/111.222.333/contrast-agent-111.222.333.jar python redirect.py`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandersonshatch%2Fredirect-java-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandersonshatch%2Fredirect-java-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandersonshatch%2Fredirect-java-agent/lists"}