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

Added reusable cla check #3

Merged
merged 14 commits into from
Apr 3, 2024
Merged

Added reusable cla check #3

merged 14 commits into from
Apr 3, 2024

Conversation

bluvulture
Copy link
Contributor

@bluvulture bluvulture commented Oct 30, 2023

https://pimcore.atlassian.net/browse/SOLI-97

Added reusable CLA check workflow
Bumped CLA action version to latest one from action release repo

example usage of new CLA within dependent workflow

name: "CLA Assistant"
on:
issue_comment:
types: [created]
pull_request_target:
types: [opened,closed,synchronize]
jobs:
cla-check:
uses: pimcore/workflows-collection-public/.github/workflows/reusable-cla-check.yml@cla_check

After this PR has been merged, new release will be created and dependent workflows will reference versioned one

Bumped CLA action version to latest one from action release repo
@bluvulture bluvulture marked this pull request as ready for review October 30, 2023 14:04
@bluvulture bluvulture marked this pull request as draft March 12, 2024 08:08
@bluvulture bluvulture marked this pull request as ready for review April 2, 2024 11:24
@bluvulture bluvulture requested review from herbertroth and removed request for cipribucur April 2, 2024 11:24
@bluvulture
Copy link
Contributor Author

bluvulture commented Apr 2, 2024

@herbertroth tested it here
https://github.com/pimcore/saas-cypress/pull/79

this is what needs to be added in source repo, not that cla_check branch in git url will be changed with tag version as soon this is merged and released


name: CLA Workflow

on:
  issue_comment:
    types: [created]
  pull_request_target:
    types: [opened, closed, synchronize]

jobs:
  call-cla-workflow:
    uses: pimcore/workflows-collection-public/.github/workflows/reusable-cla-check.yaml@cla_check
    if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'

    secrets:
      PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}

Copy link
Member

@herbertroth herbertroth left a comment

Choose a reason for hiding this comment

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

Shouldn't we use the CLA_ACTION_ACCESS_TOKEN instead of PRIVATE_ACCESS_TOKEN?
And update doku here: https://pimcore.atlassian.net/wiki/spaces/PD/pages/2548006917/CLA+Checker

@bluvulture
Copy link
Contributor Author

bluvulture commented Apr 2, 2024

Shouldn't we use the CLA_ACTION_ACCESS_TOKEN instead of PRIVATE_ACCESS_TOKEN? And update doku here: https://pimcore.atlassian.net/wiki/spaces/PD/pages/2548006917/CLA+Checker

@herbertroth I thought so, but we need to stick to naming from cla checker
https://github.com/contributor-assistant/github-action?tab=readme-ov-file#environmental-variables

will update docs afterwards - will create one migration doc

@herbertroth
Copy link
Member

Shouldn't we use the CLA_ACTION_ACCESS_TOKEN instead of PRIVATE_ACCESS_TOKEN? And update doku here: https://pimcore.atlassian.net/wiki/spaces/PD/pages/2548006917/CLA+Checker

@herbertroth I thought so, but we need to stick to naming from cla checker https://github.com/contributor-assistant/github-action?tab=readme-ov-file#environmental-variables

So PERSONAL_ACCESS_TOKEN: ${{ secrets.CLA_ACTION_ACCESS_TOKEN }} would also work? or do i misunderstood the doku?

@bluvulture
Copy link
Contributor Author

bluvulture commented Apr 2, 2024

Shouldn't we use the CLA_ACTION_ACCESS_TOKEN instead of PRIVATE_ACCESS_TOKEN? And update doku here: https://pimcore.atlassian.net/wiki/spaces/PD/pages/2548006917/CLA+Checker

@herbertroth I thought so, but we need to stick to naming from cla checker https://github.com/contributor-assistant/github-action?tab=readme-ov-file#environmental-variables

So PERSONAL_ACCESS_TOKEN: ${{ secrets.CLA_ACTION_ACCESS_TOKEN }} would also work? or do i misunderstood the doku?

Would probably, but I did not want to use different names for env variable and secret.
I can try it out also, just let me know and I will test it out

@bluvulture
Copy link
Contributor Author

bluvulture commented Apr 3, 2024

@herbertroth ping for re-check

dependent workflow should look like this

name: CLA Workflow

on:
  issue_comment:
    types: [created]
  pull_request_target:
    types: [opened, closed, synchronize]

jobs:
  call-cla-workflow:
    uses: pimcore/workflows-collection-public/.github/workflows/reusable-cla-check.yaml@cla_check
    if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
    secrets:
      CLA_ACTION_ACCESS_TOKEN: ${{ secrets.CLA_ACTION_ACCESS_TOKEN }}

@bluvulture bluvulture merged commit aa07fa3 into main Apr 3, 2024
@bluvulture bluvulture deleted the cla_check branch April 3, 2024 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants