Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use pull request creator from repo-tools, not testeng-ci #137

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/bulk_repo_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ github.event.inputs.python_version }}

- name: Setup Nodejs
uses: actions/setup-node@v4
with:
Expand All @@ -110,28 +110,28 @@ jobs:
- name: run script
run: ${{ github.event.inputs.script }}

- name: setup testeng-ci
- name: setup pull_request_creator
run: |
git clone https://github.com/edx/testeng-ci.git
cd $GITHUB_WORKSPACE/testeng-ci
pip install -r requirements/base.txt
git clone https://github.com/openedx/repo-tools.git
cd $GITHUB_WORKSPACE/repo-tools
pip install -e '.[pull_request_creator]'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about just installing it from PyPI?

https://pypi.org/project/edx-repo-tools/0.9.0/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@feanil Can you review openedx/repo-tools#523 ? It'll just push the pull_request_creator change to pypi.

kdmccormick marked this conversation as resolved.
Show resolved Hide resolved

- name: setup draft flag
run: echo "draftflag=$(if ${{ github.event.inputs.draft }}; then echo '--draft'; else echo ''; fi)" >> $GITHUB_ENV

- name: setup force delete flag
run: echo "force_delete_old_prs_flag=$(if ${{ github.event.inputs.force_delete_old_prs }}; then echo '--force-delete-old-prs'; else echo '--no-force-delete-old-prs'; fi)" >> $GITHUB_ENV

- name: ignore testeng-ci
run: echo "testeng-ci" >> .git/info/exclude
- name: ignore repo-tools
run: echo "repo-tools" >> .git/info/exclude

- name: create pull request
env:
GITHUB_TOKEN: ${{ secrets.requirements_bot_github_token }}
GITHUB_USER_EMAIL: ${{ secrets.requirements_bot_github_email }}
run: |
cd $GITHUB_WORKSPACE/testeng-ci
python -m jenkins.pull_request_creator --repo-root=$GITHUB_WORKSPACE \
cd $GITHUB_WORKSPACE/repo-tools
kdmccormick marked this conversation as resolved.
Show resolved Hide resolved
kdmccormick marked this conversation as resolved.
Show resolved Hide resolved
pull_request_creator --repo-root=$GITHUB_WORKSPACE \
--target-branch="${{ env.BRANCH }}" --base-branch-name="${{ github.event.inputs.branch }}" \
--commit-message="${{ github.event.inputs.commit_message }}" \
--pr-title="${{ github.event.inputs.commit_message }}" \
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/upgrade-python-requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,12 @@ jobs:
cd $GITHUB_WORKSPACE
make upgrade

- name: setup testeng-ci
- name: setup pull_request_creator
run: |
git clone https://github.com/edx/testeng-ci.git
cd $GITHUB_WORKSPACE/testeng-ci
pip install -r requirements/base.txt
git clone https://github.com/openedx/repo-tools
cd $GITHUB_WORKSPACE/repo-tools
pip install -e '.[pull_request_creator]'
kdmccormick marked this conversation as resolved.
Show resolved Hide resolved

- name: create pull request
id: createpullrequest
env:
Expand All @@ -88,10 +89,11 @@ jobs:
USER_REVIEWERS: ${{ inputs.user_reviewers }}
TEAM_REVIEWERS: ${{ inputs.team_reviewers }}
run: |
cd $GITHUB_WORKSPACE/testeng-ci
python -m jenkins.pull_request_creator --repo-root=$GITHUB_WORKSPACE \
cd $GITHUB_WORKSPACE/repo-tools
kdmccormick marked this conversation as resolved.
Show resolved Hide resolved
kdmccormick marked this conversation as resolved.
Show resolved Hide resolved
pull_request_creator --repo-root=$GITHUB_WORKSPACE \
--target-branch="$TARGET_BRANCH" --base-branch-name="upgrade-python-requirements" \
--commit-message="chore: Updating Python Requirements" --pr-title="Python Requirements Update" \
--commit-message="chore: Upgrade Python requirements" \
--pr-title="chore: Upgrade Python requirements" \
--pr-body="Python requirements update. Please review the [changelogs](https://openedx.atlassian.net/wiki/spaces/TE/pages/1001521320/Python+Package+Changelogs) for the upgraded packages." \
--user-reviewers="$USER_REVIEWERS" \
--team-reviewers="$TEAM_REVIEWERS" \
Expand Down