-
Notifications
You must be signed in to change notification settings - Fork 132
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(auto-approve): add sample app repo processes #5053
Changes from 3 commits
f2b39b1
9ca7e9d
504c5f4
12378e8
18d03fc
b59fe90
a8a8bcb
d8485bc
63a509d
c0a693c
621a869
253ea34
9b7ce86
e3be283
13fe99f
de6a84c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,185 +1,185 @@ | ||
exports['auto-approve main auto-approve function config exists on main branch approves and tags a PR if a config exists & is valid & PR is valid 1'] = { | ||
"head_sha": "c5b0c82f5d58dd4a87e4e3e5f73cd752e552931a", | ||
"name": "Auto-approve.yml check", | ||
"conclusion": "success", | ||
"output": { | ||
"title": "Auto-approve.yml check", | ||
"summary": "Successful auto-approve.yml config check", | ||
"text": "" | ||
'head_sha': 'c5b0c82f5d58dd4a87e4e3e5f73cd752e552931a', | ||
'name': 'Auto-approve.yml check', | ||
'conclusion': 'success', | ||
'output': { | ||
'title': 'Auto-approve.yml check', | ||
'summary': 'Successful auto-approve.yml config check', | ||
'text': '' | ||
} | ||
} | ||
|
||
exports['auto-approve main auto-approve function config exists on main branch approves and tags a PR if a config exists & is valid & PR is valid 2'] = { | ||
"event": "APPROVE" | ||
'event': 'APPROVE' | ||
} | ||
|
||
exports['auto-approve main auto-approve function config exists on main branch does nothing if there is already an approval 1'] = { | ||
"head_sha": "c5b0c82f5d58dd4a87e4e3e5f73cd752e552931a", | ||
"name": "Auto-approve.yml check", | ||
"conclusion": "success", | ||
"output": { | ||
"title": "Auto-approve.yml check", | ||
"summary": "Successful auto-approve.yml config check", | ||
"text": "" | ||
'head_sha': 'c5b0c82f5d58dd4a87e4e3e5f73cd752e552931a', | ||
'name': 'Auto-approve.yml check', | ||
'conclusion': 'success', | ||
'output': { | ||
'title': 'Auto-approve.yml check', | ||
'summary': 'Successful auto-approve.yml config check', | ||
'text': '' | ||
} | ||
} | ||
|
||
exports['auto-approve main auto-approve function config exists on main branch approves and tags a PR if everything is valid, and it is coming from a fork 1'] = { | ||
"head_sha": "65f14b92a8135948008c6e26344167a2dac9f066", | ||
"name": "Auto-approve.yml check", | ||
"conclusion": "success", | ||
"output": { | ||
"title": "Auto-approve.yml check", | ||
"summary": "Successful auto-approve.yml config check", | ||
"text": "" | ||
'head_sha': '65f14b92a8135948008c6e26344167a2dac9f066', | ||
'name': 'Auto-approve.yml check', | ||
'conclusion': 'success', | ||
'output': { | ||
'title': 'Auto-approve.yml check', | ||
'summary': 'Successful auto-approve.yml config check', | ||
'text': '' | ||
} | ||
} | ||
|
||
exports['auto-approve main auto-approve function config exists on main branch approves and tags a PR if everything is valid, and it is coming from a fork 2'] = { | ||
"event": "APPROVE" | ||
'event': 'APPROVE' | ||
} | ||
|
||
exports['auto-approve main auto-approve function config exists on main branch submits a failing check if config exists but is not valid 1'] = { | ||
"head_sha": "c5b0c82f5d58dd4a87e4e3e5f73cd752e552931a", | ||
"name": "Auto-approve.yml check", | ||
"conclusion": "failure", | ||
"output": { | ||
"title": "Auto-approve.yml check", | ||
"summary": "auto-approve.yml config check failed", | ||
"text": "See the following errors in your auto-approve.yml config:\n[{\"wrongProperty\":\"wrongProperty\",\"message\":\"message\"}]\n" | ||
'head_sha': 'c5b0c82f5d58dd4a87e4e3e5f73cd752e552931a', | ||
'name': 'Auto-approve.yml check', | ||
'conclusion': 'failure', | ||
'output': { | ||
'title': 'Auto-approve.yml check', | ||
'summary': 'auto-approve.yml config check failed', | ||
'text': 'See the following errors in your auto-approve.yml config:\n[{"wrongProperty":"wrongProperty","message":"message"}]\n' | ||
} | ||
} | ||
|
||
exports['auto-approve main auto-approve function config exists on main branch logs to the console if config is valid but PR is not 1'] = { | ||
"head_sha": "c5b0c82f5d58dd4a87e4e3e5f73cd752e552931a", | ||
"name": "Auto-approve.yml check", | ||
"conclusion": "success", | ||
"output": { | ||
"title": "Auto-approve.yml check", | ||
"summary": "Successful auto-approve.yml config check", | ||
"text": "" | ||
'head_sha': 'c5b0c82f5d58dd4a87e4e3e5f73cd752e552931a', | ||
'name': 'Auto-approve.yml check', | ||
'conclusion': 'success', | ||
'output': { | ||
'title': 'Auto-approve.yml check', | ||
'summary': 'Successful auto-approve.yml config check', | ||
'text': '' | ||
} | ||
} | ||
|
||
exports['auto-approve main auto-approve function config exists on main branch will not check config on master if the config is modified on PR 1'] = { | ||
"head_sha": "c5b0c82f5d58dd4a87e4e3e5f73cd752e552931a", | ||
"name": "Auto-approve.yml check", | ||
"conclusion": "failure", | ||
"output": { | ||
"title": "Auto-approve.yml check", | ||
"summary": "auto-approve.yml config check failed", | ||
"text": "See the following errors in your auto-approve.yml config:\n\n" | ||
'head_sha': 'c5b0c82f5d58dd4a87e4e3e5f73cd752e552931a', | ||
'name': 'Auto-approve.yml check', | ||
'conclusion': 'failure', | ||
'output': { | ||
'title': 'Auto-approve.yml check', | ||
'summary': 'auto-approve.yml config check failed', | ||
'text': 'See the following errors in your auto-approve.yml config:\n\n' | ||
} | ||
} | ||
|
||
exports['auto-approve main auto-approve function config exists on main branch uses the correct function to check the PR if the config is V2 1'] = { | ||
"head_sha": "c5b0c82f5d58dd4a87e4e3e5f73cd752e552931a", | ||
"name": "Auto-approve.yml check", | ||
"conclusion": "success", | ||
"output": { | ||
"title": "Auto-approve.yml check", | ||
"summary": "Successful auto-approve.yml config check", | ||
"text": "" | ||
'head_sha': 'c5b0c82f5d58dd4a87e4e3e5f73cd752e552931a', | ||
'name': 'Auto-approve.yml check', | ||
'conclusion': 'success', | ||
'output': { | ||
'title': 'Auto-approve.yml check', | ||
'summary': 'Successful auto-approve.yml config check', | ||
'text': '' | ||
} | ||
} | ||
|
||
exports['auto-approve main auto-approve function config exists on main branch uses the correct function to check the PR if the config is V2 2'] = { | ||
"event": "APPROVE" | ||
'event': 'APPROVE' | ||
} | ||
|
||
exports['auto-approve main auto-approve function config exists on main branch uses the correct function to check the PR if the config is V1 1'] = { | ||
"head_sha": "c5b0c82f5d58dd4a87e4e3e5f73cd752e552931a", | ||
"name": "Auto-approve.yml check", | ||
"conclusion": "success", | ||
"output": { | ||
"title": "Auto-approve.yml check", | ||
"summary": "Successful auto-approve.yml config check", | ||
"text": "" | ||
'head_sha': 'c5b0c82f5d58dd4a87e4e3e5f73cd752e552931a', | ||
'name': 'Auto-approve.yml check', | ||
'conclusion': 'success', | ||
'output': { | ||
'title': 'Auto-approve.yml check', | ||
'summary': 'Successful auto-approve.yml config check', | ||
'text': '' | ||
} | ||
} | ||
|
||
exports['auto-approve main auto-approve function config exists on main branch uses the correct function to check the PR if the config is V1 2'] = { | ||
"event": "APPROVE" | ||
'event': 'APPROVE' | ||
} | ||
|
||
exports['auto-approve main auto-approve function config does not exist on main branch attempts to create a passing status check if PR contains correct config 1'] = { | ||
"head_sha": "c5b0c82f5d58dd4a87e4e3e5f73cd752e552931a", | ||
"name": "Auto-approve.yml check", | ||
"conclusion": "success", | ||
"output": { | ||
"title": "Auto-approve.yml check", | ||
"summary": "Successful auto-approve.yml config check", | ||
"text": "" | ||
'head_sha': 'c5b0c82f5d58dd4a87e4e3e5f73cd752e552931a', | ||
'name': 'Auto-approve.yml check', | ||
'conclusion': 'success', | ||
'output': { | ||
'title': 'Auto-approve.yml check', | ||
'summary': 'Successful auto-approve.yml config check', | ||
'text': '' | ||
} | ||
} | ||
|
||
exports['auto-approve main auto-approve function config does not exist on main branch attempts to create a failing status check if PR contains wrong config, and error messages check out 1'] = { | ||
"head_sha": "c5b0c82f5d58dd4a87e4e3e5f73cd752e552931a", | ||
"name": "Auto-approve.yml check", | ||
"conclusion": "failure", | ||
"output": { | ||
"title": "Auto-approve.yml check", | ||
"summary": "auto-approve.yml config check failed", | ||
"text": "See the following errors in your auto-approve.yml config:\n[{\"wrongProperty\":\"wrongProperty\",\"message\":\"message\"}]\n" | ||
'head_sha': 'c5b0c82f5d58dd4a87e4e3e5f73cd752e552931a', | ||
'name': 'Auto-approve.yml check', | ||
'conclusion': 'failure', | ||
'output': { | ||
'title': 'Auto-approve.yml check', | ||
'summary': 'auto-approve.yml config check failed', | ||
'text': 'See the following errors in your auto-approve.yml config:\n[{"wrongProperty":"wrongProperty","message":"message"}]\n' | ||
} | ||
} | ||
|
||
exports['auto-approve main auto-approve function config does not exist on main branch passes PR if auto-approve is on main, not PR 1'] = { | ||
"head_sha": "c5b0c82f5d58dd4a87e4e3e5f73cd752e552931a", | ||
"name": "Auto-approve.yml check", | ||
"conclusion": "success", | ||
"output": { | ||
"title": "Auto-approve.yml check", | ||
"summary": "Successful auto-approve.yml config check", | ||
"text": "" | ||
'head_sha': 'c5b0c82f5d58dd4a87e4e3e5f73cd752e552931a', | ||
'name': 'Auto-approve.yml check', | ||
'conclusion': 'success', | ||
'output': { | ||
'title': 'Auto-approve.yml check', | ||
'summary': 'Successful auto-approve.yml config check', | ||
'text': '' | ||
} | ||
} | ||
|
||
exports['auto-approve main auto-approve function config does not exist on main branch passes PR if auto-approve is on main, not PR 2'] = { | ||
"event": "APPROVE" | ||
'event': 'APPROVE' | ||
} | ||
|
||
exports['auto-approve gets secrets and authenticates separately for approval creates a separate octokit instance and authenticates with secret in secret manager 1'] = { | ||
"head_sha": "c5b0c82f5d58dd4a87e4e3e5f73cd752e552931a", | ||
"name": "Auto-approve.yml check", | ||
"conclusion": "success", | ||
"output": { | ||
"title": "Auto-approve.yml check", | ||
"summary": "Successful auto-approve.yml config check", | ||
"text": "" | ||
'head_sha': 'c5b0c82f5d58dd4a87e4e3e5f73cd752e552931a', | ||
'name': 'Auto-approve.yml check', | ||
'conclusion': 'success', | ||
'output': { | ||
'title': 'Auto-approve.yml check', | ||
'summary': 'Successful auto-approve.yml config check', | ||
'text': '' | ||
} | ||
} | ||
|
||
exports['auto-approve gets secrets and authenticates separately for approval creates a separate octokit instance and authenticates with secret in secret manager 2'] = { | ||
"event": "APPROVE" | ||
'event': 'APPROVE' | ||
} | ||
|
||
exports['auto-approve main auto-approve function config exists on main branch retries if etag is not current 1'] = { | ||
"head_sha": "c5b0c82f5d58dd4a87e4e3e5f73cd752e552931a", | ||
"name": "Auto-approve.yml check", | ||
"conclusion": "success", | ||
"output": { | ||
"title": "Auto-approve.yml check", | ||
"summary": "Successful auto-approve.yml config check", | ||
"text": "" | ||
'head_sha': 'c5b0c82f5d58dd4a87e4e3e5f73cd752e552931a', | ||
'name': 'Auto-approve.yml check', | ||
'conclusion': 'success', | ||
'output': { | ||
'title': 'Auto-approve.yml check', | ||
'summary': 'Successful auto-approve.yml config check', | ||
'text': '' | ||
} | ||
} | ||
|
||
exports['auto-approve main auto-approve function config exists on main branch retries if etag is not current 2'] = { | ||
"event": "APPROVE" | ||
'event': 'APPROVE' | ||
} | ||
|
||
exports['auto-approve main auto-approve function config exists on main branch stops retrying to add the label after 3 attempts, even if it is never successful 1'] = { | ||
"head_sha": "c5b0c82f5d58dd4a87e4e3e5f73cd752e552931a", | ||
"name": "Auto-approve.yml check", | ||
"conclusion": "success", | ||
"output": { | ||
"title": "Auto-approve.yml check", | ||
"summary": "Successful auto-approve.yml config check", | ||
"text": "" | ||
'head_sha': 'c5b0c82f5d58dd4a87e4e3e5f73cd752e552931a', | ||
'name': 'Auto-approve.yml check', | ||
'conclusion': 'success', | ||
'output': { | ||
'title': 'Auto-approve.yml check', | ||
'summary': 'Successful auto-approve.yml config check', | ||
'text': '' | ||
} | ||
} | ||
|
||
exports['auto-approve main auto-approve function config exists on main branch stops retrying to add the label after 3 attempts, even if it is never successful 2'] = { | ||
"event": "APPROVE" | ||
'event': 'APPROVE' | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,21 @@ export interface Versions { | |
oldMinorVersion: string; | ||
newMajorVersion: string; | ||
newMinorVersion: string; | ||
} | ||
|
||
/** | ||
* Interface for the versions found in the selected files. These versions are | ||
* picked out based on the regex listed in `./language-versioning-rules.json` for | ||
* that particular file. From there, you will get the previous dependency, new | ||
* dependency, and previous version number and changed version number. | ||
*/ | ||
export interface VersionsWithShaDiff { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. consider |
||
oldDependencyName: string; | ||
newDependencyName: string; | ||
oldMajorVersion: string; | ||
oldMinorVersion: string; | ||
newMajorVersion: string; | ||
newMinorVersion: string; | ||
oldShaOrRevTag?: string; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a need to overload this class? Can we have a separate class for a SHA diff. The function that parses the diff could return a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good! |
||
newShaOrRevTag?: string; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we revert these changes or fix the formatting?