GitHub Project Integration could use mirror settings for default configuration

What

Allow GitHub Integration configuration to be left blank, instead defaulting to fields extracted from mirror settings.

Also ensure that the CI/CD-only import flow leaves these blank to ensure updates only have to be made in one place.

We should still allow these values to be set manually. This allows the integration to be used without mirroring, or with unusual mirroring configurations.

Why

Users currently have two places to update settings when mirroring from GitHub. If the project is moved on GitHub or the API token needs updating they'd ideally only have to make changes in one place.

If we extract the token, and project url from mirror settings we reduce the number of fields which need updating.

Original discussion

The following discussion from !4591 (merged) should be addressed:

  • @pedroms started a discussion: (+14 comments)

    @jamedjo On a second thought, the api_url, owner, and repository_name fields shouldn't be required, as these have to map to the Git URL set in the repository mirroring settings. Example:

    git@github.com:xdissent/ievms.git or https://github.com/xdissent/ievms.git

    • api_url: https://api.github.com
    • owner: xdissent
    • repository_name: ievms

    If it were GitHub Enterprise with https://github.acmeinc.com/xdissent/ievms.git

    • api_url: https://github.acmeinc.com/api/v3/

    By asking the user for these fields, it is manually duplicating information (more time to set up) and can lead to errors. We can avoid that by inferring this information from the repository mirroring settings.