| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| name: CI Failure Issue | ||
|
|
||
| on: | ||
| workflow_run: | ||
| workflows: | ||
| - Publish Package to npmjs | ||
| types: [completed] | ||
|
|
||
| jobs: | ||
| notify: | ||
| if: contains(fromJSON('["failure","timed_out","action_required"]'), github.event.workflow_run.conclusion) | ||
| permissions: | ||
| issues: write | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Create or update failure issue | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| REPOSITORY: ${{ github.repository }} | ||
| WORKFLOW_NAME: ${{ github.event.workflow_run.name }} | ||
| CONCLUSION: ${{ github.event.workflow_run.conclusion }} | ||
| HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }} | ||
| HEAD_SHA: ${{ github.event.workflow_run.head_sha }} | ||
| ACTOR: ${{ github.event.workflow_run.actor.login }} | ||
| RUN_URL: ${{ github.event.workflow_run.html_url }} | ||
| run: | | ||
| reported_at="$(TZ=Asia/Shanghai date '+%Y-%m-%d %H:%M:%S %z')" | ||
| issue_title_prefix="[CI failed] $REPOSITORY / $WORKFLOW_NAME at " | ||
| body_file="$(mktemp)" | ||
| cat > "$body_file" <<EOF | ||
| @sunnylqm CI run failed. | ||
|
|
||
| Repository: $REPOSITORY | ||
| Workflow: $WORKFLOW_NAME | ||
| Conclusion: $CONCLUSION | ||
| Branch: $HEAD_BRANCH | ||
| Commit: $HEAD_SHA | ||
| Actor: $ACTOR | ||
| Reported at: $reported_at | ||
| Run: $RUN_URL | ||
| EOF | ||
|
|
||
| issue_title="$issue_title_prefix$reported_at" | ||
| issue_numbers="$( | ||
| gh issue list \ | ||
| --repo "$REPOSITORY" \ | ||
| --state open \ | ||
| --limit 1000 \ | ||
| --json number,title | | ||
| jq -r --arg prefix "$issue_title_prefix" '.[] | select(.title | startswith($prefix)) | .number' | ||
| )" | ||
|
|
||
| if [ -n "$issue_numbers" ]; then | ||
| while IFS= read -r issue_number; do | ||
| [ -n "$issue_number" ] || continue | ||
| gh issue edit "$issue_number" \ | ||
| --repo "$REPOSITORY" \ | ||
| --title "$issue_title" \ | ||
| --body-file "$body_file" | ||
| done <<< "$issue_numbers" | ||
| exit 0 | ||
| fi | ||
|
|
||
| gh issue create \ | ||
| --repo "$REPOSITORY" \ | ||
| --title "$issue_title" \ | ||
| --body-file "$body_file" | ||
|
|
||
| close: | ||
| if: github.event.workflow_run.conclusion == 'success' | ||
| permissions: | ||
| issues: write | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Close recovered failure issues | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| REPOSITORY: ${{ github.repository }} | ||
| WORKFLOW_NAME: ${{ github.event.workflow_run.name }} | ||
| HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }} | ||
| HEAD_SHA: ${{ github.event.workflow_run.head_sha }} | ||
| RUN_URL: ${{ github.event.workflow_run.html_url }} | ||
| run: | | ||
| issue_title_prefix="[CI failed] $REPOSITORY / $WORKFLOW_NAME at " | ||
| fixed_at="$(TZ=Asia/Shanghai date '+%Y-%m-%d %H:%M:%S %z')" | ||
| issue_numbers="$( | ||
| gh issue list \ | ||
| --repo "$REPOSITORY" \ | ||
| --state open \ | ||
| --limit 1000 \ | ||
| --json number,title | | ||
| jq -r --arg prefix "$issue_title_prefix" '.[] | select(.title | startswith($prefix)) | .number' | ||
| )" | ||
|
|
||
| if [ -z "$issue_numbers" ]; then | ||
| exit 0 | ||
| fi | ||
|
|
||
| comment_body="$(cat <<EOF | ||
| CI recovered at $fixed_at. | ||
|
|
||
| Repository: $REPOSITORY | ||
| Workflow: $WORKFLOW_NAME | ||
| Branch: $HEAD_BRANCH | ||
| Commit: $HEAD_SHA | ||
| Run: $RUN_URL | ||
| EOF | ||
| )" | ||
|
|
||
| while IFS= read -r issue_number; do | ||
| [ -n "$issue_number" ] || continue | ||
| gh issue close "$issue_number" \ | ||
| --repo "$REPOSITORY" \ | ||
| --comment "$comment_body" | ||
| done <<< "$issue_numbers" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| name: Test | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| test: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: | ||
| - ubuntu-latest | ||
| - ubuntu-24.04-arm | ||
| - macos-15-intel | ||
| - macos-latest | ||
| - windows-latest | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| with: | ||
| submodules: recursive | ||
| - uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: 24 | ||
| - uses: oven-sh/setup-bun@v2 | ||
| with: | ||
| bun-version: latest | ||
| # bun 在 Windows 上生成 exe shim,而 prebuildify 硬编码 spawn node-gyp.cmd | ||
| - if: runner.os == 'Windows' | ||
| run: npm install -g node-gyp | ||
| - run: bun install --ignore-scripts | ||
| - run: bun run prebuild | ||
| - run: node test/test.js | ||
| - run: bun ./test/test.js |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| [submodule "HDiffPatch"] | ||
| path = HDiffPatch | ||
| url = https://github.com/sisong/HDiffPatch.git | ||
| url = https://github.com/reactnativecn/HDiffPatch.git | ||
| [submodule "lzma"] | ||
| path = lzma | ||
| url = https://github.com/sisong/lzma.git | ||
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Back | FazBrowse Home | New Git 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.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🧩 Analysis chain🏁 Script executed:
Repository: reactnativecn/node-hdiffpatch
Length of output: 167
🏁 Script executed:
Repository: reactnativecn/node-hdiffpatch
Length of output: 332
Keep the HDiffPatch submodule on a remote that contains the pinned commit. The fork at reactnativecn/HDiffPatch.git does not expose 4a7eb78aee3bd5acbe6fe55621391685648030d5, so fresh clones and CI submodule updates will fail unless the submodule is repinned to a commit that exists on that remote.
🤖 Prompt for AI AgentsSorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.