From 2e66937b4e9f2d313dbbc3c0f5c21f28fc60119f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Werner?= Date: Sat, 6 Jan 2024 17:36:42 +0100 Subject: [PATCH] configure workflows for V2 branch --- .../ISSUE_TEMPLATE/feature-request-v3.yaml | 74 ------------------- .../ISSUE_TEMPLATE/maintenance-task-v3.yaml | 54 -------------- .github/PULL_REQUEST_TEMPLATE/v3-changes.md | 44 ----------- .github/pull_request_template.md | 2 - .github/release-drafter.yml | 2 + .github/scripts/sync_docs.sh | 19 ++--- .github/workflows/benchmark.yml | 3 +- .github/workflows/codeql-analysis.yml | 3 +- .github/workflows/linter.yml | 3 +- .github/workflows/release-drafter.yml | 3 +- .github/workflows/sync-docs.yml | 11 ++- .github/workflows/test.yml | 3 +- .github/workflows/vulncheck.yml | 3 +- 13 files changed, 23 insertions(+), 201 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/feature-request-v3.yaml delete mode 100644 .github/ISSUE_TEMPLATE/maintenance-task-v3.yaml delete mode 100644 .github/PULL_REQUEST_TEMPLATE/v3-changes.md diff --git a/.github/ISSUE_TEMPLATE/feature-request-v3.yaml b/.github/ISSUE_TEMPLATE/feature-request-v3.yaml deleted file mode 100644 index c7551b6d..00000000 --- a/.github/ISSUE_TEMPLATE/feature-request-v3.yaml +++ /dev/null @@ -1,74 +0,0 @@ -name: "๐Ÿ“ Feature Proposal for v3" -title: "๐Ÿ“ [v3 Proposal]: " -description: Propose a feature or improvement for Fiber v3. -labels: ["๐Ÿ“ Proposal", "v3"] - -body: - - type: markdown - id: notice - attributes: - value: | - ### Notice - - For questions, join our [Discord server](https://gofiber.io/discord). - - Please write in clear, understandable English. - - Ensure your proposal aligns with Express design principles and HTTP RFC standards. - - Describe features expected to remain stable and not require changes in the foreseeable future. - - - type: textarea - id: description - attributes: - label: "Feature Proposal Description" - description: "A clear and detailed description of the feature you are proposing for Fiber v3. How should it work, and what API endpoints and methods would it involve?" - placeholder: "Describe your feature proposal clearly and in detail, including API endpoints and methods." - validations: - required: true - - - type: textarea - id: express-alignment - attributes: - label: "Alignment with Express API" - description: "Explain how your proposal aligns with the design and API of Express.js. Provide comparative examples if possible." - placeholder: "Outline how the feature aligns with Express.js design principles and API standards." - validations: - required: true - - - type: textarea - id: standards-compliance - attributes: - label: "HTTP RFC Standards Compliance" - description: "Confirm that the feature complies with HTTP RFC standards, and describe any relevant aspects." - placeholder: "Detail how the feature adheres to HTTP RFC standards." - validations: - required: true - - - type: textarea - id: stability - attributes: - label: "API Stability" - description: "Discuss the expected stability of the feature and its API. How do you ensure that it will not require changes or deprecations in the near future?" - placeholder: "Describe measures taken to ensure the feature's API stability over time." - validations: - required: true - - - type: textarea - id: examples - attributes: - label: "Feature Examples" - description: "Provide concrete examples and code snippets to illustrate how the proposed feature should function." - placeholder: "Share code snippets that exemplify the proposed feature and its usage." - render: go - validations: - required: true - - - type: checkboxes - id: terms - attributes: - label: "Checklist:" - description: "By submitting this issue, you confirm that:" - options: - - label: "I agree to follow Fiber's [Code of Conduct](https://github.com/gofiber/fiber/blob/master/.github/CODE_OF_CONDUCT.md)." - required: true - - label: "I have searched for existing issues that describe my proposal before opening this one." - required: true - - label: "I understand that a proposal that does not meet these guidelines may be closed without explanation." - required: true diff --git a/.github/ISSUE_TEMPLATE/maintenance-task-v3.yaml b/.github/ISSUE_TEMPLATE/maintenance-task-v3.yaml deleted file mode 100644 index 2a58f789..00000000 --- a/.github/ISSUE_TEMPLATE/maintenance-task-v3.yaml +++ /dev/null @@ -1,54 +0,0 @@ -name: "๐Ÿงน v3 Maintenance Task" -title: "๐Ÿงน [v3 Maintenance]: " -description: Describe a maintenance task for the v3 of the Fiber project. -labels: ["๐Ÿงน Updates", "v3"] - -body: - - type: markdown - id: notice - attributes: - value: | - ### Notice - - Before submitting a maintenance task, please check if a similar task has already been filed. - - Clearly outline the purpose of the maintenance task and its impact on the project. - - Use clear and understandable English. - - - type: textarea - id: task-description - attributes: - label: "Maintenance Task Description" - description: "Provide a detailed description of the maintenance task. Include any specific areas of the codebase that require attention, and the desired outcomes of this task." - placeholder: "Detail the maintenance task, specifying what needs to be done and why it is necessary." - validations: - required: true - - - type: textarea - id: impact - attributes: - label: "Impact on the Project" - description: "Explain the impact this maintenance will have on the project. Include benefits and potential risks if applicable." - placeholder: "Describe how completing this task will benefit the project, or the risks of not addressing it." - validations: - required: false - - - type: textarea - id: additional-context - attributes: - label: "Additional Context (optional)" - description: "Any additional information or context regarding the maintenance task that might be helpful." - placeholder: "Provide any additional information that may be relevant to the task at hand." - validations: - required: false - - - type: checkboxes - id: terms - attributes: - label: "Checklist:" - description: "Please confirm the following:" - options: - - label: "I have confirmed that this maintenance task is currently not being addressed." - required: true - - label: "I understand that this task will be evaluated by the maintainers and prioritized accordingly." - required: true - - label: "I am available to provide further information if needed." - required: true diff --git a/.github/PULL_REQUEST_TEMPLATE/v3-changes.md b/.github/PULL_REQUEST_TEMPLATE/v3-changes.md deleted file mode 100644 index 250037be..00000000 --- a/.github/PULL_REQUEST_TEMPLATE/v3-changes.md +++ /dev/null @@ -1,44 +0,0 @@ -## Description - -Please provide a clear and concise description of the changes you've made and the problem they address. Include the purpose of the change, any relevant issues it solves, and the benefits it brings to the project. If this change introduces new features or adjustments, highlight them here. - -Related to # (issue) - -## Changes Introduced - -List the new features or adjustments introduced in this pull request. Provide details on benchmarks, documentation updates, changelog entries, and if applicable, the migration guide. - -- [ ] Benchmarks: Describe any performance benchmarks and improvements related to the changes. -- [ ] Documentation Update: Detail the updates made to the documentation and links to the changed files. -- [ ] Changelog/What's New: Include a summary of the additions for the upcoming release notes. -- [ ] Migration Guide: If necessary, provide a guide or steps for users to migrate their existing code to accommodate these changes. -- [ ] API Alignment with Express: Explain how the changes align with the Express API. -- [ ] API Longevity: Discuss the steps taken to ensure that the new or updated APIs are consistent and not prone to breaking changes. -- [ ] Examples: Provide examples demonstrating the new features or changes in action. - -## Type of Change - -Please delete options that are not relevant. - -- [ ] New feature (non-breaking change which adds functionality) -- [ ] Enhancement (improvement to existing features and functionality) -- [ ] Documentation update (changes to documentation) -- [ ] Performance improvement (non-breaking change which improves efficiency) -- [ ] Code consistency (non-breaking change which improves code reliability and robustness) - -## Checklist - -Before you submit your pull request, please make sure you meet these requirements: - -- [ ] Followed the inspiration of the Express.js framework for new functionalities, making them similar in usage. -- [ ] Conducted a self-review of the code and provided comments for complex or critical parts. -- [ ] Updated the documentation in the `/docs/` directory for [Fiber's documentation](https://docs.gofiber.io/). -- [ ] Added or updated unit tests to validate the effectiveness of the changes or new features. -- [ ] Ensured that new and existing unit tests pass locally with the changes. -- [ ] Verified that any new dependencies are essential and have been agreed upon by the maintainers/community. -- [ ] Aimed for optimal performance with minimal allocations in the new code. -- [ ] Provided benchmarks for the new code to analyze and improve upon. - -## Commit Formatting - -Please use emojis in commit messages for an easy way to identify the purpose or intention of a commit. Check out the emoji cheatsheet here: [CONTRIBUTING.md](https://github.com/gofiber/fiber/blob/master/.github/CONTRIBUTING.md#pull-requests-or-commits) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 323c265e..222b26d2 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -5,8 +5,6 @@ Explain the *details* for making this change. What existing problem does the pul Fixes # (issue) -:warning: **For changes specific to v3, please switch to the [v3 Pull Request Template](?template=v3-changes.md).** - ## Type of change Please delete options that are not relevant. diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index ebc7c6f9..5c8b72d1 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,5 +1,7 @@ name-template: 'v$RESOLVED_VERSION' tag-template: 'v$RESOLVED_VERSION' +commitish: refs/heads/v2 +filter-by-commitish: true categories: - title: 'โ— Breaking Changes' labels: diff --git a/.github/scripts/sync_docs.sh b/.github/scripts/sync_docs.sh index b9b4cefd..8175f26d 100755 --- a/.github/scripts/sync_docs.sh +++ b/.github/scripts/sync_docs.sh @@ -18,15 +18,16 @@ git config --global user.name "${AUTHOR_USERNAME}" git clone https://${TOKEN}@${REPO_URL} fiber-docs # Handle push event -if [ "$EVENT" == "push" ]; then - latest_commit=$(git rev-parse --short HEAD) - log_output=$(git log --oneline ${BRANCH} HEAD~1..HEAD --name-status -- docs/) - if [[ $log_output != "" ]]; then - cp -a docs/* fiber-docs/docs/${REPO_DIR} - fi - -# Handle release event -elif [ "$EVENT" == "release" ]; then +#if [ "$EVENT" == "push" ]; then +# latest_commit=$(git rev-parse --short HEAD) +# log_output=$(git log --oneline ${BRANCH} HEAD~1..HEAD --name-status -- docs/) +# if [[ $log_output != "" ]]; then +# cp -a docs/* fiber-docs/docs/${REPO_DIR} +# fi +# +## Handle release event +#el +if [ "$EVENT" == "release" ]; then major_version="${TAG_NAME%%.*}" # Form new version name diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 76253732..42e7afd6 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -1,8 +1,7 @@ on: push: branches: - - master - - main + - v2 paths: - "**" - "!docs/**" diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 82036cc9..0476abfb 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -3,8 +3,7 @@ name: "CodeQL" on: push: branches: - - master - - main + - v2 paths: - "**" - "!docs/**" diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 3defb963..607e0fa0 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -4,8 +4,7 @@ name: golangci-lint on: push: branches: - - master - - main + - v2 pull_request: permissions: contents: read diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index cedaab43..3ac6e955 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -4,8 +4,7 @@ on: push: # branches to consider in the event; optional, defaults to all branches: - - master - - main + - v2 jobs: update_release_draft: diff --git a/.github/workflows/sync-docs.yml b/.github/workflows/sync-docs.yml index eb35d75b..dd53569b 100644 --- a/.github/workflows/sync-docs.yml +++ b/.github/workflows/sync-docs.yml @@ -1,12 +1,11 @@ name: "Sync docs" on: - push: - branches: - - master - - main - paths: - - "docs/**" +# push: +# branches: +# - v2 +# paths: +# - "docs/**" release: types: [published] diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f103d914..a186908a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,8 +1,7 @@ on: push: branches: - - master - - main + - v2 paths: - "**" - "!docs/**" diff --git a/.github/workflows/vulncheck.yml b/.github/workflows/vulncheck.yml index e6d29ccb..f28ab5b0 100644 --- a/.github/workflows/vulncheck.yml +++ b/.github/workflows/vulncheck.yml @@ -3,8 +3,7 @@ name: Run govulncheck on: push: branches: - - master - - main + - v2 paths: - "**" - "!docs/**"