-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
96 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,29 +3,36 @@ name: Check issues access | |
|
||
on: | ||
issues: | ||
types: [ opened ] | ||
types: [ opened, reopened, edited ] | ||
|
||
jobs: | ||
verify_access: | ||
runs-on: ubuntu-latest | ||
if: ${{ join(github.event.issue.labels) == '' || contains(github.event.issue.labels.*.name, 'infra')}} | ||
steps: | ||
- uses: actions-cool/check-user-permission@v2 | ||
id: checkIfUserHasWriteAccess | ||
- uses: actions-cool/check-user-permission@v2.2.1 | ||
id: checkUser | ||
with: | ||
require: 'write' | ||
- name: Close issues if no access | ||
if: steps.checkIfUserHasWriteAccess.outputs.check-result == false | ||
uses: actions-cool/[email protected] | ||
with: | ||
actions: 'close-issue' | ||
issue-number: ${{ github.event.issue.number }} | ||
- name: Write comment | ||
if: steps.checkIfUserHasWriteAccess.outputs.check-result == false | ||
uses: actions-cool/issues-helper@v2.1.2 | ||
if: steps.checkUser.outputs.require-result == 'false' | ||
uses: actions-cool/issues-helper@v3.6.0 | ||
with: | ||
actions: 'create-comment' | ||
issue-number: ${{ github.event.issue.number }} | ||
body: | | ||
@${{ github.event.issue.user.login }} Infra and blank issues are only available for moderators. You're apperantly using the wrong issue template. | ||
@${{ github.event.issue.user.login }} Infra and blank issues are only available for moderators. You're apparently using the wrong issue template. | ||
> Infra 和空白 issue 仅供管理人员使用,请选择其他 issue 模板创建 issue。 | ||
- name: Close issue | ||
if: steps.checkUser.outputs.require-result == 'false' | ||
uses: actions-cool/[email protected] | ||
with: | ||
actions: 'close-issue' | ||
issue-number: ${{ github.event.issue.number }} | ||
- name: Lock issue | ||
if: steps.checkUser.outputs.require-result == 'false' | ||
uses: actions-cool/[email protected] | ||
with: | ||
actions: 'lock-issue' | ||
issue-number: ${{ github.event.issue.number }} | ||
lock-reason: 'off-topic' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 The CFUG Team | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Dio shared test package | ||
|
||
The package gathered shared tests between Dio's packages, | ||
such as `dio` and `http2_adapter`. | ||
|
||
The package was meant to not be published to pub.dev. | ||
To use the package in tests, make the library depend like this: | ||
|
||
```yaml | ||
dev_dependencies: | ||
# Shared test package. | ||
dio_test: | ||
git: | ||
url: https://github.com/cfug/dio | ||
path: dio_test | ||
``` | ||
Then, use `dependency_overrides` or `pubspec_overrides.yaml` | ||
to override the package to a local path or somewhere else. | ||
|
||
## Copyright & License | ||
|
||
The project is authored by | ||
[Chinese Flutter User Group (@cfug)](https://github.com/cfug) | ||
since 2024. | ||
|
||
The project consents [the MIT license](LICENSE). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
name: dio_test | ||
version: 1.0.0 | ||
|
||
publish_to: none | ||
homepage: https://github.com/cfug/dio | ||
repository: https://github.com/cfug/dio/blob/main/dio_test | ||
issue_tracker: https://github.com/cfug/dio/issues | ||
|
||
environment: | ||
sdk: '>=2.15.0 <4.0.0' | ||
|
||
dependencies: | ||
dio: | ||
path: ../dio | ||
dio: any | ||
|
||
dev_dependencies: | ||
test: ^1.5.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters