Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: setup origin and upstream remotes for factory url #21

Merged
merged 1 commit into from
Jan 22, 2023

Conversation

dkwon17
Copy link
Collaborator

@dkwon17 dkwon17 commented Jan 18, 2023

Signed-off-by: David Kwon [email protected]

Description

If a PR has been made from a forked branch, the resulting badge/link that appears in the PR:

will now have the upstream and origin remotes set up correctly.

Testing this PR:

  1. Fork this repo: https://github.com/dkwon17/my-repo and create any PR. Make sure the PR branch exists in your fork.
    The repo above uses the new changes in this PR. See here.

  2. After creating a PR, there should be a comment badge:

image

  1. Verify that the link address for the badge is:
https://che-dogfooding.apps.che-dev.x6e0.p1.openshiftapps.com/#https://github.com/<YOUR_USERNAME>/my-repo/tree/<PR_BRANCH_NAME>?remotes={{upstream,https://github.com/dkwon17/my-repo.git}}

Related Issue(s)

#14

Checklist

  • This PR includes a documentation change
  • This PR does not need a documentation change

  • This PR includes test changes
  • This PR's changes are already tested

  • This change is not user-facing
  • This change is a patch change
  • This change is a minor change
  • This change is a major (breaking) change

Changes made

  • Add function createTargetUrl() containing logic to determine the badge/link URL and whether or not remotes are to be configured.
  • Add tests

@github-actions github-actions bot added CRDA Scan Approved CRDA scan approved by a collaborator CRDA Scan Passed CRDA found no vulnerabilities and removed CRDA Scan Passed CRDA found no vulnerabilities labels Jan 18, 2023
@github-actions github-actions bot added CRDA Scan Passed CRDA found no vulnerabilities and removed CRDA Scan Passed CRDA found no vulnerabilities labels Jan 18, 2023
@github-actions github-actions bot added CRDA Scan Passed CRDA found no vulnerabilities and removed CRDA Scan Passed CRDA found no vulnerabilities labels Jan 18, 2023
@github-actions github-actions bot added CRDA Scan Passed CRDA found no vulnerabilities and removed CRDA Scan Passed CRDA found no vulnerabilities labels Jan 18, 2023
@dkwon17 dkwon17 requested review from ibuziuk and removed request for ibuziuk January 18, 2023 21:06
@l0rd
Copy link

l0rd commented Jan 19, 2023

I have tested and it worked for me

image

@github-actions github-actions bot added CRDA Scan Passed CRDA found no vulnerabilities and removed CRDA Scan Passed CRDA found no vulnerabilities labels Jan 19, 2023
@dkwon17 dkwon17 marked this pull request as ready for review January 19, 2023 15:53
@github-actions github-actions bot added CRDA Scan Passed CRDA found no vulnerabilities and removed CRDA Scan Passed CRDA found no vulnerabilities labels Jan 19, 2023
@dkwon17 dkwon17 merged commit 11b321d into redhat-actions:main Jan 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CRDA Scan Approved CRDA scan approved by a collaborator CRDA Scan Passed CRDA found no vulnerabilities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants