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

fix(auto-add-contributors): add check to prevent duplicate pull requests on contributor change #76

Merged
merged 6 commits into from
Aug 7, 2024

Conversation

sheldonhull
Copy link
Contributor

@sheldonhull sheldonhull commented Aug 7, 2024

Related to #75

Add a step to check for existing open pull requests using GitHub CLI before creating a new one.

  • Check for existing open contributors pull request: Add a step to check for existing open contributors pull requests using GitHub CLI and exit if one already exists.
  • Contribute List: Add pr_title_on_protected and commit_message input to the Contribute List step to ensure the PR title is deterministic.

For more details, open the Copilot Workspace session.

…sts on contributor change

Related to #75

Add a step to check for existing open pull requests using GitHub CLI before creating a new one.

- **Get PR title from YAML**: Add a step to extract the PR title from the YAML file using dockerized yq.
- **Check for existing open contributors pull request**: Add a step to check for existing open contributors pull requests using GitHub CLI and exit if one already exists.
- **Contribute List**: Add `pr_title_on_protected` input to the `Contribute List` step to ensure the PR title is deterministic.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/DelineaXPM/github-workflows/issues/75?shareId=XXXX-XXXX-XXXX-XXXX).
@sheldonhull sheldonhull requested a review from a team as a code owner August 7, 2024 21:42
* Add step to get PR title from YAML using dockerized yq
* Add step to check for existing open contributors pull request using GitHub CLI
* Exit workflow if an existing open pull request is found
* Update pr_title_on_protected value to be deterministic

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/DelineaXPM/github-workflows/issues/75?shareId=XXXX-XXXX-XXXX-XXXX).
@sheldonhull
Copy link
Contributor Author

Update auto-update-contributors workflow to check for existing PRs

  • Add step to get PR title from YAML using dockerized yq
  • Add step to check for existing open contributors pull request using GitHub CLI
  • Exit workflow if an existing open pull request is found
  • Update pr_title_on_protected value to be deterministic

For more details, open the Copilot Workspace session.

* Remove step to get PR title from YAML
* Hardcode PR title in the check for existing open contributors pull request step
* Exit workflow as success if an existing pull request is found

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/DelineaXPM/github-workflows/issues/75?shareId=XXXX-XXXX-XXXX-XXXX).
@sheldonhull
Copy link
Contributor Author

Add step to check for existing open contributors pull request

  • Remove step to get PR title from YAML
  • Hardcode PR title in the check for existing open contributors pull request step
  • Exit workflow as success if an existing pull request is found

For more details, open the Copilot Workspace session.

…ew one

* Use `gh pr list` command to list open pull requests and check if a contributors pull request already exists
* Exit the workflow as a success if an existing pull request is found and comment that a pull request has already been opened
* Fix `gh: To use GitHub CLI in a GitHub Actions workflow, set the GH_TOKEN environment variable. Example: env: GH_TOKEN: ${{ github.token }}`

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/DelineaXPM/github-workflows/issues/75?shareId=XXXX-XXXX-XXXX-XXXX).
@sheldonhull
Copy link
Contributor Author

Add step to check for existing open pull requests before creating a new one

  • Use gh pr list command to list open pull requests and check if a contributors pull request already exists
  • Exit the workflow as a success if an existing pull request is found and comment that a pull request has already been opened
  • Fix gh: To use GitHub CLI in a GitHub Actions workflow, set the GH_TOKEN environment variable. Example: env: GH_TOKEN: ${{ github.token }}

For more details, open the Copilot Workspace session.

* **Checkout repository**: Add a step to checkout the repository using `actions/checkout@v2` before checking for existing open contributors pull request.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/DelineaXPM/github-workflows/issues/75?shareId=XXXX-XXXX-XXXX-XXXX).
@sheldonhull
Copy link
Contributor Author

Add repository checkout step to auto-update-contributors workflow

  • Checkout repository: Add a step to checkout the repository using actions/checkout@v2 before checking for existing open contributors pull request.

For more details, open the Copilot Workspace session.

@sheldonhull
Copy link
Contributor Author

Update auto-update-contributors workflow to include commit message

  • Add commit_message parameter to Contribute List step with value docs(contributor): contributors readme action update

For more details, open the Copilot Workspace session.

* Add `commit_message` parameter to `Contribute List` step with value `docs(contributor): contributors readme action update`

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/DelineaXPM/github-workflows/issues/75?shareId=XXXX-XXXX-XXXX-XXXX).
@sheldonhull sheldonhull merged commit dc96f08 into main Aug 7, 2024
13 checks passed
@sheldonhull sheldonhull deleted the sheldonhull/fix/auto-add-contributors-duplicates branch August 7, 2024 21:54
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.

1 participant