bots: Fix image rebuilds in pull requests
bots: Fix image rebuilds in pull requests

When calling issue-scan with `--issue-data` for PRs, they only get the
`..["pull_request"]` portion and thus testing if that has a
`pull_request` key fails.

As a quick fix, check if the data has a "commits" key, which matches
that case and lets issue-scan accept both formats.

This should eventually be cleaned up by passing the full info to
issue-scan.

Closes #12231

deryni/cockpit,garrett/cockpit,mvollmer/cockpit,cockpituous/cockpit,deryni/cockpit,mvollmer/cockpit,garrett/cockpit,martinpitt/cockpit,moraleslazaro/cockpit,moraleslazaro/cockpit,cockpituous/cockpit,martinpitt/cockpit,martinpitt/cockpit,deryni/cockpit,deryni/cockpit,deryni/cockpit,cockpituous/cockpit,cockpituous/cockpit,moraleslazaro/cockpit,cockpit-project/cockpit,garrett/cockpit,mvollmer/cockpit,cockpit-project/cockpit,deryni/cockpit,moraleslazaro/cockpit,mvollmer/cockpit,cockpit-project/cockpit,cockpit-project/cockpit,moraleslazaro/cockpit,moraleslazaro/cockpit,deryni/cockpit,cockpituous/cockpit,garrett/cockpit,cockpit-project/cockpit,cockpituous/cockpit,garrett/cockpit,martinpitt/cockpit,moraleslazaro/cockpit,mvollmer/cockpit,martinpitt/cockpit