-
Notifications
You must be signed in to change notification settings - Fork 146
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
Execute workloads based on labels instead of flags in PR titles #426
Conversation
Signed-off-by: vincepnguyen <[email protected]>
Hi there, this change should run build dependency containers, but running it will take hours. Do you want to run it? If so, please add label "build dependency containers" by commenting "/add-build-dependency-containers-label". |
1 similar comment
Hi there, this change should run build dependency containers, but running it will take hours. Do you want to run it? If so, please add label "build dependency containers" by commenting "/add-build-dependency-containers-label". |
/add-same-version-label |
issue_number: context.payload.pull_request.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: 'Hi there, this change should run build dependency containers, but running it will take hours. Do you want to run it? If so, please add label "build dependency containers" by commenting "/add-build-dependency-containers-label".' |
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.
Just curious, why did you choose to have a preceding backslash in "/add-build-dependency-containers-label"
I use preceding "/" to differentiate between generic comments and commands. Thought I don't have a strong reference here. Any suggestion?
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.
That seems fine to me
@kate-goldenring @romoh @bfjelds hey everyone, this is the new PR with your comments addressed. I messed up the old PR trying to sign off older commits. Please help me review this change. Thanks for the feedbacks! |
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.
This looks great, vince. Can we document adding comments (ie: /add-same-version-label) for others to be aware of? what labels are supported? what adding them mean?.. etc
Also this seems like a good thing to mention on slack once the PR is in.
Thanks for the feedbacks, Roaa. Yes, the associated PR with documentation in akri-docs is: project-akri/akri-docs#16 |
@vincepnguyen Do we still need to create a |
Yes, I created the |
|
||
env: | ||
AKRI_COMPONENT: opencvsharp-build | ||
MAKEFILE_COMPONENT: opencv-base | ||
|
||
jobs: | ||
|
||
add-same-version-label-to-pr: | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'issue_comment' && contains(github.event.comment.body, '/add-same-version-label') |
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.
Should this be contains or equals? Or is there no such check?
Signed-off-by: vincepnguyen [email protected]
What this PR does / why we need it:
Currently, certain workflows are being skipped/executed based on flags set in PR titles. For example, adding [SAME VERSION] to a PR title prevents the version check workflow from running. However, after adding a flag to a title, checks cannot simply be re-run, since they refer to the state of the PR of the last commit. Resultingly, another commit must be pushed to the PR in order for checks to properly register the PR title change (and therefore flag). Running workflows based on labels instead of flags may remove this issue of pushing new commits. This change enables running build/version check based on labels.
The associated PR with documentation in akri-docs is: project-akri/akri-docs#16
Special notes for your reviewer:
If applicable:
cargo fmt
)cargo build
)cargo clippy
)cargo test
)cargo doc
)./version.sh
)