mirror of
https://gitee.com/LongbowEnterprise/BootstrapBlazor.git
synced 2024-11-29 18:49:08 +08:00
chore: update comment label action and repro document (#399)
* chore: fix can not assign assignee on issue * chore: update checkout action version * chore: update action branch * chore: update action and jobs name * chore: update action add null check * doc: add repro document * chore: update comment issue action
This commit is contained in:
parent
db3b73c7c8
commit
f3d1c2cda7
11
.github/workflows/auto_assign_issue.yml
vendored
11
.github/workflows/auto_assign_issue.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: Auto Assign Issue(bot)
|
name: auto assign issue(bot)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
issues:
|
issues:
|
||||||
@ -6,22 +6,21 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
assign_assignee:
|
assign_assignee:
|
||||||
name: Assign Assignees
|
name: assign assignees
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@v6
|
- uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
console.log(context)
|
|
||||||
github.rest.issues.update({
|
github.rest.issues.update({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
issue_number: context.issue.number,
|
issue_number: context.issue.number,
|
||||||
assignees: [context.repo.owner]
|
assignees: [context.actor]
|
||||||
})
|
})
|
||||||
|
|
||||||
assign_label:
|
assign_label:
|
||||||
name: Assign Label
|
name: assign label
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: github/issue-labeler@v2.5
|
- uses: github/issue-labeler@v2.5
|
||||||
@ -33,7 +32,7 @@ jobs:
|
|||||||
include-title: 1
|
include-title: 1
|
||||||
|
|
||||||
assign_miletone:
|
assign_miletone:
|
||||||
name: Assign Milestone
|
name: assign milestone
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@v6
|
- uses: actions/github-script@v6
|
||||||
|
12
.github/workflows/auto_comment_issue.yml
vendored
12
.github/workflows/auto_comment_issue.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: Auto Comment on Issue(bot)
|
name: auto comment on issue(bot)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
issues:
|
issues:
|
||||||
@ -6,20 +6,16 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
comment:
|
comment:
|
||||||
name: Comment Issue
|
name: comment issue
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@v6
|
- uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const issue = await github.rest.issues.get({
|
const content = `@${context.payload.issue.user.login}. Thank you for filing this issue. In order for us to investigate this issue, please provide [a minimalistic repro project](https://github.com/dotnetcore/bootstrapblazor/blob/main/docs/repro.md) that illustrates the problem.`
|
||||||
issue_number: context.issue.number,
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo
|
|
||||||
})
|
|
||||||
github.rest.issues.createComment({
|
github.rest.issues.createComment({
|
||||||
issue_number: context.issue.number,
|
issue_number: context.issue.number,
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
body: '👋 Thanks for reporting! @' + issue.data.user.login + ' Please provide your code. If it is already provided, please ignore this message.'
|
body: content
|
||||||
})
|
})
|
||||||
|
@ -1,19 +1,18 @@
|
|||||||
name: Auto PR Test(bot)
|
name: auto PR test(bot)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- main
|
- main
|
||||||
- dev
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run_test:
|
run_test:
|
||||||
name: Run UnitTest
|
name: run test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup .NET 7.0
|
- name: Setup .NET 7.0
|
||||||
uses: actions/setup-dotnet@v1
|
uses: actions/setup-dotnet@v1
|
||||||
|
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
@ -3,16 +3,15 @@ name: Build Project
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
- master
|
||||||
- main
|
- main
|
||||||
- dev
|
|
||||||
- dev-table
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup .NET Core 7
|
- name: Setup .NET Core 7
|
||||||
uses: actions/setup-dotnet@v1
|
uses: actions/setup-dotnet@v1
|
||||||
|
2
.github/workflows/docker.yml
vendored
2
.github/workflows/docker.yml
vendored
@ -10,7 +10,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v3
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
|
2
.github/workflows/pack.yml
vendored
2
.github/workflows/pack.yml
vendored
@ -11,7 +11,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup .NET Core 7
|
- name: Setup .NET Core 7
|
||||||
uses: actions/setup-dotnet@v1
|
uses: actions/setup-dotnet@v1
|
||||||
|
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
@ -10,7 +10,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup .NET Core 7
|
- name: Setup .NET Core 7
|
||||||
uses: actions/setup-dotnet@v1
|
uses: actions/setup-dotnet@v1
|
||||||
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -10,7 +10,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup .NET Core 7
|
- name: Setup .NET Core 7
|
||||||
uses: actions/setup-dotnet@v1
|
uses: actions/setup-dotnet@v1
|
||||||
|
42
.github/workflows/sync_from_issue.yml
vendored
42
.github/workflows/sync_from_issue.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: Sync Issue to PR(bot)
|
name: sync issue to PR(bot)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
@ -6,7 +6,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
sync_assignees:
|
sync_assignees:
|
||||||
name: Sync Assignees
|
name: sync assignees
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@v6
|
- uses: actions/github-script@v6
|
||||||
@ -15,7 +15,7 @@ jobs:
|
|||||||
const body = context.payload.pull_request.body
|
const body = context.payload.pull_request.body
|
||||||
const matches = body.match(/#(\d+)/)
|
const matches = body.match(/#(\d+)/)
|
||||||
if (!matches || matches.length <= 1) {
|
if (!matches || matches.length <= 1) {
|
||||||
console.log('This PR has no related issue!')
|
console.log('this PR has no related issue!')
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const related_issue_number = matches[1]
|
const related_issue_number = matches[1]
|
||||||
@ -24,8 +24,8 @@ jobs:
|
|||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
issue_number: related_issue_number
|
issue_number: related_issue_number
|
||||||
})
|
})
|
||||||
if(issue.data.length == 0) {
|
if (issue.data.length == 0 || issue.data.assignees.length == 0) {
|
||||||
console.log(`There no labels on issue \#${related_issue_number}`)
|
console.log(`there no assignees on issue \#${related_issue_number}`)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const assignees = issue.data.assignees.map(v => v.login)
|
const assignees = issue.data.assignees.map(v => v.login)
|
||||||
@ -35,11 +35,12 @@ jobs:
|
|||||||
issue_number: context.issue.number,
|
issue_number: context.issue.number,
|
||||||
assignees: assignees
|
assignees: assignees
|
||||||
})
|
})
|
||||||
console.log('Sync assignees', assignees)
|
console.log('sync assignees', assignees)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sync_labels:
|
sync_labels:
|
||||||
name: Sync Labels
|
name: sync labels
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@v6
|
- uses: actions/github-script@v6
|
||||||
@ -48,7 +49,7 @@ jobs:
|
|||||||
const body = context.payload.pull_request.body
|
const body = context.payload.pull_request.body
|
||||||
const matches = body.match(/#(\d+)/)
|
const matches = body.match(/#(\d+)/)
|
||||||
if (!matches || matches.length <= 1) {
|
if (!matches || matches.length <= 1) {
|
||||||
console.log('This PR has no related issue!')
|
console.log('this PR has no related issue!')
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const related_issue_number = matches[1]
|
const related_issue_number = matches[1]
|
||||||
@ -58,7 +59,7 @@ jobs:
|
|||||||
issue_number: related_issue_number
|
issue_number: related_issue_number
|
||||||
})
|
})
|
||||||
if(labels.data.length == 0) {
|
if(labels.data.length == 0) {
|
||||||
console.log(`There no labels on issue #${related_issue_number}`)
|
console.log(`there no labels on issue #${related_issue_number}`)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const issue_labels = labels.data.map(v => v.name)
|
const issue_labels = labels.data.map(v => v.name)
|
||||||
@ -68,11 +69,12 @@ jobs:
|
|||||||
issue_number: context.issue.number,
|
issue_number: context.issue.number,
|
||||||
labels: issue_labels
|
labels: issue_labels
|
||||||
})
|
})
|
||||||
console.log('Sync labels', issue_labels)
|
console.log('sync labels', issue_labels)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sync_milestone:
|
sync_milestone:
|
||||||
name: Sync Milestone
|
name: sync milestone
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@v6
|
- uses: actions/github-script@v6
|
||||||
@ -81,7 +83,7 @@ jobs:
|
|||||||
const body = context.payload.pull_request.body
|
const body = context.payload.pull_request.body
|
||||||
const matches = body.match(/#(\d+)/)
|
const matches = body.match(/#(\d+)/)
|
||||||
if (!matches || matches.length <= 1) {
|
if (!matches || matches.length <= 1) {
|
||||||
console.log('This PR has no related issue!')
|
console.log('this PR has no related issue!')
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const related_issue_number = matches[1]
|
const related_issue_number = matches[1]
|
||||||
@ -90,17 +92,17 @@ jobs:
|
|||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
issue_number: related_issue_number
|
issue_number: related_issue_number
|
||||||
})
|
})
|
||||||
if(issue.data.length == 0) {
|
if (issue.data.length == 0 || issue.data.milestone == null) {
|
||||||
console.log(`There no labels on issue \#${related_issue_number}`)
|
console.log(`there no milestone on issue \#${related_issue_number}`)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const milestone = issue.data.milestone
|
const milestone = issue.data.milestone
|
||||||
await github.rest.issues.update({
|
await github.rest.issues.update({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
issue_number: context.issue.number,
|
issue_number: context.issue.number,
|
||||||
milestone: milestone.number
|
milestone: milestone.number
|
||||||
})
|
})
|
||||||
console.log(`Sync milestone ${milestone.title}`)
|
console.log(`sync milestone ${milestone.title}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
26
docs/repro.md
Normal file
26
docs/repro.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# Bug Report Reproduction Guide
|
||||||
|
|
||||||
|
When customers plan to report an issue with BootstrapBlazor, we will most likely ask them to provide a so called `minimal reproduction project (repro)`.
|
||||||
|
This serves two purposes:
|
||||||
|
- It helps issue reporters validate their assumptions by trying to recreate the behavior in a new project.
|
||||||
|
- It helps eliminate ambiguity and speeds up investigations. We may also be able to provide workarounds in certain scenarios.
|
||||||
|
|
||||||
|
This document describes what a minimal repro project is, and why it's important to us.
|
||||||
|
|
||||||
|
## What is a minimal repro project?
|
||||||
|
A repro (or a reproduction) is a project, which can be used to reproduce the reported behavior with minimal effort from a product team, which has the minimum code required to demonstrate the concerning behavior.
|
||||||
|
|
||||||
|
There are two ways you can provide a minimal repro project. The first and simpler option is to use some type of public web-hosted REPL-based environment which supports ASP.NET Core. The other option is to provide a project hosted in GitHub as described below:
|
||||||
|
- Create a new project, based on one of the Blazor Server/WebAssembly project templates.
|
||||||
|
- **Please use the `Empty*` project templates** if they're available for that project type.
|
||||||
|
- Add the minimum amount of code necessary to reproduce the behavior you are reporting on this newly created project.
|
||||||
|
- Make sure you **do not** add any dependencies that are irrelevant to the behavior.
|
||||||
|
- Host the project as a **public** repository on GitHub.
|
||||||
|
- Make sure you haven't included any binaries in your project (this is usually about the `bin` and `obj` folders in your project)
|
||||||
|
Note: that this step is important and we won't be able to open zip attachments in your issues.
|
||||||
|
Zip files are potential attack vectors that we try to avoid at all cost.
|
||||||
|
|
||||||
|
## Important considerations
|
||||||
|
- **Never** include any sensitive information in your reproduction project.
|
||||||
|
- **Never** include any code that is not intended to be public in a repro.
|
||||||
|
- **Do not** reference any external services or data sources.
|
Loading…
Reference in New Issue
Block a user