Uh oh!
There was an error while loading. Please reload this page.
Add a github action to sync shared source from aspnetcore - #61999
Conversation
ghost
commented
Nov 24, 2021
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.
|
Uh oh!
There was an error while loading. Please reload this page.
JamesNK
commented
Nov 24, 2021
A couple of questions:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Tratcher
commented
Nov 24, 2021
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. |
JamesNK
left a comment
There was a problem hiding this comment.
I don't know anything about github actions.
This approve is moral support for the feature 😄
Tratcher
commented
Nov 24, 2021
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.
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.
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
ManickaP
left a comment
There was a problem hiding this comment.
Love the idea, thanks for submitting this!
Tratcher
commented
Nov 25, 2021
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.