diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..e0d6f867 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,20 @@ + +## Description + + + +### Checklist +- [ ] New tests and/or benchmarks are included. +- [ ] Documentation is changed or added. +- [ ] Changelog is updated accordingly. +- [ ] I have signed the MongoDB Contributor License Agreement (https://www.mongodb.com/legal/contributor-agreement). + +## Open Questions + \ No newline at end of file diff --git a/.github/workflows/draft-release.yaml b/.github/workflows/draft-release.yaml index 716aced4..07e7b853 100644 --- a/.github/workflows/draft-release.yaml +++ b/.github/workflows/draft-release.yaml @@ -82,19 +82,17 @@ jobs: run: | ./gradlew --quiet --console=plain "unit-test" ":packages:jetbrains-plugin:test" + - name: Patch Plugin XML + run: | + ./gradlew ":packages:jetbrains-plugin:patchPluginXml" + - name: Verify Plugin run: | ./gradlew ":packages:jetbrains-plugin:runPluginVerifier" - - name: Generate SBOM + - name: Patch Changelog run: | - ./gradlew ":packages:jetbrains-plugin:cyclonedxBom" - - - uses: actions/upload-artifact@v4 - name: Upload SBOM - with: - name: sbom - path: "build/reports/cyclonedx-sbom.json" + ./gradlew ":packages:jetbrains-plugin:patchChangelog" - name: Create Draft Release shell: bash @@ -103,5 +101,20 @@ jobs: run: | set -e echo Creating draft release for: "${RELEASE_TAG}" - echo We will do something here at some point + + git add . + git commit --no-verify -m "Commit to hold release ${RELEASE_TAG}" + git push origin ${RELEASE_TAG} + + GIT_HASH=$(git rev-parse HEAD) + ls packages/jetbrains-plugin/build/distributions/jetbrains-plugin.zip + + CHANGELOG=$(./gradlew --quiet --console=plain :packages:jetbrains-plugin:getChangelog) + + gh release create "${RELEASE_TAG}" \ + --title "${RELEASE_TAG}" \ + --notes "${CHANGELOG}" \ + --target ${GIT_HASH} \ + --draft \ + packages/jetbrains-plugin/build/distributions/jetbrains-plugin.zip diff --git a/.github/workflows/publish-release.yaml b/.github/workflows/publish-release.yaml new file mode 100644 index 00000000..ba7b8383 --- /dev/null +++ b/.github/workflows/publish-release.yaml @@ -0,0 +1,37 @@ +name: Publish Release + +on: + release: + types: [published] + +jobs: + prepare-release: + name: "Prepare Release" + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ github.ref_name }} + fetch-depth: 0 + - name: Setup JDK + uses: actions/setup-java@v4 + with: + distribution: 'adopt' + java-version: '17' + cache: 'gradle' + + + - name: Publish into JetBrains Marketplace + shell: bash + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + set -e + + git checkout main + git merge ${{ github.ref_name }} + git push origin main + + # Do Release + diff --git a/.github/workflows/quality-check.yaml b/.github/workflows/quality-check.yaml index bd854b06..b00fa268 100644 --- a/.github/workflows/quality-check.yaml +++ b/.github/workflows/quality-check.yaml @@ -73,27 +73,6 @@ jobs: with: name: unit-test-coverage path: "**/build/reports/jacoco/test/jacocoTestReport.xml" - - cyclonedx-sbom-generation: - name: 'SBOM Generation' - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup JDK - uses: actions/setup-java@v4 - with: - distribution: 'adopt' - java-version: '17' - cache: 'gradle' - - name: SBOM Generation - run: | - ./gradlew --quiet --console=plain ":packages:jetbrains-plugin:cyclonedxBom" - - uses: actions/upload-artifact@v4 - name: Upload SBOM - with: - name: sbom - path: "build/reports/cyclonedx-sbom.json" functional-tests: name: 'Functional & UI Tests' @@ -102,7 +81,6 @@ jobs: - catalog-check - style-check - unit-tests - - cyclonedx-sbom-generation steps: - name: Checkout uses: actions/checkout@v4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 69e58d15..2e1cf735 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,3 +15,9 @@ MongoDB Plugin that does a lot of features. This is markdown. ### Fixed ### Security + +## [0.0.1] - 2024-05-08 + +### Added + +- Something Added diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..1a6c2c87 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,76 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at compass@mongodb.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e6485fff..90568a9c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -11,7 +11,6 @@ versions-plugin="0.51.0" spotless-plugin="6.25.0" jmh-plugin="0.7.2" diktat-plugin="1.0.1" -cyclonedx-plugin="1.8.2" jmhreport-plugin="0.9.0" # Library dependencies bson="5.0.0" @@ -31,7 +30,6 @@ intellij={ id="org.jetbrains.intellij", version.ref="intellij-plugin" } jmh={ id="me.champeau.jmh", version.ref="jmh-plugin" } versions={ id="com.github.ben-manes.versions", version.ref="versions-plugin" } spotless={ id="com.diffplug.spotless", version.ref="spotless-plugin" } -cyclonedx={ id="org.cyclonedx.bom", version.ref="cyclonedx-plugin" } changelog={ id="org.jetbrains.changelog", version.ref="intellij-changelog-plugin" } jmhreport={ id="io.morethan.jmhreport", version.ref="jmhreport-plugin" } [libraries] @@ -63,4 +61,3 @@ testing-jmh-generatorByteCode={ group="org.openjdk.jmh", name="jmh-generator-byt buildScript-plugin-kotlin={ group="org.jetbrains.kotlin", name="kotlin-gradle-plugin", version="1.9.23" } buildScript-plugin-versions={ group="com.github.ben-manes", name="gradle-versions-plugin", version.ref="versions-plugin" } buildScript-plugin-spotless={ group="com.diffplug.spotless", name="spotless-plugin-gradle", version="6.25.0" } -buildScript-plugin-cyclonedx={ group="org.cyclonedx", name="cyclonedx-gradle-plugin", version.ref="cyclonedx-plugin" } \ No newline at end of file diff --git a/packages/jetbrains-plugin/build.gradle.kts b/packages/jetbrains-plugin/build.gradle.kts index ceeaf811..3881f034 100644 --- a/packages/jetbrains-plugin/build.gradle.kts +++ b/packages/jetbrains-plugin/build.gradle.kts @@ -1,4 +1,3 @@ -import org.cyclonedx.gradle.CycloneDxTask import org.jetbrains.changelog.Changelog import org.jetbrains.changelog.date @@ -12,7 +11,6 @@ plugins { alias(libs.plugins.jmh) alias(libs.plugins.jmhreport) alias(libs.plugins.changelog) - alias(libs.plugins.cyclonedx) } intellij { @@ -22,16 +20,6 @@ intellij { plugins.set(listOf("com.intellij.java", "com.intellij.database")) } -tasks.named("cyclonedxBom").configure { - setIncludeConfigs(listOf("compileClasspath")) - setProjectType("application") - setSchemaVersion("1.5") - setDestination(project.file("build/reports")) - setOutputName("cyclonedx-sbom") - setOutputFormat("json") - setIncludeLicenseText(true) -} - dependencies { implementation(project(":packages:mongodb-access-adapter")) implementation(project(":packages:mongodb-autocomplete-engine"))