question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot get milestones or projects feature to work by title, only by number

See original GitHub issue

I have created:

  • public org project
  • private org project
  • public user project
  • private user project
  • issue level milestone in a private repo

I have created TODOs attempting to use all 5 cases above one at a time. None of the issues get created. Other TODOs with labels and assignees work fine. The same tokens are used for all cases. The token has pretty high access.

The milestone in a private repo may be an issue - have not duplicated the raw API call yet.

I used postman to hit the same API the action is using, giving the same accepts and authorization token headers and the public projects are returned.

Here is some markdown with the markdown file containing the TODOs and some of the debugging output from the processed run


This is a markdown file to test the TODO generator

Raw markdown source code

The markdown below is written with an extra space in the begin comment so they show up here. Remove the space between the opening <! to actually use these as valid comments in MarkDown.

We can generate an issue with assignees and labels - this works fine

< !— TODO A generated issue with assignee and labels Please don’t close this issue that was generated by automation. assignees: JimBledsoe labels: enhancement –>

We can assign an issue to a milestone - not working

< !— TODO A generated issue with a milestone in this repo Please don’t close this issue that was generated by automation. milestone: Test Milestone –>

We can assign an issue to a milestone in quotes perhaps? - not working and not in output below, as it was added later but same error

< !— TODO A generated issue with a milestone in quotes in this repo Please don’t close this issue that was generated by automation. milestone: “Test Milestone” –>

We can assign an issue to a public user project - not working

< !— TODO A generated issue with a public user project user projects: JimBledsoe/Jim Public Project/To do –>

We can assign an issue to a private user project - not working, but neither does GitHub API

< !— TODO A generated issue with a private user project user projects: JimBledsoe/Jim Private Project/To do –>

We can assign an issue to a public org project - not working

< !— TODO A generated issue with a public org project org projects: stage3talent/S3T Public Project/To do –>

We can assign an issue to a private org project - not working, but neither does GitHub API

< !— TODO A generated issue with a private org project org projects: stage3talent/S3T Private Project/To do –>

Errors from the Action Processing Stage

Run alstr/todo-to-issue-action@v4.0.6
/usr/bin/docker run --name a33c15488893555b5409196683167155c571a_30ec6f --label 8a33c1 --workdir /github/workspace --rm -e INPUT_TOKEN -e INPUT_PROJECTS_SECRET -e INPUT_CLOSE_ISSUES -e INPUT_AUTO_P -e INPUT_REPO -e INPUT_BEFORE -e INPUT_SHA -e INPUT_LABEL -e INPUT_COMMENT_MARKER -e INPUT_USER_PROJECTS -e INPUT_ORG_PROJECTS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/curriculum-GCP/curriculum-GCP":"/github/workspace" 8a33c1:5488893555b5409196683167155c571a
Processing issue 1 of 6
Issue created
Processing issue 2 of 6
Milestone Test Milestone does not exist! Dropping this parameter!
Issue created
Processing issue 3 of 6
Adding issue to user project 1 of 1
An error occurred, skipping
Issue created
Processing issue 4 of 6
Adding issue to user project 1 of 1
An error occurred, skipping
Issue created
Processing issue 5 of 6
Adding issue to org project 1 of 1
An error occurred, skipping
Issue created
Processing issue 6 of 6
Adding issue to org project 1 of 1
An error occurred, skipping
Issue created

Workflow file

---
name: Create issues from TODO comments in source files
on:
  push:
#    branches:
#    - main
#    - master

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2

      - name: Scan and Create issues for TODO comments
        uses: alstr/todo-to-issue-action@v4.0.6
        id: todo
        with:
          TOKEN: ${{ secrets.GITHUB_TOKEN }}
          PROJECTS_SECRET: ${{ secrets.GITHUB_TOKEN }}
          CLOSE_ISSUES: true
          AUTO_P: true

Permissions of the Token

admin:org, repo, workflow, write:packages

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
JimBledsoecommented, Jul 21, 2021

OMG, Yes, I had created a token for using this but did not specify it in the yml correctly. I was still using the default secret and not the new org level one. Well that explains why Postman was working and this was not.

Yes, I think everything in this thread is resolved. I misread the milestone by number and had the wrong PAT being used.

Closing this as resolved. I may put in an enhancement request for Milestone by Name at some point. I need to see how the team responds to projects, but the other thread about project by repo is a sticky one for us. I will comment on that thread.

Thanks for your time looking into this.

0reactions
alstrcommented, Jul 22, 2021

No problem, I am happy to look into both repo project assignments and milestones by name. Both seem doable without too much work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Milestone filtering by title doesn't work on closed ... - GitHub
So it only seems to be the case where a milestone is closed that you can't filter by milestone title.
Read more >
Milestones - GitLab Docs
A milestone can belong to project or group. You can assign project milestones to issues or merge requests in that project only. You...
Read more >
Add a milestone - Microsoft Support
The quickest way to create a milestone is to add a task with no duration to your project plan. Click View, and then...
Read more >
Index · Milestones · Project · User · Help · GitLab
A milestone can belong to project or group. You can assign project milestones to issues or merge requests in that project only. You...
Read more >
Index · Milestones · Project · User · Help · GitLab
The milestone view shows the title and description. Project milestone features. These features are only available for project milestones and not group ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found