File tree 1 file changed +2
-20
lines changed
1 file changed +2
-20
lines changed Original file line number Diff line number Diff line change 82
82
const pyProjectPath = "pyproject.toml";
83
83
const repos = ["label-studio-client-generator"];
84
84
const repos_infra = [];
85
- const base_branch_name = 'develop' ;
85
+ const base_branch_name = context.repo.default_branch ;
86
86
87
87
let shas = {};
88
88
@@ -109,25 +109,7 @@ jobs:
109
109
core.notice(`No open upstream PRs found for ${repo}`)
110
110
}
111
111
}
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
+
131
113
for (const [key, value] of Object.entries(shas)) {
132
114
core.setOutput(key, value);
133
115
}
You can’t perform that action at this time.
0 commit comments