srggrs / assign-one-project-github-action

Automatically add an issue or pull request to specific GitHub Project(s) when you create and/or label them.
MIT License
169 stars 60 forks source link

MY_GITHUB_TOKEN not defined #70

Closed BSoDium closed 3 years ago

BSoDium commented 3 years ago

I have been trying to automate the process of assigning issues to an organization project from a repository, here's my main.yml :

name: Auto Assign to Project

on:
  issues:
    types: [opened, labeled]
  pull_request:
    types: [opened, labeled]
env:
  MY_GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}

jobs:
  assign_one_project:
    runs-on: ubuntu-latest
    name: Assign to One Project
    steps:
    - name: Assign NEW issues and NEW pull requests to project Global Feature progress
      uses: srggrs/assign-one-project-github-action@1.2.1
      if: github.event.action == 'opened'
      with:
        project: 'https://github.com/orgs/7map/projects/1'
        column_name: 'To do'

I have created a personal token for the organization (from my user settings) and added it to the repository secrets but every time I run the job, it fails with a MY_GITHUB_TOKEN not defined error message. Some help would be greatly appreciated 😄

shryhus commented 3 years ago

I have the same problem when trying to assign a general project not for a specific repository.

BSoDium commented 3 years ago

I have no idea what I did but it somehow solved itself after a couple of days of successive failures. As a message for future lost people ending up on this thread, here's the current state of my repository : I have a token I generated from my own account (I'm the organization's owner) added as a repository secret (Settings -> Secrets -> Actions -> Repository secrets) and it apparently kind of works.