Skip to content

Conversation

weiji14
Copy link
Member

@weiji14 weiji14 commented Oct 2, 2025

Description of proposed changes

The /format comment triggered at #4134 (comment) did not work, failing at https://github.com/GenericMappingTools/pygmt/actions/runs/18181218096/job/51757194575#step:2:17 with:

Warning: Failed to set reaction on comment ID 3358748228.
Command 'format' to be dispatched.
Error: Resource not accessible by integration

Specifically, no emoji reactions were created, and the dispatch event did not happen.

Need to set the following permissions:

  • contents: write to execute repo dispatch event and for git to push
  • pull-requests: write for peter-evans/slash-command-dispatch to create PR reaction

Based on similar PRs I did recently at pangeo-data/pangeo-docker-images#626 and pangeo-data/pangeo-docker-images#625

References:

Addresses #3874 (comment)

Preview:

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If wrapping a new module, open a 'Wrap new GMT module' issue and submit reasonably-sized PRs.
  • If adding new functionality, add an example to docstrings or tutorials.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash command is:

  • /format: automatically format and lint the code

Need permissions `contents: write` to execute repo dispatch event and for git to push, need `pull-requests: write` for peter-evans/slash-command-dispatch to create PR reaction
@weiji14 weiji14 added this to the 0.17.0 milestone Oct 2, 2025
@weiji14 weiji14 self-assigned this Oct 2, 2025
@weiji14 weiji14 added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog labels Oct 2, 2025
Not needed since we don't set reactions after formatting anymore.
@weiji14 weiji14 merged commit fe028f3 into main Oct 2, 2025
8 checks passed
@weiji14 weiji14 deleted the permissions-to-dispatch branch October 2, 2025 03:05
@weiji14
Copy link
Member Author

weiji14 commented Oct 2, 2025

Ok, dispatch worked (there are emojis on #4134 (comment)), but the format command failed at https://github.com/GenericMappingTools/pygmt/actions/runs/18182144257/job/51759958626#step:6:33 with fatal: could not read Username for 'https://github.com/': No such device or address 😅 Think we need to set persist-credentials: true too.

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