From 02557e0867eb24ef527209c49cbe332ee6e0537c Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Thu, 23 Feb 2023 11:12:31 -0500 Subject: [PATCH 1/9] build: Creating a missing workflow file `self-assign-issue.yml`. The .github/workflows/self-assign-issue.yml workflow is missing or needs an update to stay in sync with the current standard for this workflow as defined in the `.github` repo of the `openedx` GitHub org. --- .github/workflows/self-assign-issue.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/self-assign-issue.yml diff --git a/.github/workflows/self-assign-issue.yml b/.github/workflows/self-assign-issue.yml new file mode 100644 index 00000000..37522fd5 --- /dev/null +++ b/.github/workflows/self-assign-issue.yml @@ -0,0 +1,12 @@ +# This workflow runs when a comment is made on the ticket +# If the comment starts with "assign me" it assigns the author to the +# ticket (case insensitive) + +name: Assign comment author to ticket if they say "assign me" +on: + issue_comment: + types: [created] + +jobs: + self_assign_by_comment: + uses: openedx/.github/.github/workflows/self-assign-issue.yml@master From ca781fce4a4b38baeaee0703b4d714d47609252e Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Thu, 23 Feb 2023 11:12:32 -0500 Subject: [PATCH 2/9] build: Creating a missing workflow file `add-remove-label-on-comment.yml`. The .github/workflows/add-remove-label-on-comment.yml workflow is missing or needs an update to stay in sync with the current standard for this workflow as defined in the `.github` repo of the `openedx` GitHub org. --- .../workflows/add-remove-label-on-comment.yml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/add-remove-label-on-comment.yml diff --git a/.github/workflows/add-remove-label-on-comment.yml b/.github/workflows/add-remove-label-on-comment.yml new file mode 100644 index 00000000..0f369db7 --- /dev/null +++ b/.github/workflows/add-remove-label-on-comment.yml @@ -0,0 +1,20 @@ +# This workflow runs when a comment is made on the ticket +# If the comment starts with "label: " it tries to apply +# the label indicated in rest of comment. +# If the comment starts with "remove label: ", it tries +# to remove the indicated label. +# Note: Labels are allowed to have spaces and this script does +# not parse spaces (as often a space is legitimate), so the command +# "label: really long lots of words label" will apply the +# label "really long lots of words label" + +name: Allows for the adding and removing of labels via comment + +on: + issue_comment: + types: [created] + +jobs: + add_remove_labels: + uses: openedx/.github/.github/workflows/add-remove-label-on-comment.yml@master + From f88a2c2956b069c43ef38f73bb357f118dc7b821 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Thu, 23 Feb 2023 11:12:32 -0500 Subject: [PATCH 3/9] build: Updating a missing workflow file `add-depr-ticket-to-depr-board.yml`. The .github/workflows/add-depr-ticket-to-depr-board.yml workflow is missing or needs an update to stay in sync with the current standard for this workflow as defined in the `.github` repo of the `openedx` GitHub org. --- .github/workflows/add-depr-ticket-to-depr-board.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/add-depr-ticket-to-depr-board.yml b/.github/workflows/add-depr-ticket-to-depr-board.yml index 73ca4c5c..250e394a 100644 --- a/.github/workflows/add-depr-ticket-to-depr-board.yml +++ b/.github/workflows/add-depr-ticket-to-depr-board.yml @@ -16,4 +16,4 @@ jobs: secrets: GITHUB_APP_ID: ${{ secrets.GRAPHQL_AUTH_APP_ID }} GITHUB_APP_PRIVATE_KEY: ${{ secrets.GRAPHQL_AUTH_APP_PEM }} - SLACK_BOT_TOKEN: ${{ secrets.SLACK_ISSUE_BOT_TOKEN }} \ No newline at end of file + SLACK_BOT_TOKEN: ${{ secrets.SLACK_ISSUE_BOT_TOKEN }} From 870b928fd47f72c336ba445d8cc3598a2ab612bf Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Wed, 18 Oct 2023 12:33:56 -0400 Subject: [PATCH 4/9] docs: Convert the README file to markdown. Per https://docs.openedx.org/en/latest/documentors/decisions/0005-markdown-for-npm-readmes.html --- README.md | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.rst | 58 ------------------------------------------------- 2 files changed, 64 insertions(+), 58 deletions(-) create mode 100644 README.md delete mode 100644 README.rst diff --git a/README.md b/README.md new file mode 100644 index 00000000..f7b0974b --- /dev/null +++ b/README.md @@ -0,0 +1,64 @@ +# Open edX Brand Package Interface + +This project contains the default branding assets and style used in Open edX +applications. It is published on npm as `@edx/brand-openedx`. + +The file structure serves as an interface to be implemented for custom +branding and theming of Open edX. + +## How to use this package + +Applications in Open edX are configured by default to include this +package for branding assets and theming visual style. + +To use a custom brand and theme\... + +1. Fork or copy this project. Ensure that it lives in a location + accessible to Open edX applications during asset builds. This may be + a published git repo, npm, or local folder depending on your + situation. +2. Replace the assets in this project with your own logos or SASS + theme. Match the filenames exactly. Open edX applications refer to + these files by their filepath. Refer to the brand for edx.org at + for an example. +3. Configure your Open edX instance to consume your custom brand + package. Refer to this documentation on configuring the platform: + https://docs.openedx.org/projects/openedx-proposals/en/latest/architectural-decisions/oep-0048-brand-customization.html + \[TODO: Add a link to documentation on configuring in Open edX MFE + pipelines when it exists\] +4. Rebuild the assets and microfrontends in your Open edX instance to + see the new brand reflected. \[TODO: Add link to relevant + documentation when it is completed\]. + +## Files this package must make available + +`/logo.svg` + +![logo](/logo.svg) + +`/logo-trademark.svg` A variant of the logo with a trademark ® or ™. +Note: This file must be present. If you don\'t have a trademark variant +of your logo, copy your regular logo and use that. + +![logo](/logo-trademark.svg) + +`/logo-white.svg` A variant of the logo for use on dark backgrounds + +![logo](/logo-white.svg) + +`/favicon.ico` A site favicon + +![favicon](/favicon.ico) + +`/paragon/images/card-imagecap-fallback.png` A variant of the default +fallback image for [Card.ImageCap] component. + +![card-imagecap-fallback](/paragon/images/card-imagecap-fallback.png) + +`/paragon/fonts.scss`, `/paragon/_variables.scss`, +`/paragon/_overrides.scss` A SASS theme for +[\@edx/paragon](https://github.com/openedx/paragon). Theming +documentation in Paragon is coming soon. In the meantime, you can start +a theme by the contents of [\_variables.scss (after line +7)](https://github.com/openedx/paragon/blob/master/scss/core/_variables.scss#L7-L1046) +file from the Paragon repository into this file. diff --git a/README.rst b/README.rst deleted file mode 100644 index c0b270d5..00000000 --- a/README.rst +++ /dev/null @@ -1,58 +0,0 @@ -Open edX Brand Package Interface -================================ - -This project contains the default branding assets and style used in Open edX applications. It is published on npm as `@edx/brand-openedx`. - -The file structure serves as an interface to be implemented for custom branding and theming of Open edX. - ------------------------ -How to use this package ------------------------ - -Applications in Open edX are configured by default to include this package for branding assets and theming visual style. - -To use a custom brand and theme... - -1. Fork or copy this project. Ensure that it lives in a location accessible to Open edX applications during asset builds. This may be a published git repo, npm, or local folder depending on your situation. - -2. Replace the assets in this project with your own logos or SASS theme. Match the filenames exactly. Open edX applications refer to these files by their filepath. Refer to the brand for edx.org at https://github.com/edx/brand for an example. - -3. Configure your Open edX instance to consume your custom brand package. Refer to this documentation on configuring the platform: https://open-edx-proposals.readthedocs.io/en/latest/oep-0048-brand-customization.html [TODO: Add a link to documentation on configuring in Open edX MFE pipelines when it exists] - -4. Rebuild the assets and microfrontends in your Open edX instance to see the new brand reflected. [TODO: Add link to relevant documentation when it is completed]. - --------------------------------------- -Files this package must make available --------------------------------------- - -``/logo.svg`` - -.. image:: /logo.svg - :alt: logo - :width: 128px - -``/logo-trademark.svg`` A variant of the logo with a trademark ® or ™. Note: This file must be present. If you don't have a trademark variant of your logo, copy your regular logo and use that. - -.. image:: /logo-trademark.svg - :alt: logo - :width: 128px - -``/logo-white.svg`` A variant of the logo for use on dark backgrounds - -.. image:: /logo-white.svg - :alt: logo - :width: 128px - -``/favicon.ico`` A site favicon - -.. image:: /favicon.ico - :alt: favicon - :width: 32px - -``/paragon/images/card-imagecap-fallback.png`` A variant of the default fallback image for `Card.ImageCap` component. - -.. image:: /paragon/images/card-imagecap-fallback.png - :alt: card-imagecap-fallback - :width: 380px - -``/paragon/fonts.scss``, ``/paragon/_variables.scss``, ``/paragon/_overrides.scss`` A SASS theme for `@edx/paragon `_. Theming documentation in Paragon is coming soon. In the meantime, you can start a theme by the contents of `_variables.scss (after line 7) `_ file from the Paragon repository into this file. From 0ee5fb2d6caed1b646960b4c5b7020d0e614138d Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Wed, 18 Oct 2023 13:53:24 -0400 Subject: [PATCH 5/9] fix: Add a warning and do a final release. We mark this a fix so that semantic-release will pick it up properly. This adds a warning about the move to the README. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index f7b0974b..48941fe0 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # Open edX Brand Package Interface +**Warning** This package will no longer recieve updates and the latest version +of this package can be found at +https://www.npmjs.com/package/@openedx/brand-openedx + This project contains the default branding assets and style used in Open edX applications. It is published on npm as `@edx/brand-openedx`. From 080e9b9b0e5a4a9e7a992697d8c2a3043366aae1 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Thu, 19 Oct 2023 08:57:53 -0400 Subject: [PATCH 6/9] fix: Update docs spelling and grammer. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 48941fe0..004a503e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Open edX Brand Package Interface -**Warning** This package will no longer recieve updates and the latest version +**Warning** This package will no longer receive updates. The latest version of this package can be found at https://www.npmjs.com/package/@openedx/brand-openedx From 4b2ad665f83e80d1d1dec6b756519d332d828c45 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Thu, 19 Oct 2023 10:14:04 -0400 Subject: [PATCH 7/9] build: Pull the node version from .nvmrc. --- .github/workflows/release.yml | 6 ++++-- .nvmrc | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 .nvmrc diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6dd04d45..8edd2b46 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,10 +12,12 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 + - name: Setup Nodejs Env + run: echo "NODE_VER=`cat .nvmrc`" >> $GITHUB_ENV - name: Setup Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: - node-version: 16 + node-version: ${{ env.NODE_VER }} - name: Install dependencies run: npm ci - name: Release diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..7950a445 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v18.17.0 From 5f1a06775619a7cd6fdea02d8c589177a4d146ce Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Thu, 19 Oct 2023 10:48:03 -0400 Subject: [PATCH 8/9] fix: Make updates to deploy to the openedx scope. Update the config and docs to publish this package to the new `openedx` npm scope. --- .github/workflows/release.yml | 4 ++-- README.md | 6 +----- package.json | 4 ++-- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8edd2b46..96acb56e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,6 +22,6 @@ jobs: run: npm ci - name: Release env: - GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }} + GITHUB_TOKEN: ${{ secrets.OPENEDX_NPM_RELEASE_GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.OPENEDX_NPM_RELEASE_NPM_TOKEN }} run: npx semantic-release diff --git a/README.md b/README.md index 004a503e..dcdb77c1 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,7 @@ # Open edX Brand Package Interface -**Warning** This package will no longer receive updates. The latest version -of this package can be found at -https://www.npmjs.com/package/@openedx/brand-openedx - This project contains the default branding assets and style used in Open edX -applications. It is published on npm as `@edx/brand-openedx`. +applications. It is published on npm as `@openedx/brand-openedx`. The file structure serves as an interface to be implemented for custom branding and theming of Open edX. diff --git a/package.json b/package.json index bc71df19..875affea 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { - "name": "@edx/brand-openedx", + "name": "@openedx/brand-openedx", "version": "1.0.0-semantically-released", "description": "The default branding and SASS theme package containing for Open edX applications. This package is designed to be copied and customized.", "repository": { "type": "git", "url": "git+https://github.com/openedx/brand-openedx.git" }, - "author": "edX", + "author": "Open edX Community", "license": "GPL-3.0-or-later", "bugs": { "url": "https://github.com/openedx/brand-openedx/issues" From 14ca394a7da89feb3db2d3d478b7e77ce91cb1fe Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Mon, 23 Oct 2023 17:09:29 -0400 Subject: [PATCH 9/9] fix: Update the npm release workflow. Marking this as a fix so that it publishes a new version and exercises the changes. We change the names for the secrets to be more generic than NPM because they are being used for semantic release of other libraries to other package systems as well. --- .github/workflows/release.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 96acb56e..2d81c020 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,19 +9,17 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Setup Nodejs Env - run: echo "NODE_VER=`cat .nvmrc`" >> $GITHUB_ENV - name: Setup Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: - node-version: ${{ env.NODE_VER }} + node-version-file: '.nvmrc' - name: Install dependencies run: npm ci - name: Release env: - GITHUB_TOKEN: ${{ secrets.OPENEDX_NPM_RELEASE_GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.OPENEDX_NPM_RELEASE_NPM_TOKEN }} + GITHUB_TOKEN: ${{ secrets.OPENEDX_SEMANTIC_RELEASE_GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.OPENEDX_SEMANTIC_RELEASE_NPM_TOKEN }} run: npx semantic-release