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

Project name not exact matched #24

Closed
bensheldon opened this issue Mar 4, 2020 · 4 comments · Fixed by #25
Closed

Project name not exact matched #24

bensheldon opened this issue Mar 4, 2020 · 4 comments · Fixed by #25
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@bensheldon
Copy link
Contributor

I really love this Github Action, but ran into an unexpected situation:

I have the following action defined:

  add_pull_request:
    name: "Add Pull Request"
    if: github.event_name == 'pull_request'
    runs-on: ubuntu-latest
    steps:
      - uses: alex-page/github-project-automation-plus@9a05133
        with:
          project: Backlog
          column: In progress
          repo-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}

And discovered that the Action is adding the newly created PR correctly to the Repo's Project named "Backlog" and column named "In progress".

...but is unexpectedly also adding the PR to an Owner project named "Global Backlog" and column named "In progress".

Reading the code, it seems like the Project Name is only fuzzily matched when searching for matching Columns through the Github API. The Project Name is not subsequently use it as a filter on the result for an exact match. Columns are filtered with an exact match.

Is the fuzzy-matching expected behavior?

I think this could also be addressed by #18 to avoid collisions (either fuzzily or exact match)

@alex-page
Copy link
Owner

Ahhh good catch. This should not be fuzzy matching.

I still want to keep the ability to add projects by name to keep this action usable for people who don't know how to get the project ID but it should only be getting exact matches.

If you want to make a pull request that would be awesome, otherwise I will fix this up in the next week or two.

@alex-page alex-page added good first issue Good for newcomers help wanted Extra attention is needed labels Mar 5, 2020
@bensheldon
Copy link
Contributor Author

Thanks for that feedback. I'll make a PR.

@alex-page
Copy link
Owner

This is released in v0.1.3. Thanks @bensheldon 💯

@bensheldon
Copy link
Contributor Author

@alex-page woot! Thank YOU.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants