Skip to content
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

Add/Remove acceptance-tests-skipped label for PRs #1155

Conversation

pmacik
Copy link
Contributor

@pmacik pmacik commented May 31, 2022

Signed-off-by: Pavel Macík pavel.macik@gmail.com

Follow-up to: #1150

Changes

This PR:

  • Extends the check-skip-acceptance-tests GitHub Action to be able to set or unset the specified label on a PR that can skip (or can't skip resp.)
  • Adds a pull_request_target scoped workflow using that action to set or unset acceptance-tests-skipped label

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Docs
    included if any changes are user facing
  • Tests
    included if any functionality added or changed. For bugfixes please include tests that can catch regressions
  • All acceptance test scenarios included in the PR which verifies a bugfix or a requested feature reported by a non-member are tagged with @external-feedback tag.
  • Follows the commit message standard

@openshift-ci openshift-ci bot requested review from baijum and sadlerap May 31, 2022 08:08
@codecov
Copy link

codecov bot commented May 31, 2022

Codecov Report

Merging #1155 (8b056e8) into master (ace801b) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1155   +/-   ##
=======================================
  Coverage   57.84%   57.84%           
=======================================
  Files          31       31           
  Lines        2697     2697           
=======================================
  Hits         1560     1560           
  Misses        976      976           
  Partials      161      161           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ace801b...8b056e8. Read the comment docs.

@pmacik pmacik force-pushed the feature/acceptance-tests-skipped-label branch 6 times, most recently from 0444dc7 to 1b79a0f Compare May 31, 2022 08:53
@pmacik pmacik added kind/enhancement New feature or request do-not-merge/work-in-progress ci CI related issues labels May 31, 2022
@pmacik pmacik marked this pull request as draft May 31, 2022 10:58
@pmacik
Copy link
Contributor Author

pmacik commented May 31, 2022

Setting a label for PRs wouldn't work with pull_request workflow, but might work with pull_request_target one.

@pmacik pmacik force-pushed the feature/acceptance-tests-skipped-label branch 4 times, most recently from 69c7553 to ea0c7ed Compare May 31, 2022 14:33
@pmacik pmacik marked this pull request as ready for review May 31, 2022 14:35
@pedjak
Copy link
Contributor

pedjak commented May 31, 2022

@pmacik just curious: did you consider using https://github.com/actions/labeler instead of writing the custom action?

Signed-off-by: Pavel Macík <pavel.macik@gmail.com>
@pmacik pmacik force-pushed the feature/acceptance-tests-skipped-label branch from ea0c7ed to 8b056e8 Compare May 31, 2022 18:48
@pmacik
Copy link
Contributor Author

pmacik commented Jun 1, 2022

@pmacik just curious: did you consider using https://github.com/actions/labeler instead of writing the custom action?

@pedjak Hey, thanks for that suggestion!

I have considered it, yes. If I only wanted to set labels based on the content, I'd use it. But in this case, setting a label is a follow-up to #1150 where I primarily wanted to selectively skip the acceptance tests based on PR content. For that I considered using the path filtering, however, I couldn't use that because the checks are Required, so I wrote a custom action for that.

This PR extend that custom action by setting the label to inform about the test skipping. Of course, I could use the 'labeler' action for that, but then I'd need to keep and maintain the path filter at 2 places - one in the custom action, which is already in place, and the second in the .github/labeler.yml file.

Copy link
Contributor

@dperaza4dustbit dperaza4dustbit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@dperaza4dustbit
Copy link
Contributor

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 1, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dperaza4dustbit

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Jun 1, 2022
@pmacik pmacik added the lgtm label Jun 2, 2022
@openshift-merge-robot openshift-merge-robot merged commit ff0d001 into redhat-developer:master Jun 2, 2022
@pmacik pmacik added the acceptance-tests-skipped Marks PR that does not need to run the acceptance tests label Jun 2, 2022
@pmacik pmacik deleted the feature/acceptance-tests-skipped-label branch August 12, 2022 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acceptance-tests-skipped Marks PR that does not need to run the acceptance tests approved ci CI related issues kind/enhancement New feature or request lgtm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants