Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Avoid relying on incremental CF#s (needs CF changes part of PR 62) #24

@polobo

Description

@polobo
logging.info("pulling submissions for current commitfest")
cfbot_commitfest.pull_submissions(conn, commitfest_id)
logging.info("pulling submissions for next commitfest")
cfbot_commitfest.pull_submissions(conn, commitfest_id + 1)

The above seems quite fragile. The CF only will ever have a single Open CF and optionally a single In Progress CF. It is also going to have a single Parked/Draft CF soon. When we add that CF we should do so enforcing these single-instances of each and add an API endpoint that converts the named CFs into their actual numbers. This can then query that API and execute pull_submissions conditionally for each of the CF types.

Adding the API endpoint to pgcommitfest PR 62 seems trivial as would using it here to get rid of the “+1” code. pseudo-code:

open_cf, inprogress_cf, parked_cf = rpc.get_non_closed_cfs(conn)
if open_cf: pull_submission(conn, open_cf)
If inprogress_cf: pull_submission_conn, inprogress_cf)
If parked_cf: pull_submission(conn, parked_cf)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions