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

[Community] Fix PR labeling github action workflow #6279

Merged
merged 1 commit into from
Jul 25, 2021

Conversation

TobKed
Copy link
Contributor

@TobKed TobKed commented Jul 20, 2021

Proposed changes

My change is the fix and improvement for github action which labels approved PRs (introduced in this PR).

It is inspired by solution introduced and tested in Apache Airflow (thanks @potiuk @ashb 🚀 )

Corresponding Apache Airflow workflows on which I based this PR:

Problems which were solved in this PR:

Types of changes

What types of changes does your code introduce to Doris?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)
  • Code refactor (Modify the code structure, format the code, etc...)
  • Optimization. Including functional usability improvements and performance improvements.
  • Dependency. Such as changes related to third-party components.
  • Other.

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have created an issue on (Fix #ISSUE) and described the bug/feature there in detail
  • Compiling and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • If these changes need document changes, I have updated the document
  • Any dependent changes have been merged

@TobKed
Copy link
Contributor Author

TobKed commented Jul 20, 2021

I will add description and then ping for reviews.

@morningman
Copy link
Contributor

I will add description and then ping for reviews.

Great, thank you very much for your help!

@morningman morningman added the kind/community Issues or PRs related to Doris community label Jul 21, 2021
@TobKed TobKed marked this pull request as ready for review July 21, 2021 16:17
@TobKed
Copy link
Contributor Author

TobKed commented Jul 21, 2021

I have updated description. Ready for review.
cc @morningman @EmmyMiao87

Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@morningman morningman added the approved Indicates a PR has been approved by one committer. label Jul 25, 2021
@morningman morningman merged commit 8d1c1ef into apache:master Jul 25, 2021
@morningman
Copy link
Contributor

Thanks @TobKed , it works!

@TobKed TobKed deleted the label-action-fix branch July 25, 2021 15:13
@tzssangglass
Copy link
Member

hi @TobKed, I am a developer from the Apache APISIX community and I have a similar question.
Sorry for taking your time, I would like to ask a question, do I need to give GITHUB_TOKEN write permission to post comments elsewhere in Github Action?

@TobKed
Copy link
Contributor Author

TobKed commented Jan 22, 2022

Hi @tzssangglass , I am happy to help you.
If undestrand you question correctly, there is no need for any additional configuration.
GITHUB_TOKEN permissions are set here: https://github.com/apache/incubator-doris/blob/c2520c878c3d827e27c32f1dab5e5953a25b52e7/.github/workflows/approve-label.yml#L24
I am pretty sure if you introduce to APISIX same changes as in in this PR it should work out of the box.
If you need any help with it or some problems occurs do not hesitate to contact me.

Edit: I've checked apache/apisix#6136 and I think the problem which you relates to there is solved here as well: important thing here is that labelling consists of two workflows:

where first one just triggers second one. Reason for that is described here: Preventing pwn requests. In your case you may need to adjust permissions (https://github.com/apache/incubator-doris/blob/c2520c878c3d827e27c32f1dab5e5953a25b52e7/.github/workflows/approve-label.yml#L24). This article may be helpful: Permissions for the GITHUB_TOKEN

@tzssangglass
Copy link
Member

many thanks @TobKed , I will try.

@Hisoka-X
Copy link
Member

Hisoka-X commented Nov 9, 2022

Hi @TobKed .Are two action modules necessary?

@TobKed
Copy link
Contributor Author

TobKed commented Oct 7, 2023

Hi @TobKed .Are two action modules necessary?

According to my knowledge they are necessary, however not sure if something change during last year :)

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 one committer. kind/community Issues or PRs related to Doris community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants