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 a workflow for welcoming first-time contributors #55

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AnthonyLatsis
Copy link

I tested the workflow in my swift fork, albeit without the first-time contributor condition. Once this lands, we can use the contributor experience repo to further test it against pull requests from forks.

@AnthonyLatsis AnthonyLatsis requested a review from a team as a code owner November 2, 2024 18:40
Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

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

I don’t think this workflow design will work because GitHub Actions will be disabled for first-time contributors and thus the action will not trigger on the `pull_request_target

.github/workflows/comment_on_first_contribution.yml Outdated Show resolved Hide resolved
.github/workflows/comment_on_first_contribution.yml Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
@AnthonyLatsis
Copy link
Author

AnthonyLatsis commented Nov 3, 2024

I don’t think this workflow design will work because GitHub Actions will be disabled for first-time contributors and thus the action will not trigger on the `pull_request_target

I am reading through this and getting the impression that the limitation applies to workflow runs — regardless of whether they depend on actions. But the note says that pull_request_target is never run in a (unsafe) fork context and, thus, is an exception. I assume the issues event could similarly be triggered by anyone because the workflow would always run in the context of the issue’s repository.

@ahoppen
Copy link
Member

ahoppen commented Nov 4, 2024

I am reading through this and getting the impression that the limitation applies to workflow runs — regardless of whether they depend on actions. But the note says that pull_request_target is never run in a (unsafe) fork context and, thus, is an exception. I assume the issues event could similarly be triggered by anyone because the workflow would always run in the context of the issue’s repository.

I’m sorry. I meant to remove that comment after I realized that you’re using pull_request_target but must have forgotten.

Copy link
Member

@ahoppen ahoppen 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 to me but I would like @shahmishal to review this as well because it’s a new workflow.

@AnthonyLatsis
Copy link
Author

Sure, I’d like that too! Thanks for reviewing, Alex.

Comment on lines +6 to +17
pull_request_message:
description: >
The Markdown message to comment when a contributor creates their first
pull request.
type: string
required: false
issue_message:
description: >
The Markdown message to comment when a contributor creates their first
issue.
type: string
required: false
Copy link
Member

Choose a reason for hiding this comment

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

Can we provide a default message for both? Would avoid every repo to define its own custom message. Maybe even going one step further do we want each repo to customise this really? If so how do you expect them to customise this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants