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

PR-actions workflow with support for /fix:format #2449

Merged

Conversation

chalin
Copy link
Contributor

@chalin chalin commented Mar 3, 2023

@chalin chalin added the CI/infra CI & infrastructure label Mar 3, 2023
@chalin chalin requested a review from a team as a code owner March 3, 2023 19:19
@chalin
Copy link
Contributor Author

chalin commented Mar 3, 2023

Dunno if it'll trigger on this PR. Here goes ...
/fix:format

Edit: it didn't trigger. Maybe it needs to be merged first?

@chalin
Copy link
Contributor Author

chalin commented Mar 3, 2023

Hey @trask: what's the best way to test & debug new GH actions (that trigger on comments) like the one in this PR?

@trask
Copy link
Member

trask commented Mar 3, 2023

push the PR to the main branch on your fork, then open a PR on your fork (targeting main on your fork as opposed to targeting the otel repo), then comment on that PR

btw, we have similar here: https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/.github/workflows/comment-driven-automation.yml

the problem which I don't have solution for yet is that when it pushes the commit back to the PR, it doesn't trigger workflow, and the only way to trigger workflow is to manually close and re-open the PR, e.g. open-telemetry/opentelemetry-java-instrumentation#7881 (comment)

@chalin
Copy link
Contributor Author

chalin commented Mar 3, 2023

Oh, very cool that y'all have a script like that already. Thanks for guidance @trask, and the heads up regarding the (non-)triggering issue.

@chalin chalin marked this pull request as draft March 11, 2023 14:56
@chalin chalin force-pushed the chalin-im-reformat-action-2023-03-03 branch 3 times, most recently from 24dbb57 to 7496c35 Compare March 15, 2023 19:54
@chalin chalin marked this pull request as ready for review March 15, 2023 19:56
@chalin chalin changed the title PR-actions workflow, including support for /fix:format PR-actions workflow with support for /fix:format Mar 15, 2023
@chalin chalin force-pushed the chalin-im-reformat-action-2023-03-03 branch from 7496c35 to fb52587 Compare March 15, 2023 19:58
@chalin chalin force-pushed the chalin-im-reformat-action-2023-03-03 branch from fb52587 to 2158a98 Compare March 15, 2023 20:00
@chalin
Copy link
Contributor Author

chalin commented Mar 15, 2023

@cartermp @svrnm (cc @trask): this is ready for review. It's a first cut, but it's functional.

I tested it from another repo. As mentioned in Commits made by this Action do not trigger new Workflow runs:

The resulting commit will not trigger another GitHub Actions Workflow run.

But we can always manually re-trigger the "Check format" action. Maybe we'll find a better solution down the line.

@cartermp cartermp merged commit 835c5a9 into open-telemetry:main Mar 17, 2023
@cartermp
Copy link
Contributor

Let's go with this for now and we can adjust if needed!

@chalin chalin deleted the chalin-im-reformat-action-2023-03-03 branch March 17, 2023 10:22
@chalin
Copy link
Contributor Author

chalin commented Mar 17, 2023

@cartermp - FYI, I've tested the workflow and it goes through all the paces but the pushed commit doesn't make it back into the PR 🤷🏼‍♂️. I'll investigate as soon as I can, but it might not be until late next week.

@chalin
Copy link
Contributor Author

chalin commented Mar 17, 2023

@cartermp - hey, it did work! Just took longer than I expected 🤷🏼‍♂️.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/infra CI & infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants