-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[github actions] ping actor of workflow on cherry pick pr creation #142676
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
Conversation
.github/workflows/easy-cp.yml
Outdated
| run: | | ||
| echo $PR_URL | ||
| NEW_PR_NUMBER="${PR_URL##*/}" | ||
| SUCCESS_MSG="Hello @${{ github.actor }}! Looks like you attached the cp label and successfully created a cherry pick pr.<br>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this more concise by combing both lines?
eg @actor please fill out the PR description above, afterwards the release team will review this request
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, updated wordings
| NEW_PR_NUMBER="${PR_URL##*/}" | ||
| SUCCESS_MSG="Hello @${{ github.actor }}! Looks like you attached the cp label and successfully created a cherry pick pr.<br>" | ||
| SUCCESS_MSG+="Please fill in the information in PR description above, and a release engineer will review this request." | ||
| gh pr comment $NEW_PR_NUMBER -R flutter/flutter -b "${SUCCESS_MSG}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to generalize this so it supports the engine repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I am planning to add a similar workflow in a separate PR to the engine repo after this one lands. It would trigger on labeling events of the engine repo.
(will also need to set up a secret on the engine repo)
| run: | | ||
| git push https://${{ env.GITHUB_TOKEN }}@github.com/flutteractionsbot/flutter cp-${CHANNEL}-${COMMIT_SHA} | ||
| gh pr create --title "[CP-${CHANNEL}]${PR_TITLE}" --body-file ../PULL_REQUEST_CP_TEMPLATE.md --base ${RELEASE_BRANCH} --label "cp: review" --repo flutter/flutter --head flutteractionsbot:cp-${CHANNEL}-${COMMIT_SHA} | ||
| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does curly brackets mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it is used to parse the output from the gh pr create command. It is a multi line string syntax so no matter what the output from the command is, the output can be handled properly. without it we would hit the invalid output format error since the output might be multi line.
| if: ${{ steps.create-pr.conclusion == 'success' }} | ||
| run: | | ||
| echo $PR_URL | ||
| NEW_PR_NUMBER="${PR_URL##*/}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be easier to leave a comment on the original PR about the CP PR instead of the current approach where we leave a comment on the new PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah my understanding is that commenting on the original PR or the new PR will have the same number of steps, because we want to provide the link of the new PR so that people could find it easily.
And to get the PR link of the new PR we can only parse the output from 'gh pr create'.
Manual roll Flutter from e02e207 to 0b5cd50 (46 revisions) Manual roll requested by [email protected] flutter/flutter@e02e207...0b5cd50 2024-02-05 [email protected] fix AppBar docs for backgroundColor & foregroundColor (flutter/flutter#142430) 2024-02-04 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Update gradle lockfiles template" (flutter/flutter#142889) 2024-02-04 [email protected] Update gradle lockfiles template (flutter/flutter#140115) 2024-02-04 [email protected] Roll Flutter Engine from 20742e37e54e to f34c658b9600 (1 revision) (flutter/flutter#142876) 2024-02-03 [email protected] Roll Flutter Engine from 23763db72272 to 20742e37e54e (1 revision) (flutter/flutter#142850) 2024-02-03 [email protected] Roll Flutter Engine from fee02145da8c to 23763db72272 (3 revisions) (flutter/flutter#142848) 2024-02-03 [email protected] Roll Flutter Engine from 9869d47a2736 to fee02145da8c (2 revisions) (flutter/flutter#142847) 2024-02-03 [email protected] Roll Flutter Engine from 78c63d3c2c68 to 9869d47a2736 (1 revision) (flutter/flutter#142842) 2024-02-02 [email protected] Roll Flutter Engine from 266d5d0b5588 to 78c63d3c2c68 (1 revision) (flutter/flutter#142836) 2024-02-02 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 3.23.2 to 3.24.0 (flutter/flutter#142839) 2024-02-02 49699333+dependabot[bot]@users.noreply.github.com Bump codecov/codecov-action from 3.1.6 to 4.0.1 (flutter/flutter#142838) 2024-02-02 [email protected] Update TextSelectionOverlay (flutter/flutter#142463) 2024-02-02 [email protected] Roll Flutter Engine from e29263212bfd to 266d5d0b5588 (5 revisions) (flutter/flutter#142832) 2024-02-02 [email protected] Fix CupertinoTextSelectionToolbar clipping (flutter/flutter#138195) 2024-02-02 [email protected] Reland "Add support for Gradle Kotlin DSL (#140744)" (flutter/flutter#142752) 2024-02-02 [email protected] Support navigation during a Cupertino back gesture (flutter/flutter#142248) 2024-02-02 [email protected] Avoid depending on files from build_system/targets other than from top level entrypoints in flutter_tools. (flutter/flutter#142760) 2024-02-02 [email protected] Roll Packages from 5b48c44 to d37fb0a (14 revisions) (flutter/flutter#142812) 2024-02-02 [email protected] Add a link the different possible Android virtual device configs (flutter/flutter#142765) 2024-02-02 [email protected] Allow all iOS tests to use either iOS 16 or 17 (flutter/flutter#142714) 2024-02-02 [email protected] Roll Flutter Engine from b35153d00b2e to e29263212bfd (2 revisions) (flutter/flutter#142799) 2024-02-02 [email protected] Roll Flutter Engine from dd4c79a6c864 to b35153d00b2e (10 revisions) (flutter/flutter#142783) 2024-02-02 [email protected] Wasm/JS Dual Compile with the flutter tool (flutter/flutter#141396) 2024-02-02 [email protected] Reland: Added ButtonStyle.foregroundBuilder and ButtonStyle.backgroundBuilder (flutter/flutter#142762) 2024-02-01 [email protected] Use proto name for emulator version and show cipd package version (flutter/flutter#142262) 2024-02-01 [email protected] [github actions] ping actor of workflow on cherry pick pr creation (flutter/flutter#142676) 2024-02-01 [email protected] Marks Linux_android_emu android views to be unflaky (flutter/flutter#142590) 2024-02-01 [email protected] Implement `switch` expressions in `lib/src/material/` (flutter/flutter#142634) 2024-02-01 [email protected] Roll Flutter Engine from 9beb7e82e081 to dd4c79a6c864 (1 revision) (flutter/flutter#142749) 2024-02-01 [email protected] Write Tests for API Example of `form.0.dart` (flutter/flutter#142635) 2024-02-01 [email protected] Make leak_tracking bots sticked to the left even if bot thinks they are non-flacky. (flutter/flutter#142744) 2024-02-01 [email protected] Upload DerivedData logs in CI (flutter/flutter#142643) 2024-02-01 [email protected] Test codesigning xcframeworks in artifacts (flutter/flutter#142666) 2024-02-01 [email protected] Fix gen_defaults test randomness (flutter/flutter#142743) 2024-02-01 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Added ButtonStyle.foregroundBuilder and ButtonStyle.backgroundBuilder" (flutter/flutter#142748) 2024-02-01 [email protected] Roll Flutter Engine from 39415c3eed42 to 9beb7e82e081 (5 revisions) (flutter/flutter#142745) 2024-02-01 [email protected] Remove unused deprecated autoroll mirror-remote flag (flutter/flutter#142738) 2024-02-01 [email protected] Fix leaks in tests. (flutter/flutter#142677) 2024-02-01 [email protected] Roll Flutter Engine from 8c43332c6ffc to 39415c3eed42 (1 revision) (flutter/flutter#142740) 2024-02-01 [email protected] Remove verbose-system-logs on iOS perf tests (flutter/flutter#142739) 2024-02-01 [email protected] Remove outdated arm64_armv7 check (flutter/flutter#142737) 2024-02-01 [email protected] fix CupertinoTabView's Android back button handling with PopScope (flutter/flutter#141604) 2024-02-01 [email protected] Roll Flutter Engine from 68943afd62d1 to 8c43332c6ffc (8 revisions) (flutter/flutter#142726) 2024-02-01 [email protected] Unpin test (flutter/flutter#141427) ...
Context: Follow up from sync with @itsjustkevin today. Tag and ping the actor of workflow, when the cherry pick pull request is successfully created.
Tested: on cp success: #142674 pings the actor of workflow (not the pr author). on cp failure: example workflow leaves a msg on the original PR.