seqan / product_backlog

This repository is used as product backlog for all SeqAn relevant backlog items. This is intended to organise the work for the team.
2 stars 1 forks source link

[INFRA] Generalise issue selection for cron jobs #394

Open eseiler opened 3 years ago

eseiler commented 3 years ago

After https://github.com/seqan/seqan3/pull/2748, we may select issues via the issue number. However, this doesn't work well on forks, and for new crons you would need to create the issue beforehand and set the number accordingly.

Hence, we can generalise the workflow to check for an existing issue and otherwise create it:

Get issue number from issue name

Instead of the issue number, we may set the issue name in the workflow. Now we can do something along the lines of (but using https://github.com/octokit/request-action instead, also see https://docs.github.com/en/rest/reference/issues#list-repository-issues):

curl -H "Accept: application/vnd.github.v3+json" -X GET "https://api.github.com/repos/seqan/seqan3/is
sues?state=all&labels=Cron"

I would suggest adding a label "Cron" to all issues that are eligible. This greatly reduces the amount of returned results and prevents us from having to parse multiple "pages" of results.

We could now parse the returned JSON (https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#fromjson) and search for the title and extract the number if the title equals the desired issue name.

Workflow