-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Add a github action to sync shared source from aspnetcore #61999
Conversation
Tagging subscribers to this area: @dotnet/ncl Issue DetailsThis mirrors an action we have in aspnetcore to sync changes from shared HTTP source code files. The one in aspnet triggers on a nightly schedule and sends a PR to aspnetcore if it detects any diffs. However, sometimes changes need to be submitted to runtime instead. The new action added here will only trigger manually, and will send a pr to runtime with any diffs.
|
A couple of questions:
|
It's triggered manually from the https://github.com/dotnet/runtime/actions page. Compare to this one that has a "Run Workflow" option: https://github.com/dotnet/runtime/actions/workflows/create-codespaces-prebuild.yml
You'd check out the branch and push additional changes. |
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.
I don't know anything about github actions.
This approve is moral support for the feature 😄
FYI, here is an example of the issue and PR the runtime->aspnetcore version of this script generates: This is also a case where the changes need to go into runtime instead. The new aspnetcore->runtime script only generates a PR in runtime, it references the same issue in aspnetcore. |
@@ -0,0 +1,3 @@ | |||
# Check the code is in sync | |||
$changed = (select-string "nothing to commit" artifacts\status.txt).count -eq 0 |
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.
Is this extra file needed? We could just inline this command in the gh action?
Also, I wonder if using git diff
would be easier? Something like
git diff -M -C -b --ignore-cr-at-eol --ignore-space-at-eol --exit-code > ..\artifacts\diff.txt
$changed = !$?
The only issue I see with git diff
are untracked files, so we would need to run git add -N .
before running the command. Just an idea to consider.
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.
I guess the aspnetcore version of this file did a lot more to open and comment on the github issue. Inlining just this part might be easier now.
https://github.com/dotnet/aspnetcore/blob/main/.github/workflows/ReportDiff.ps1
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.
Love the idea, thanks for submitting this!
I'm going to merge this so we can do a live test, and then iterate on feedback. |
This mirrors an action we have in aspnetcore to sync changes to shared HTTP source code files.
https://github.com/dotnet/aspnetcore/actions/workflows/runtime-sync.yml
The one in aspnet triggers on a nightly schedule and sends a PR to aspnetcore if it detects any diffs. However, sometimes changes need to be submitted to runtime instead. The new action added here will only trigger manually, and will send a pr to runtime with any diffs.