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

[Developer Issue]: Use GHA to create a pull request to modify pull requests #660

Open
Bai-Li-NOAA opened this issue Jul 26, 2024 · 2 comments
Labels
status: triage_needed This is not approved for this milestone, do not work on it yet

Comments

@Bai-Li-NOAA
Copy link
Contributor

Description

Comments from @kellijohnson-NOAA: should the documentation GitHub action be run during the PR phase rather than after merging into main. We thought it was not worth implementing at this current point in time but if anyone has ideas for how to ensure that clean up is part of the PR rather than after merging into main that would be amazing ⭐!

@Bai-Li-NOAA Bai-Li-NOAA added the status: triage_needed This is not approved for this milestone, do not work on it yet label Jul 26, 2024
@Bai-Li-NOAA
Copy link
Contributor Author

Bai-Li-NOAA commented Jul 26, 2024

@iantaylor-NOAA thinks that running doc-and-style on PRs makes a lot of sense. It gives PR authors better feedback on their code styling and gives the reviewers a chance to look over changes to the .Rd files and other documentation updated by doc-and-style. He just implemented that for r4ss (via r4ss/r4ss@5be028c) and posted an issue about it here: nmfs-fish-tools/ghactions4r#135. There may be some redundant runs of the workflows but he doesn't think that's a big deal for something that runs pretty fast.

I found an use case in the create-pull-request repository that might work for us.

@iantaylor-NOAA
Copy link
Contributor

My naive implementation in r4ss failed (here) with the following error

Checking the base repository state
  /usr/bin/git symbolic-ref HEAD --short
  fatal: ref HEAD is not a symbolic ref
  /usr/bin/git rev-parse HEAD
  7b34b3d68667987f1623a38a[45](https://github.com/r4ss/r4ss/actions/runs/10116442340/job/27979299598#step:19:49)a96207bff0d4ca
  Working base is commit '7b34b3d68667987f1623a38a45a96207bff0d4ca'
  Error: When the repository is checked out on a commit instead of a branch, the 'base' input must be supplied.

I'm guessing that this was related to the workflow needing to create a pull request to the originating branch rather than main but not having the specifications to do that right. The approach used in the use case that @Bai-Li-NOAA linked above seems more promising.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: triage_needed This is not approved for this milestone, do not work on it yet
Projects
None yet
Development

No branches or pull requests

2 participants