mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACS-5186] Add new GH workflow for ADF upstream (#3191)
This commit is contained in:
17
scripts/gh/update/check-pr-already-exists.js
Normal file
17
scripts/gh/update/check-pr-already-exists.js
Normal file
@@ -0,0 +1,17 @@
|
||||
module.exports = async ({github, context, version}) => {
|
||||
const BRANCH_TO_CREATE = 'upstream-dependencies';
|
||||
const { data: prs } = await github.rest.pulls.list({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
state: 'open',
|
||||
head: `${context.repo.owner}:${BRANCH_TO_CREATE}`,
|
||||
base: 'develop'
|
||||
});
|
||||
|
||||
if (prs?.length > 0) {
|
||||
const title = prs[0].title;
|
||||
const result = title.match(version);
|
||||
return result?.length > 0 ? true : false;
|
||||
}
|
||||
return false;
|
||||
}
|
Reference in New Issue
Block a user