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

Update URLs and IBM maintenance status #762

Merged
merged 2 commits into from
Aug 5, 2024
Merged

Conversation

frankharkins
Copy link
Member

Summary

Updates all projects URLs (if their repo has moved) and sets their "IBM maintained" status using the new criteria (that a project is in Qiskit or Qiskit-Extensions orgs).

I used the following script to automate this. This worked for all projects except qiskit-superstaq, which is the only project in a subdirectory. I reset that one manually.

import json
import subprocess
from ecosystem.daos import DAO

dao = DAO("ecosystem/resources/")

for project in dao.get_all():
    # Update URLs in case they've changed
    reponame = "/".join(project.url.split("/")[3:5])
    new_url = json.loads(
        subprocess.check_output(
            ["gh", "repo", "view", reponame, "--json", "url"]
        ).decode("utf8")
    )["url"]
    project.url = new_url

    # Update "IBM maintained" status
    if project.url.split("/")[3].lower() in ["qiskit-extensions", "qiskit"]:
        project.ibm_maintained = True
    else:
        project.ibm_maintained = False
    dao.write(project)

@frankharkins frankharkins enabled auto-merge (squash) August 5, 2024 19:56
@frankharkins frankharkins merged commit 38fa941 into main Aug 5, 2024
4 checks passed
@Eric-Arellano Eric-Arellano deleted the FH/update-label branch August 5, 2024 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants