-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jan-Otto Kröpke <[email protected]>
- Loading branch information
0 parents
commit 85ca89f
Showing
52 changed files
with
3,642 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
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,79 @@ | ||
name: 🐞 Bug | ||
description: Something is not working as indented. | ||
labels: [ 🐞 bug ] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: Thanks for taking the time to fill out this bug report! | ||
|
||
- type: textarea | ||
attributes: | ||
label: Current Behavior | ||
description: A concise description of what you're experiencing. | ||
placeholder: | | ||
When I do <X>, <Y> happens and I see the error message attached below: | ||
```...``` | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Expected Behavior | ||
description: A concise description of what you expected to happen. | ||
placeholder: When I do <X>, <Z> should happen instead. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Steps To Reproduce | ||
description: Steps to reproduce the behavior. | ||
placeholder: | | ||
1. In this environment... | ||
2. With this config... | ||
3. Run '...' | ||
4. See error... | ||
render: Markdown | ||
validations: | ||
required: false | ||
|
||
- type: textarea | ||
attributes: | ||
label: Environment | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: m365-exporter logs | ||
description: | | ||
Log of m365-exporter. | ||
render: shell | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Anything else? | ||
description: | | ||
Links? References? Anything that will give us more context about the issue you are encountering! | ||
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. | ||
validations: | ||
required: false | ||
|
||
- type: checkboxes | ||
attributes: | ||
label: Privacy Statement | ||
description: "I acknowledge that this is a public repository and confirm that I have not included any sensitive customer data, internal information, or proprietary details in this request." | ||
options: | ||
- label: I agree | ||
required: true | ||
|
||
- type: checkboxes | ||
attributes: | ||
label: Code of Conduct | ||
description: "By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/cloudeteer/terraform-governance?tab=coc-ov-file#code-of-conduct)." | ||
options: | ||
- label: I agree to follow this repository's Code of Conduct | ||
required: true |
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 @@ | ||
blank_issues_enabled: false |
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,57 @@ | ||
name: ✨ Enhancement / Feature / Task | ||
description: Some feature is missing or incomplete. | ||
labels: [ ✨ enhancement ] | ||
body: | ||
- type: textarea | ||
attributes: | ||
label: Problem Statement | ||
description: Without specifying a solution, describe what the project is missing today. | ||
placeholder: | | ||
The rotating project logo has a fixed size and color. | ||
There is no way to make it larger and more shiny. | ||
validations: | ||
required: false | ||
- type: textarea | ||
attributes: | ||
label: Proposed Solution | ||
description: Describe the proposed solution to the problem above. | ||
placeholder: | | ||
- Implement 2 new flags CLI: ```--logo-color=FFD700``` and ```--logo-size=100``` | ||
- Let these flags control the size of the rotating project logo. | ||
validations: | ||
required: false | ||
- type: textarea | ||
attributes: | ||
label: Additional information | ||
placeholder: | | ||
We considered adjusting the logo size to the phase of the moon, but there was no | ||
reliable data source in air-gapped environments. | ||
validations: | ||
required: false | ||
- type: textarea | ||
attributes: | ||
label: Acceptance Criteria | ||
placeholder: | | ||
- [ ] As a user, I can control the size of the rotating logo using a CLI flag. | ||
- [ ] As a user, I can control the color of the rotating logo using a CLI flag. | ||
- [ ] Defaults are reasonably set. | ||
- [ ] New settings are appropriately documented. | ||
- [ ] No breaking change for current users of the rotating logo feature. | ||
validations: | ||
required: false | ||
|
||
- type: checkboxes | ||
attributes: | ||
label: Privacy Statement | ||
description: "I acknowledge that this is a public repository and confirm that I have not included any sensitive customer data, internal information, or proprietary details in this request." | ||
options: | ||
- label: I agree | ||
required: true | ||
|
||
- type: checkboxes | ||
attributes: | ||
label: Code of Conduct | ||
description: "By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/cloudeteer/terraform-governance?tab=coc-ov-file#code-of-conduct)." | ||
options: | ||
- label: I agree to follow this repository's Code of Conduct | ||
required: true |
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,29 @@ | ||
name: ❓ Question | ||
description: Something is not clear. | ||
labels: [ ❓ question ] | ||
body: | ||
- type: textarea | ||
attributes: | ||
label: Problem Statement | ||
description: Without specifying a solution, describe what the project is missing today. | ||
placeholder: | | ||
The rotating project logo has a fixed size and color. | ||
There is no way to make it larger and more shiny. | ||
validations: | ||
required: false | ||
|
||
- type: checkboxes | ||
attributes: | ||
label: Privacy Statement | ||
description: "I acknowledge that this is a public repository and confirm that I have not included any sensitive customer data, internal information, or proprietary details in this request." | ||
options: | ||
- label: I agree | ||
required: true | ||
|
||
- type: checkboxes | ||
attributes: | ||
label: Code of Conduct | ||
description: "By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/cloudeteer/terraform-governance?tab=coc-ov-file#code-of-conduct)." | ||
options: | ||
- label: I agree to follow this repository's Code of Conduct | ||
required: true |
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,23 @@ | ||
changelog: | ||
exclude: | ||
labels: | ||
- chore | ||
categories: | ||
- title: 💥 Breaking Changes | ||
labels: | ||
- 💥 breaking-change | ||
- title: ✨ Exciting New Features | ||
labels: | ||
- ✨ enhancement | ||
- title: 🐞 Bug Fixes | ||
labels: | ||
- 🐞 bug | ||
- title: 🛠️ Dependencies | ||
labels: | ||
- 🛠️ dependencies | ||
- title: 📖 Documentation | ||
labels: | ||
- 📖 docs | ||
- title: Other Changes | ||
labels: | ||
- "*" |
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,119 @@ | ||
name: CI | ||
|
||
env: | ||
# renovate: github=golangci/golangci-lint | ||
GO_LINT_CI_VERSION: v1.63.4 | ||
# renovate: github=goreleaser/goreleaser | ||
GORELEASER_VERSION: v2.5.1 | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
id-token: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-24.04 | ||
name: Build & Test | ||
environment: build | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | ||
with: | ||
go-version-file: 'go.mod' | ||
cache: true | ||
|
||
- run: go build -o m365-exporter ./cmd/m365-exporter | ||
|
||
- name: Fetch OIDC token from GH actions API | ||
run: |- | ||
OIDC_TOKEN_JSON="$(curl -sSf -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=api://AzureADTokenExchange")" | ||
OIDC_TOKEN="$(jq -r '.value' <<< "${OIDC_TOKEN_JSON}")" | ||
printf '%s' "${OIDC_TOKEN}" >"${AZURE_FEDERATED_TOKEN_FILE}" | ||
env: | ||
AZURE_FEDERATED_TOKEN_FILE: "${{ format('{0}/.az-token', runner.temp) }}" | ||
|
||
- run: go test ./... -timeout 20s -race -covermode=atomic -coverprofile=coverage.out -coverpkg=./... | ||
env: | ||
AZURE_TENANT_ID: "${{ vars.ORGA_CDT_TENANT_ID }}" | ||
AZURE_CLIENT_ID: "${{ vars.AZURE_CLIENT_ID }}" | ||
AZURE_FEDERATED_TOKEN_FILE: "${{ format('{0}/.az-token', runner.temp) }}" | ||
|
||
- name: Login to GitHub Container Registry | ||
if: github.ref == 'refs/heads/main' | ||
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: go build (with goreleaser) | ||
uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf # v6.1.0 | ||
with: | ||
version: ${{ env.GORELEASER_VERSION }} | ||
args: release --clean --timeout=3600s ${{ github.ref == 'refs/heads/main' && '--auto-snapshot --skip announce' || '--snapshot' }} | ||
env: | ||
GITHUB_TOKEN: ${{ github.ref == 'refs/heads/main' && secrets.GITHUB_TOKEN || '' }} | ||
GORELEASER_CURRENT_TAG: ${{ github.ref == 'refs/heads/main' && github.ref_name || '' }} | ||
|
||
- name: Archive code coverage results | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: code-coverage | ||
path: coverage.txt | ||
|
||
lint: | ||
name: golangci-lint | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | ||
with: | ||
go-version-file: 'go.mod' | ||
|
||
- run: go mod tidy -diff | ||
|
||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@ec5d18412c0aeab7936cb16880d708ba2a64e1ae # v6.2.0 | ||
with: | ||
args: --timeout=600s --tests=false | ||
|
||
super-lint: | ||
name: super-lint | ||
runs-on: ubuntu-24.04 | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Lint Code Base | ||
uses: super-linter/super-linter/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
MULTI_STATUS: false | ||
VALIDATE_ALL_CODEBASE: false | ||
VALIDATE_BASH: true | ||
VALIDATE_BASH_EXEC: true | ||
VALIDATE_EDITORCONFIG: true | ||
VALIDATE_ENV: true | ||
VALIDATE_GITHUB_ACTIONS: true | ||
VALIDATE_GITLEAKS: true | ||
VALIDATE_JSON: true | ||
VALIDATE_NATURAL_LANGUAGE: true | ||
VALIDATE_PYTHON: true | ||
VALIDATE_RENOVATE: true | ||
VALIDATE_SHELL_SHFMT: true | ||
VALIDATE_XML: true | ||
VALIDATE_YAML: true |
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,31 @@ | ||
name: Validate Pull Request | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- labeled | ||
- unlabeled | ||
|
||
jobs: | ||
required-labels-missing: | ||
name: required labels missing | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: check | ||
if: >- | ||
!contains(github.event.pull_request.labels.*.name, '💥 breaking-change') | ||
&& !contains(github.event.pull_request.labels.*.name, '✨ enhancement') | ||
&& !contains(github.event.pull_request.labels.*.name, '🐞 bug') | ||
&& !contains(github.event.pull_request.labels.*.name, '📖 docs') | ||
&& !contains(github.event.pull_request.labels.*.name, 'chore') | ||
&& !contains(github.event.pull_request.labels.*.name, '🛠️ dependencies') | ||
run: >- | ||
echo One of the following labels is missing on this PR: | ||
breaking-change | ||
enhancement | ||
bug | ||
docs | ||
chore | ||
&& exit 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
# run only against tags | ||
tags: | ||
- '*' | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
id-token: write | ||
|
||
jobs: | ||
goreleaser: | ||
if: github.repository == 'cloudeteer/m365-exporter' | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | ||
with: | ||
go-version-file: 'go.mod' | ||
|
||
- uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf # v6.1.0 | ||
with: | ||
args: release --clean --timeout=3600s -p1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GORELEASER_CURRENT_TAG: ${{ github.ref_name }} |
Oops, something went wrong.