-
Notifications
You must be signed in to change notification settings - Fork 48
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
feat: misc fixes for FC-0012 scripting #2129
Conversation
Thanks for the pull request, @OmarIthawi! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
cc: @shadinaif for review. |
Did you figure out the issue with merge queue CLA checks? #199 (comment) |
That was an intermittent error that fixed itself after a while. I remember it was a GitHub Actions outage (or Jenkins, I can't remember well). I only force pushed and it got merged. This PR has only minor fixes that I've found while working on the |
Are we thinking about the same thing? I remember trying to figure out merge queue issues with Ned for a while https://openedx.slack.com/archives/C0497NQCLBT/p1681501743788269 and landing on not using them. |
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.
That was an intermittent error that fixed itself after a while
Are we thinking about the same thing? I remember trying to figure out merge queue issues with Ned for a while https://openedx.slack.com/archives/C0497NQCLBT/p1681501743788269 and landing on not using them.
@brian-smith-tcril not really. There's no changes on the merging strategy in this pull request. The change is to remove the always-broken gh pr view "$PR_NUMBER"
as well as the redundant retry
.
Apart from that, translation pull requests are already being added into a merge queue with the --auto --rebase
options.
gh pr merge
gh pr merge [<number> | <url> | <branch>] [flags]
Merge a pull request on GitHub.
Without an argument, the pull request that belongs to the current branch is selected.
When targeting a branch that requires a merge queue, no merge strategy is required. If required checks have not yet passed, AutoMerge will be enabled. If required checks have passed, the pull request will be added to the merge queue. To bypass a merge queue and merge directly, pass the '--admin' flag.
Options
...
--auto
Automatically merge only after necessary requirements are met
-r, --rebase
Rebase the commits onto the base branch
...
This is the equivalent of clicking the "Rebase and merge" option in the "Enable auto-merge" menu in the UI:
|
||
# The `fromdate | todate` are used merge to validate that `mergedAt` isn't null | ||
# therefore verifying that the pull request was merged successfully. | ||
gh pr view "$PR_NUMBER" --json mergedAt --jq '.mergedAt | fromdate | todate' |
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.
These lines were removed because fail sometimes time because merge --rebase --auto
is an async merge as opposed to the gh merge --rebase
which waits until the command is merged.
--auto
here means --auto-merge
which adds the PR to the merge queue.
This is the default strategy that has been implemented in the repository since #185.
This pull request merely removes the nick-fields/retry
which is redundant.
gh pr view "$PR_NUMBER" --json mergedAt --jq '.mergedAt | fromdate | todate' | ||
run: | | ||
# Add the pull request to the merge queue with --rebase commit strategy | ||
gh pr merge ${{ github.head_ref }} --rebase --auto |
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.
This is the same original merge --rebase --auto
but now within a GitHub Actions native run
instead of retry
.
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.
Thank you @OmarIthawi
Add the pull request to the merge queue with --rebase commit strategy. The gh pr merge BRANCH_NAME --rebase --auto either succeeds to queue the pull request or fails permanently. Retry doesn't help.
allow passing arguments in a pythonic manner
1ebc3aa
to
856cfa5
Compare
@brian-smith-tcril I'm merging tomorrow unless there's an objection. |
@OmarIthawi 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
This contribution is part of the FC-0012 project which is sparked by the Translation Infrastructure update OEP-58.