Skip to content

Conversation

@rhr323
Copy link
Contributor

@rhr323 rhr323 commented Oct 31, 2025

Releasing to OperatorHub might fail between community operators and certified operators. This PR ignores 422 errors when creating a pull request, so when a PR for community operators exists already, we'd continue with certified operators.

@rhr323 rhr323 added :ci Things related to Continuous Integration, automation and releases >non-issue labels Oct 31, 2025
@prodsecmachine
Copy link
Collaborator

prodsecmachine commented Oct 31, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Licenses 0 0 0 0 0 issues
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

if res.StatusCode < 200 || res.StatusCode > 299 {
log.Println("ⅹ")
// 422 is returned when the PR already exists.
if res.StatusCode == http.StatusUnprocessableEntity {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

422 could be returned for other reasons as well, see https://docs.github.com/en/rest/using-the-rest-api/troubleshooting-the-rest-api?apiVersion=2022-11-28#invalid-request

Would it be more robust to list PRs from that user that try to pull from the same branch name? https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something along the lines of

 curl -i  -H  "Accept: application/vnd.github+json" -H -H "Authorization: Bearer $GITHUB_TOKEN"  "https://api.github.com/repos/k8s-operatorhub/community-operators/pulls?head=rhr323:eck-community-operators-3.2.0"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:ci Things related to Continuous Integration, automation and releases >non-issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants