Skip to content

Commit

Permalink
Initial commit 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
KochC committed Nov 18, 2024
0 parents commit e4a78b9
Show file tree
Hide file tree
Showing 118 changed files with 12,911 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/blank_issue.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Other issue"
description: "Open an issue, that is neither a bug or a feature/enhancement request"
labels: ["other"]
body:
- type: markdown
attributes:
value: |
# ⚠️ PLEASE KEEP IN MIND THAT GITHUB IS PUBLIC! DON'T SHARE ANY SENSITIVE OR INTERNAL INFORMATION! ⚠️
## IF YOU POST YOUR CONFIGURATION REMOVE **AT LEAST** `serial-numbers`,`client_ids`,`client_secrets` and `urls`
- type: checkboxes
id: checklist
attributes:
label: "Issue checklist"
description: "To open an issue, all conditions below **need** to be met."
options:
- label: "This is **not** a bug or a feature/enhancement request."
required: true
- label: "I searched through the GitHub issues and this issue has not been opened before."
required: true
- type: textarea
id: text
attributes:
label: "Issue"
description: |
Any text you want, but please be kind :)
validations:
required: true
91 changes: 91 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: "Bug report: mtrust-barcode-kit"
description: "Report a bug in mtrust-barcode-kit"
title: "[Bug]: "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
# ⚠️ PLEASE KEEP IN MIND THAT GITHUB IS PUBLIC! DON'T SHARE ANY SENSITIVE OR INTERNAL INFORMATION! ⚠️
## IF YOU POST YOUR CONFIGURATION REMOVE **AT LEAST** `serial-numbers`,`client_ids`,`client_secrets` and `urls`
- type: checkboxes
id: checklist
attributes:
label: "Issue checklist"
description: "To open an issue, all conditions below **need** to be met."
options:
- label: "This is a **bug** in mtrust-barcode-kit and not a bug in another repository. It is also not an enhancement/feature request"
required: true
- label: "I searched through the GitHub issues and this issue has not been opened before."
required: true
- label: "I use the latest version of mtrust-barcode-kit and don't use an unsupported flutter, dart or pub version."
required: true
- label: "`flutter doctor` reports no issues."
required: true
- type: textarea
id: bug-description
attributes:
label: Description of the bug
description: |
Concise description of the bug.
Please provide as much info as possible, so we can help you better. Unfortunately we can't read minds (yet).
placeholder: |
For example:
When i use [...], the function [...] fails with this error [...]. It works when I use [...].
I provided a code snippet below, for you to reproduce it.
validations:
required: true
- type: textarea
id: bug-reproduce
attributes:
label: Steps to reproduce this bug.
description: |
To debug your issue, we need to know how we can reproduce this error on our machines.
This way we can try to solve the issue faster.
validations:
required: true
- type: textarea
id: bug-logs
attributes:
label: Log output
description: |
If there were warnings or errors during your build
or any other logs file that may help us, then please
paste them here.
> Please note that this textarea will automatically get formatted as `shell` for better readability.
- type: textarea
id: bug-context
attributes:
label: Additional context
description: |
Additional context that may help us, e.g. specific config options you set. pub_dev version, dart version, device serial number, device firmware version... Or anything else that doesn't fit any other category above.
> NOTE: Config options like `jwt`,`client_id`,`client_secret`,... which contain sensitive information, should **never** be posted!
placeholder: |
For example:
mtrust-barcode-kit version, SEC-000123 v1.0.0...
- type: dropdown
id: bug-os
attributes:
label: Operating System
multiple: false
options:
- Windows
- WSL
- Linux
- MacOS
- iOS
- Android
- Web
- Other
validations:
required: true
- type: input
id: bug-flutter-version
attributes:
label: Your flutter version
description: |
The flutter version you use to build mtrust-barcode-kit.
You can use the command `flutter --version` to find out your version.
placeholder: "e.g. Flutter 3.24.3"
validations:
required: true
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
67 changes: 67 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: "Feature request"
description: "Request a feature in mtrust-barcode-kit"
title: "[Feature Request]: "
labels: ["feature-request"]
body:
- type: markdown
attributes:
value: |
# ⚠️ PLEASE KEEP IN MIND THAT GITHUB IS PUBLIC! DON'T SHARE ANY SENSITIVE OR INTERNAL INFORMATION! ⚠️
## IF YOU POST YOUR CONFIGURATION REMOVE **AT LEAST** `serial-numbers`,`client_ids`,`client_secrets` and `urls`
- type: checkboxes
id: checklist
attributes:
label: "Issue checklist"
description: "To open an issue, all conditions below **need** to be met."
options:
- label: "This is a **feature request**/**enhancement**. And not a bug."
required: true
- label: "I searched through the GitHub issues and this feature/enhancement has not been requested before."
required: true
- label: "I use the latest version of mtrust-barcode-kit and don't use an unsupported flutter, dart or pub version."
required: true
- label: "Others could also benefit from this feature or enhancement and it is **not** a very specific use case."
required: true
- type: textarea
id: feature-request-use-case
attributes:
label: Feature use case
description: |
Describe the use case for the feature.
Why do you want this feature?
What problem does this solve? (If any)
placeholder: |
These are some examples (You don't need to use them, but as long as you include precise information, we are happy):
When people want to [...] they currently need to use [...].
validations:
required: true
- type: textarea
id: feature-request-description
attributes:
label: Description of the Feature
description: |
Please provide a short and concise description of the feature.
What do you want the feature to do?
If you already have ideas **how** it could be implemented, describe them too.
placeholder: |
These are some examples (You don't need to use them, but as long as you include precise information, we are happy):
The feature should behave like [...].
We would expect that [...].
This enhancement extends feature [...] with [...].
Currently the feature only [...]
validations:
required: true
- type: textarea
id: feature-request-alternatives
attributes:
label: Alternatives you considered
description: |
Are there alternatives, that you considered?
Could this be achieved by doing something else?
Provide details! (if any)
- type: textarea
id: feature-request-context
attributes:
label: Additional Context
description: Context that may help us, but doesn't fit in any other categories.
9 changes: 9 additions & 0 deletions .github/pull_request_template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Summary

<!-- summary of your changes -->

# Checklist

- [ ] You agree with our [CLA](https://gist.githubusercontent.com/emdgroup-admin/16cc45ea4315c2ef29eb9d9afc36fcf5/raw/abb9c91f15278a62b9ac3e66144bcd27fa9485c2/CLA.md)
- [ ] Included tests (or is not applicable).
- [ ] Updated documentation (or is not applicable).
98 changes: 98 additions & 0 deletions .github/workflows/build_dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Dev - 🚧 build package

on:
push:
branches:
- dev

jobs:
version:
name: Version & Build
runs-on: macos-latest
environment: release
permissions:
contents: write

outputs:
version: ${{ steps.get_new_version.outputs.result}}

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{secrets.ELEVATED_TOKEN}}

- name: 📇 Configure git
run: |
git fetch --prune --unshallow
git config --global user.name "GitHub Actions"
git config --global user.email "gh-actions@merckgroup.com"
shell: bash

# Retrieve the new version
- name: 🔂 Run standard-version
uses: actions/github-script@v7
with:
script: |
const {execSync} = require('child_process');
execSync('npx standard-version --skip.tag --prerelease', {stdio: 'inherit'});
# Retrieve the new version
- name: ⏎ Get new version
uses: actions/github-script@v7
id: get_new_version
with:
result-encoding: string
script: |
const fs = require('fs');
const package = JSON.parse(fs.readFileSync('package.json', 'utf8'));
return package.version;
- name: Print new version
run: echo ${{ steps.get_new_version.outputs.result}}

# Bump the pubspec.yaml file
- name: ⬆️ Bump pubspec.yaml
uses: emdgroup/mtrust-urp/.github/actions/update-pubspec@main
with:
version: ${{ steps.get_new_version.outputs.result }}
directory: .

- name: 📝 Update version in readme
uses: emdgroup/mtrust-urp/.github/actions/update-pubspec-readme-version@main
with:
directory: .

- name: Setup Dart
uses: dart-lang/setup-dart@v1

- name: Prepare Flutter
uses: emdgroup/mtrust-urp/.github/actions/prepare-flutter@main
with:
directory: "."

- name: Validate Flutter
uses: emdgroup/mtrust-urp/.github/actions/validate-flutter@main
with:
directory: "."
is_package: true

- name: Check licenses
uses: emdgroup/mtrust-urp/.github/actions/check-dart-licenses@main
with:
directory: "."

# We first commit with proper message and add an empty commit to keep the files history clean
- name: Update repo versions
run: |
git add .
git commit -m "chore(release): ${{ steps.get_new_version.outputs.result }}"
git commit --allow-empty -m "chore(release): ${{ steps.get_new_version.outputs.result }} [skip ci]"
git push origin dev
# For this part it is important to not push a commit with [skip ci] before the tag release
- name: Push tag for pub.dev
run: |
git commit --allow-empty -m "chore(release): ${{ steps.get_new_version.outputs.result }}"
git tag -a v${{ steps.get_new_version.outputs.result }} -m "Pub.dev version ${{ steps.get_new_version.outputs.result }}"
git push origin v${{ steps.get_new_version.outputs.result }}
Loading

0 comments on commit e4a78b9

Please sign in to comment.