Skip to content

Add a PR flag#2

Open
sbouchet wants to merge 2 commits intomainfrom
pr_flag
Open

Add a PR flag#2
sbouchet wants to merge 2 commits intomainfrom
pr_flag

Conversation

@sbouchet
Copy link
Copy Markdown
Collaborator

No description provided.

sbouchet and others added 2 commits April 17, 2026 14:32
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>
Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>
Copy link
Copy Markdown

@RomanNikitenko RomanNikitenko left a comment

Choose a reason for hiding this comment

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

@sbouchet
thank you for the provided flag - it should really simplify PRs testing!

does it work with forks?

I'm asking because I provided a PR number
it looks like script applied it
but
on the openshift console I see that editor image is default, not from my PR...

@RomanNikitenko
Copy link
Copy Markdown

@sbouchet
I've found the cause of the problem
it does not work correctly on macOS

I'll propose a fix for the corresponding lines, please check it on linux

Another place for an improvement - it should not replace target image by default editor image silently - it can mislead - like, tests passed silently for default image instead of a PR image...

Comment thread dw-auto-validate.sh
curl -sL -o "${TMP_EDITOR_DEF}" "${EDITOR_DEFINITION}"

# Replace the che-code image with the PR image (only the injector, not the runtime)
sed -i "s|image: quay.io/che-incubator/che-code:.*|image: ${PR_IMAGE}|" "${TMP_EDITOR_DEF}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

this line I've replaced by

sed -i.bak "s|image: quay.io/che-incubator/che-code:.*|image: ${PR_IMAGE}|" "${TMP_EDITOR_DEF}" && rm -f "${TMP_EDITOR_DEF}.bak"

to get it working on macOS
Could you check if it works for linux?

Comment thread dw-auto-validate.sh

for devfile_url in "${DEVFILE_URL_LIST[@]}"; do
curl -sL -o ${TMP_DEVFILE} ${devfile_url}
sed -i 's/^/ /' ${TMP_DEVFILE}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This line I've replaced by

sed 's/^/    /' "${TMP_DEVFILE}" > "${TMP_DEVFILE}.tmp" && mv "${TMP_DEVFILE}.tmp" "${TMP_DEVFILE}"

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants