Skip to content

Commit 7781ec6

Browse files
ci: Remove redundant base version check
1 parent 2070919 commit 7781ec6

File tree

1 file changed

+2
-20
lines changed

1 file changed

+2
-20
lines changed

.github/workflows/follow-merge-upstream-repo-sync-v2.yml

+2-20
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
const pyProjectPath = "pyproject.toml";
8383
const repos = ["label-studio-client-generator"];
8484
const repos_infra = [];
85-
const base_branch_name = 'develop';
85+
const base_branch_name = context.repo.default_branch;
8686
8787
let shas = {};
8888
@@ -109,25 +109,7 @@ jobs:
109109
core.notice(`No open upstream PRs found for ${repo}`)
110110
}
111111
}
112-
113-
// GET BASE VERSIONS
114-
const {data: pyprojectBlob} = await github.rest.repos.getContent({
115-
owner: owner,
116-
repo: repo,
117-
ref: base_branch_name,
118-
path: pyProjectPath,
119-
});
120-
const base_pyproject = Buffer.from(pyprojectBlob.content, pyprojectBlob.encoding).toString("utf8");
121-
for (const repo of repos) {
122-
const match = base_pyproject.match(new RegExp(`${repo}\/archive.*(?<sha>[a-f0-9]{40})`));
123-
if (match && match.groups.sha) {
124-
core.info(`Base version for ${repo} ${pyprojectBlob.html_url} ${match.groups.sha}`);
125-
shas[repo] = shas[repo] || match.groups.sha;
126-
} else {
127-
core.setFailed(`Could not parse ${repo} version from ${pyprojectBlob.html_url}`);
128-
}
129-
}
130-
112+
131113
for (const [key, value] of Object.entries(shas)) {
132114
core.setOutput(key, value);
133115
}

0 commit comments

Comments
 (0)