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

fix: always update for deps and skip making PR if it already exists #2952

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
23 changes: 21 additions & 2 deletions .github/workflows/relock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,26 @@ jobs:
} >> "$GITHUB_OUTPUT"
rm summary.txt

- name: Open PR
# https://stackoverflow.com/a/73828715/1745538
- name: skip if PR already exists
id: check
run: |
prs=$(gh pr list \
--repo "$GITHUB_REPOSITORY" \
--head 'relock-deps' \
--base 'master' \
--json title \
--jq 'length')
if [[ ${prs} != "0" ]]; then
echo "skip=true" >> "$GITHUB_OUTPUT"
else
echo "skip=false" >> "$GITHUB_OUTPUT"
fi
env:
GH_TOKEN: ${{ secrets.AUTOTICK_BOT_TOKEN }}

- name: open PR
if: ${{ steps.check.outputs.skip != 'true' }}
id: pr
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6
with:
Expand All @@ -53,7 +72,7 @@ jobs:
labels: dependencies

- name: automerge
if: ${{ steps.pr.outputs.pull-request-number != '' }}
if: ${{ steps.check.outputs.skip != 'true' && steps.pr.outputs.pull-request-number != '' }}
run: gh pr merge --merge --auto "${{ steps.pr.outputs.pull-request-number }}"
env:
GH_TOKEN: ${{ secrets.AUTOTICK_BOT_TOKEN }}
4 changes: 0 additions & 4 deletions autotick-bot/relock_me.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@ def main(lockfile, reformat_only, force):
for spec in envyml["dependencies"]:
spec = MatchSpec(spec)

# we always pull the latest on the fly when the bot runs
if spec.name == "conda-forge-pinning":
continue

for platform in envyml["platforms"]:
if old_platform_pkg_to_ver[platform].get(
spec.name
Expand Down
Loading