Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
farhan committed Aug 19, 2024
1 parent d6762c3 commit 0dccba2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 29 deletions.
43 changes: 14 additions & 29 deletions .github/workflows/bulk_issue_creator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 .)
Expand All @@ -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" \
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/issue.json
Original file line number Diff line number Diff line change
@@ -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```"
}

0 comments on commit 0dccba2

Please sign in to comment.