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

MWPW-167901-follow-up:remove hlx4 references from code #81

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions eds/scripts/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ export const [setLibs, getLibs] = (() => {
})();

export const prodHosts = [
'main--dx-partners--adobecom.hlx.page',
'main--dx-partners--adobecom.hlx.live',
'main--dx-partners--adobecom.aem.page',
'main--dx-partners--adobecom.aem.live',
'partners.adobe.com',
Expand Down
5 changes: 3 additions & 2 deletions nala/libs/baseurl.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import pkg from 'axios';
const { head } = pkg;
export async function isBranchURLValid(url) {
export async function isBranchURLValid(url, includeAuthorization = false) {
try {
const response = await head(url);
const headers = includeAuthorization ? { Authorization: `token ${process.env.MILO_AEM_API_KEY}` } : {};
const response = await head(url, { headers });
if (response.status === 200) {
console.info(`\nURL (${url}) returned a 200 status code. It is valid.`);
return true;
Expand Down
4 changes: 1 addition & 3 deletions nala/utils/global.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ async function getGitHubPRBranchLiveUrl() {
// Get the org and repo from the environment variables
const prFromOrg = process.env.prOrg;
const prFromRepoName = process.env.prRepo;

const prBranchLiveUrl = `https://${prBranch}--${prFromRepoName}--${prFromOrg}.aem.live`;

try {
if (await isBranchURLValid(prBranchLiveUrl)) {
if (await isBranchURLValid(prBranchLiveUrl, true)) {
process.env.PR_BRANCH_LIVE_URL = prBranchLiveUrl;
}
console.info('PR Repository : ', repository);
Expand Down
Loading