diff --git a/.github/workflows/bulk_issue_creator.yml b/.github/workflows/bulk_issue_creator.yml index 247a19a..7427572 100644 --- a/.github/workflows/bulk_issue_creator.yml +++ b/.github/workflows/bulk_issue_creator.yml @@ -55,32 +55,6 @@ jobs: path: issue_list.* bulk_issue_creation: - env: - ISSUE_TITLE_VAR: | - Move on from deprecated `pkg_resources` api - ISSUE_DESCRIPTION_VAR: | - Shift the code from `pkg_resources` to `importlib.resources` api - - Migration guide: https://importlib-resources.readthedocs.io/en/latest/migration.html - Decision making story: https://github.com/openedx/XBlock/issues/676 - Reference PR to take learning from: https://github.com/openedx/xblock-sdk/pull/350/files - - **Prerequisites:** - - Support of python 3.8 should be dropped. [Relevant epic](https://github.com/openedx/public-engineering/issues/274) - - **Acceptance Criteria:** - - Make sure the repository is using xblock version 5.0.0 or above. Upgrade the version if required, preferably via the make upgrade command. - - There should be no usage of `pkg_resources` in the repository - - Test cases should be passed - - XBlock should perform all of its functionality related to change (loading resources) - - ```[tasklist] - ### Tasks - - [x] xblock https://github.com/openedx/XBlock/issues/676 - - [x] feedback-xblock https://github.com/openedx/FeedbackXBlock/pull/58 - - [ ] xblock-sdk https://github.com/openedx/xblock-sdk/pull/350 - ``` - runs-on: ubuntu-20.04 needs: [ prepare_repos_list, create_issue_list_files ] strategy: @@ -90,14 +64,25 @@ jobs: repo: ${{fromJson(needs.prepare_repos_list.outputs.repos_list)}} steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Read issue details from issue.json + id: issue_details + run: | + issue_json=$(cat issue.json) + issue_title=$(echo "$issue_json" | jq -r '.title') + issue_body=$(echo "$issue_json" | jq -r '.body') + echo "issue_title=$issue_title" >> $GITHUB_ENV + echo "issue_body=$issue_body" >> $GITHUB_ENV + - name: Download issues-artifact uses: actions/download-artifact@v3 with: name: issues-artifact + - name: Create Issue in ${{ matrix.repo }} run: | - issue_title=$(printf "%s" "$ISSUE_TITLE_VAR") - issue_body=$(printf "%s" "$ISSUE_DESCRIPTION_VAR") labels_string=["${{ github.event.inputs.issue_labels }}"] labels_array=$(echo "$labels_string" | sed "s/'/\"/g" | jq -c .) @@ -108,7 +93,7 @@ jobs: '{ title: $title, body: $body, labels: $labels }') echo "data: $data" - # Curl api call to create issue + # Curl API call to create the issue response=$(curl -s -X POST \ -H "Authorization: token ${{ secrets.REQUIREMENTS_BOT_GITHUB_TOKEN }}" \ -H "Accept: application/vnd.github+json" \ diff --git a/.github/workflows/issue.json b/.github/workflows/issue.json new file mode 100644 index 0000000..864eba4 --- /dev/null +++ b/.github/workflows/issue.json @@ -0,0 +1,4 @@ +{ + "title": "Move on from deprecated `pkg_resources` api", + "body": "Shift the code from `pkg_resources` to `importlib.resources` api\n\nMigration guide: https://importlib-resources.readthedocs.io/en/latest/migration.html\nDecision making story: https://github.com/openedx/XBlock/issues/676\nReference PR to take learning from: https://github.com/openedx/xblock-sdk/pull/350/files\n\n**Prerequisites:**\n- Support of python 3.8 should be dropped. [Relevant epic](https://github.com/openedx/public-engineering/issues/274)\n\n**Acceptance Criteria:**\n- Make sure the repository is using xblock version 5.0.0 or above. Upgrade the version if required, preferably via the make upgrade command.\n- There should be no usage of `pkg_resources` in the repository\n- Test cases should be passed\n- XBlock should perform all of its functionality related to change (loading resources)\n\n```[tasklist]\n### Tasks\n- [x] xblock https://github.com/openedx/XBlock/issues/676\n- [x] feedback-xblock https://github.com/openedx/FeedbackXBlock/pull/58\n- [ ] xblock-sdk https://github.com/openedx/xblock-sdk/pull/350\n```" +}