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

Handle quote marks ' " in PR titles in benchmark CI #2877

Merged
merged 2 commits into from Mar 20, 2024
Merged

Conversation

martinxu9
Copy link
Collaborator

No description provided.

--python-version "${{ matrix.python-version }}" --commit-sha "${{ github.sha }}"
--benchmark-json "${{ env.OUTPUT_FILE }}" --pr-title "${{ github.event.pull_request.title }}"
run: |
escaped_pr_title=$(echo ${{ github.event.pull_request.title }} | sed 's/"/\\"/g')
Copy link
Collaborator

Choose a reason for hiding this comment

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

i think we should use single quotes to avoid shell expansion in PR titles... like if i called my pr Cool new trick $(rm -rf /)... that might not be great for the runner

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not sure what you had in mind with no variable expansion if we were to keep processing the env and passing it around, don't think I figured out a way. But of course we don't have to deal with that, I've uploaded a version that runs

@martinxu9 martinxu9 changed the title Escape " in PR titles in benchmark CI Handle quote marks ' " in PR titles in benchmark CI Mar 19, 2024
@masenf masenf merged commit fa99407 into main Mar 20, 2024
62 checks passed
@masenf masenf deleted the mx/fix-benchmark-ci branch March 20, 2024 18:31
@masenf
Copy link
Collaborator

masenf commented Mar 20, 2024

We had an issue in the main branch with this PR. It's causing a failure because it requires a PR title, but the push event is not a PR.

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.

None yet

2 participants