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

[FEAT]: Add fail_on_error option to suppress failing #288

Open
1 task done
Uzlopak opened this issue Dec 26, 2023 · 3 comments
Open
1 task done

[FEAT]: Add fail_on_error option to suppress failing #288

Uzlopak opened this issue Dec 26, 2023 · 3 comments
Labels
Type: Feature New feature or request

Comments

@Uzlopak
Copy link

Uzlopak commented Dec 26, 2023

Describe the need

I have a workflow, where i remove a label from a PR. It would be good to add an option to the action.yml which just outputs a warning and not a failure, so e.g. if the label is already removed it does not show an error in the overview.

If we agree on the name of the option, I would provide a PR.

SDK Version

No response

API Version

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Uzlopak Uzlopak added Status: Triage This is being looked at and prioritized Type: Feature New feature or request labels Dec 26, 2023
Copy link

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@nickfloyd nickfloyd moved this from 🆕 Triage to 🔥 Backlog in 🧰 Octokit Active Jan 4, 2024
@kfcampbell kfcampbell removed the Status: Triage This is being looked at and prioritized label Jan 5, 2024
@andy-maier
Copy link

andy-maier commented Oct 10, 2024

I would like to second this request.

We have a workflow that determines whether a release exists:

    - name: Determine whether release on Github exists for the pushed tag
      id: set-release-exists
      uses: octokit/[email protected]
      with:
        route: GET /repos/${{ github.repository }}/releases/tags/${{ steps.set-tag.outputs.result }}
      continue-on-error: true
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

When the release does not exist, the plugin errors out with HTTP status 404, but the continue-on-error: true causes the job to continue, and we can access the status output of this step as a condition in subsequent steps.

So the functionality works - however, we get the error reported in the actions summary, which looks bad:

Build and publish to PyPI
Not Found - https://docs.github.com/rest/releases/releases#get-a-release-by-tag-name

When the new option is specified to the plugin, any error status (e.g. 404) should no longer be returned as an error, but should still be accessible in the status output parameter.

Our complete workflow is here: https://github.com/zhmcclient/python-zhmcclient/blob/master/.github/workflows/publish.yml

@andy-maier
Copy link

@Uzlopak Aras, if you are still willing to create a PR for this, I guess an option named "fail_on_error" with a default of true would be a good start. If the project owners want something different, it will come up in the PR review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New feature or request
Projects
Status: 🔥 Backlog
Development

No branches or pull requests

3 participants