Skip to content

Commit 6409495

Browse files
committed
chore: refactor workflow permissions and update readme
- Move `contents: write` permission from global to `check-version` job only - Reorder debug configurations in `.zed/debug.json` for consistency - Add GitHub issues badge to README - Update test count from 1000 to 1120 in documentation - Clarify industry adoption timeline (remove specific year reference) - Add verified publisher feature to README - Fix status code variable reference in example code
1 parent ff718f2 commit 6409495

4 files changed

Lines changed: 14 additions & 10 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ on:
1212
tags:
1313
- "[1-9]+.[0-9]+.[0-9]+*"
1414

15-
permissions:
16-
contents: write
17-
1815
jobs:
1916
publish-dry-run:
2017
name: 📝 Publish dry run
@@ -37,6 +34,8 @@ jobs:
3734
check-version:
3835
name: 💡 Check version
3936
runs-on: ubuntu-latest
37+
permissions:
38+
contents: write
4039
if: github.ref_type == 'tag'
4140
timeout-minutes: 10
4241
steps:

.zed/debug.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
[
22
{
33
"adapter": "Dart",
4-
"label": "Run example (simple)",
4+
"label": "Run example (real client)",
55
"type": "dart",
6-
"args": ["--simple"],
76
"request": "launch",
87
"program": "$ZED_WORKTREE_ROOT/example/lib/main.dart"
98
},
109
{
1110
"adapter": "Dart",
12-
"label": "Run example (real client)",
11+
"label": "Run example (simple)",
1312
"type": "dart",
1413
"request": "launch",
15-
"program": "$ZED_WORKTREE_ROOT/example/lib/main.dart"
14+
"program": "$ZED_WORKTREE_ROOT/example/lib/main.dart",
15+
"args": [
16+
"--simple"
17+
]
1618
}
1719
]

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
[![CodeFactor](https://www.codefactor.io/repository/github/tsinis/functional_status_codes/badge)](https://www.codefactor.io/repository/github/tsinis/functional_status_codes)
55
[![Pub points](https://img.shields.io/pub/points/functional_status_codes)](https://pub.dev/packages/functional_status_codes/score)
66
[![Created](https://img.shields.io/github/created-at/tsinis/functional_status_codes)](https://github.com/tsinis/functional_status_codes/commit/23d35c4fc890d01b8dc93409738e4fc61712e94f)
7+
[![GitHub issues](https://img.shields.io/github/issues-raw/tsinis/functional_status_codes)](https://github.com/tsinis/functional_status_codes/issues?q=is%3Aissue+is%3Aopen)
78
![CodeRabbit Pull Request Reviews](https://img.shields.io/coderabbit/prs/github/tsinis/functional_status_codes?utm_source=oss&utm_medium=github&utm_campaign=tsinis%2Ffunctional_status_codes&labelColor=171717&color=FF570A&link=https%3A%2F%2Fcoderabbit.ai&label=CodeRabbit+Reviews)
89
[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
910
[![Size](https://img.shields.io/github/languages/code-size/tsinis/functional_status_codes)](https://github.com/tsinis/functional_status_codes#why-should-i-use-this-package)
@@ -139,9 +140,9 @@ The use of `StatusCode` extension type and boolean getters (`isInformational`, `
139140

140141
10. **No 3rd-party dependencies**: This package has no third-party dependencies, ensuring that you won't have any issues or conflicts with other dependencies (no even `meta` here, because of that).
141142

142-
11. **High code coverage**: The code in this package has almost 100% code coverage, with more than 1000 tests, providing confidence in its reliability and stability.
143+
11. **High code coverage**: The code in this package has almost 100% code coverage, with more than 1120 tests, providing confidence in its reliability and stability.
143144

144-
12. **Industry adopted**: This package is actively used (since 2022) in production by numerous European companies, ensuring its efficacy and robustness in real-world scenarios.
145+
12. **Industry adopted**: This package is actively used (for years) in production by numerous European companies, ensuring its efficacy and robustness in real-world scenarios.
145146

146147
13. **BSD-3-Clause License**: This package and sources are released under the BSD-3-Clause license, a permissive license that is also used by the Dart and Flutter SDKs. It allows users to use, modify, and distribute the code with minimal restrictions.
147148

@@ -151,6 +152,8 @@ The use of `StatusCode` extension type and boolean getters (`isInformational`, `
151152

152153
16. **Mirrored Repository**: The GitHub repository, including all package tags, is mirrored on [GitLab](https://gitlab.com/tsinis/functional_status_codes/), providing an alternative access point should GitHub become unavailable.
153154

155+
17. **Verified publisher**: Published and maintained under an active, verified pub.dev publisher account since 2022.
156+
154157
By using these features of the `functional_status_codes` package, you promote a more robust, readable, and maintainable approach to HTTP status code handling in your Dart projects.
155158

156159
### Getting started

example/lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Future<int?> _realClient(List<String> arguments, [http.Client? client]) async {
132132
// message and return the status code.
133133
print('Request failed with status: $otherStatus!');
134134

135-
return response.statusCode;
135+
return otherStatus;
136136
},
137137
);
138138
}

0 commit comments

Comments
 (0)