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

Fix dependabot labeler and workflows #740

Merged

Conversation

ChristianZaccaria
Copy link
Collaborator

@ChristianZaccaria ChristianZaccaria commented Oct 24, 2024

Issue link

Jira: https://issues.redhat.com/browse/RHOAIENG-11457

What changes have been made

  • Further limited number of PRs generated.

  • Changes in this repo's settings:

    We are dropping the merge queue feature as it seems it's not properly maintained with major issues found unresolved for over a year.

    One benefit seen from merge queue is that it ensures PRs are tested against the target branch. Since we won't be using this feature, I've enabled "Require branches to be up to date before merging" GitHub feature in the main branch. By enabling this, all PRs will require to rebase before they can be merged to main and this way ensure code stability and integration.

  • Due to said change, I removed the need to run tests (e2e, unit-tests) again when commits are merged to main as they would have been already tested in the PR with the changes from the target branch.

  • Use newly created token to allow the codeflare-machine-account to add labels to specifically PRs created by Dependabot.

Verification steps

  • Fixed the dependabot labeler: The "codeflare-machine-account" added the lgtm and approved labels to the following PR successfully by using the new GH CLI token with minimal permissions. In this PR, an adjustment is made so that the dependabot-labeler will only work for Dependabot PRs i.e., where github.actor == 'dependabot[bot]'

    Test PR using new GH CLI Token to allow the codeflare-machine-account to add labels to dependabot PRs: Test PR #739 (automatically merged after status checks passed).

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • Testing is not required for this change

@ChristianZaccaria
Copy link
Collaborator Author

In this PR, you'll notice that the e2e, unit-tests, precommit, and tide checks are marked as Required for merging. I've configured our branch settings to enforce this rule without any bypass options, ensuring enhanced security.

@Bobbins228
Copy link
Contributor

@ChristianZaccaria Can you provide the 2 PRs in the verification steps? I think you might be missing links :)

@ChristianZaccaria
Copy link
Collaborator Author

ChristianZaccaria commented Oct 24, 2024

@Bobbins228 ohh sorry, it's meant to be a single bullet point / one PR. - I could have worded it better :)

The PR is proof of the the machine adding the required labels, waiting for status checks to pass, and eventually automatically merging the PR.

Copy link
Collaborator

@KPostOffice KPostOffice left a comment

Choose a reason for hiding this comment

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

Looks good, just one question.

.github/workflows/dependabot-labeler.yaml Show resolved Hide resolved
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 28, 2024
Copy link
Contributor

openshift-ci bot commented Oct 28, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: KPostOffice

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 Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 28, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 5b805bd into project-codeflare:main Oct 28, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants