kiegroup / github-action-build-chain

86 stars 24 forks source link

Failing to get fork name when the forked repository has a different name #461

Closed rgdoliveira closed 11 months ago

rgdoliveira commented 11 months ago

A real example of this issue is:

PR https://github.com/apache/incubator-kie-kogito-apps/pull/1881 was opened for apache/incubator-kie-kogito-apps repository but the the fork name is https://github.com/elguardian/kogito-apps which is different from the repository name.

The checkout summary shows:

# Checkout summary
[INFO] [apache/incubator-kie-drools]
[INFO]   Project taken from apache/incubator-kie-drools:main (Branch HEAD 1deba3ffbd2a9de4ebfbf4c1bb0d57523b3f8ffb)
[INFO] [apache/incubator-kie-kogito-runtimes]
[INFO]   Project taken from apache/incubator-kie-kogito-runtimes:main (Branch HEAD 821650efe7688f55359611a190ed7f3e6026f05a)
[INFO] [apache/incubator-kie-kogito-apps]
[INFO]   Project taken from apache/incubator-kie-kogito-apps:main (Branch HEAD a9f5d1cb4bb0759ef63facd2b81c8c79da373a18)
[INFO] [apache/incubator-kie-kogito-examples]
[INFO]   Project taken from apache/incubator-kie-kogito-examples:main (Branch HEAD bc4d19e48b2a45409fb9e6db1638c993eacb6180)

Meaning that all branches from the forks were ignored and the and just the main branches are used.

Ginxo commented 11 months ago

@rgdoliveira @jstastny-cz get repository group/name mechanism from BC allows this kind of use cases, see [1] and we have seen it before and it has been properly working. I'm curious about BC trace log for PR but I'm not able to find it, could you please share guys? Many thanks

[1] https://github.com/kiegroup/github-action-build-chain/blob/52ecca89476d3b42829d20fe72eeb3b39aa4dc5c/src/service/git/git-api-service.ts#L121

mareknovotny commented 11 months ago

@Ginxo the log is probably here https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-apps-pr/job/PR-1881/17/consoleText