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

Ignore project if issue not present #4

Open
koppor opened this issue Oct 14, 2024 · 5 comments · May be fixed by #28
Open

Ignore project if issue not present #4

koppor opened this issue Oct 14, 2024 · 5 comments · May be fixed by #28
Assignees
Labels
enhancement New feature or request

Comments

@koppor
Copy link
Contributor

koppor commented Oct 14, 2024

Follow-up to #3

In our setting, we have two projects: "Good first issues" and "Candidates for University Projects". An issue can be in 0, 1, or 2 of these projects. In case a contributor is assigned, the "State" should change to "Assigned" in the projects to reflect the state "transparently" for the users.

I would like to move the issue only if it is already present in a board.

Proposal: If ignored-columns contains <<not-in-project>>, then the issue is not added to the project.

@koppor
Copy link
Contributor Author

koppor commented Oct 15, 2024

One can add an issue to a project with the GitHub CLI:

  ui:
    if: "${{ github.event.label.name == 'ui' }}"
    runs-on: ubuntu-latest
    steps:
      - name: ui
        env:
          GH_DEBUG: api
          GH_TOKEN: ${{ secrets.GH_TOKEN_PROJECT_ITEM_ADD }}
        run: |
          ISSUE_URL=$(jq --raw-output .issue.html_url "$GITHUB_EVENT_PATH")
          echo $ISSUE_URL
          gh project item-add 8 --owner JabRef --url $ISSUE_URL

Therefore, it also would be OK for me that this action only moves issues if they are present in the project (and issues a warning output if the issue is not found in the given project).

@koppor
Copy link
Contributor Author

koppor commented Oct 16, 2024

Otherwise, the issue reads as follows:

image

@m7kvqbe1
Copy link
Owner

Hmm this conflicts with some of our own requirements unfortunately.

Maybe we could add a flag that tells it to ignore issues that aren't already in the project?

@m7kvqbe1 m7kvqbe1 added the enhancement New feature or request label Oct 17, 2024
@m7kvqbe1 m7kvqbe1 self-assigned this Oct 17, 2024
@koppor
Copy link
Contributor Author

koppor commented Oct 17, 2024

Maybe we could add a flag that tells it to ignore issues that aren't already in the project?

Sure. My proposal for a flag was following:

Proposal: If ignored-columns contains <<not-in-project>>, then the issue is not added to the project.

I am also fine with an additional boolean setting such as add_to_project with default value true.

@m7kvqbe1
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants