Skip to content

CI: Fix the 'Greet First-Time Contributors' workflow - #4820

Closed
seisman wants to merge 1 commit into
mainfrom
ci/welcome
Closed

CI: Fix the 'Greet First-Time Contributors' workflow#4820
seisman wants to merge 1 commit into
mainfrom
ci/welcome

Conversation

@seisman

@seisman seisman commented Aug 12, 2026

Copy link
Copy Markdown
Member

The "Greet First-Time Contributors" workflows works well for issues (#4815 (comment)), but not for pull requests (e.g., #4808, https://github.com/GenericMappingTools/pygmt/actions/runs/31300559514/job/93216830178?pr=4808).

This PR fixes the issue by changing the triggering event from pull_request to pull_request_target.

I didn't test it. Will know if it works or not when merging #4771.

@seisman seisman added this to the 0.20.0 milestone Aug 12, 2026
@seisman seisman added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog needs review This PR has higher priority and needs review. labels Aug 12, 2026

on:
pull_request:
pull_request_target:

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

zizmor marks pull_request_target as a dangerous trigger:

    --> .github/workflows/welcome.yml:7:1
     |
   7 | / on:
   8 | |   pull_request_target:
   9 | |     types:
  10 | |       - opened
  11 | |   issues:
  12 | |     types:
  13 | |       - opened
     | |______________^ pull_request_target is almost always used insecurely
     |
     = note: audit confidence → Medium
     = help: audit documentation → https://docs.zizmor.sh/audits/#dangerous-triggers

but maybe it's OK since the workflow only contains one action?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's not risk it, especially for PRs. Too hard to secure against random actors nowadays.

I think first time contributors opening a PR get a pop up on the GitHub UI that points to contributing.md so we could just put this info there?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Do you mean adding a new section to CONTRIBUTING.md?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is how it looks like if I visit a repo with a CONTRIBUTING.md that I haven't made a PR for before:

image

So yeah, we could just transfer what's under the pr_message: | line to the CONTRIBUTING.md file. I think most of the content overlaps already, so maybe just need a few extra sentences.

@seisman seisman removed the needs review This PR has higher priority and needs review. label Aug 13, 2026
@seisman

seisman commented Aug 13, 2026

Copy link
Copy Markdown
Member Author

OK. Closing the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants